Skip to content

Commit 6a30aa7

Browse files
committed
fix renaming for test fails
1 parent 5784aef commit 6a30aa7

File tree

3 files changed

+8
-8
lines changed

3 files changed

+8
-8
lines changed

docs/source/_rst/loss/ntk_weighting.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,6 @@ NeuralTangentKernelWeighting
44

55
.. automodule:: pina.loss.ntk_weighting
66

7-
.. autoclass:: NeuralTangetKernelWeighting
7+
.. autoclass:: NeuralTangentKernelWeighting
88
:members:
99
:show-inheritance:

pina/loss/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"PowerLoss",
99
"WeightingInterface",
1010
"ScalarWeighting",
11-
"NeuralTangetKernelWeighting",
11+
"NeuralTangentKernelWeighting",
1212
]
1313

1414
from .loss_interface import LossInterface
1515
from .power_loss import PowerLoss
1616
from .lp_loss import LpLoss
1717
from .weighting_interface import WeightingInterface
1818
from .scalar_weighting import ScalarWeighting
19-
from .ntk_weighting import NeuralTangetKernelWeighting
19+
from .ntk_weighting import NeuralTangentKernelWeighting

tests/test_weighting/test_ntk_weighting.py

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
from pina.solver import PINN
44
from pina.model import FeedForward
55
from pina.problem.zoo import Poisson2DSquareProblem
6-
from pina.loss import NeuralTangetKernelWeighting
6+
from pina.loss import NeuralTangentKernelWeighting
77

88
problem = Poisson2DSquareProblem()
99
condition_names = problem.conditions.keys()
@@ -21,13 +21,13 @@
2121
],
2222
)
2323
def test_constructor(model, alpha):
24-
NeuralTangetKernelWeighting(model=model, alpha=alpha)
24+
NeuralTangentKernelWeighting(model=model, alpha=alpha)
2525

2626

2727
@pytest.mark.parametrize("model", [0.5])
2828
def test_wrong_constructor1(model):
2929
with pytest.raises(ValueError):
30-
NeuralTangetKernelWeighting(model)
30+
NeuralTangentKernelWeighting(model)
3131

3232

3333
@pytest.mark.parametrize(
@@ -43,7 +43,7 @@ def test_wrong_constructor1(model):
4343
)
4444
def test_wrong_constructor2(model, alpha):
4545
with pytest.raises(ValueError):
46-
NeuralTangetKernelWeighting(model, alpha)
46+
NeuralTangentKernelWeighting(model, alpha)
4747

4848

4949
@pytest.mark.parametrize(
@@ -58,7 +58,7 @@ def test_wrong_constructor2(model, alpha):
5858
],
5959
)
6060
def test_train_aggregation(model, alpha):
61-
weighting = NeuralTangetKernelWeighting(model=model, alpha=alpha)
61+
weighting = NeuralTangentKernelWeighting(model=model, alpha=alpha)
6262
problem.discretise_domain(50)
6363
solver = PINN(problem=problem, model=model, weighting=weighting)
6464
trainer = Trainer(solver=solver, max_epochs=5, accelerator="cpu")

0 commit comments

Comments
 (0)