Skip to content

Commit d32db81

Browse files
dario-cosciaFilippoOlivo
authored andcommitted
Renaming
* solvers -> solver * adaptive_functions -> adaptive_function * callbacks -> callback * operators -> operator * pinns -> physics_informed_solver * layers -> block
1 parent 747b6de commit d32db81

File tree

90 files changed

+155
-151
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

90 files changed

+155
-151
lines changed

pina/__init__.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010

1111
from .label_tensor import LabelTensor
1212
from .graph import Graph
13-
from .solvers.solver import SolverInterface, MultiSolverInterface
13+
from .solver import SolverInterface, MultiSolverInterface
1414
from .trainer import Trainer
1515
from .condition.condition import Condition
16+
from .data import PinaDataModule

pina/adaptive_functions/adaptive_func_interface.py renamed to pina/adaptive_function/adaptive_func_interface.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
class AdaptiveActivationFunctionInterface(torch.nn.Module, metaclass=ABCMeta):
1010
r"""
1111
The
12-
:class:`~pina.adaptive_functions.adaptive_func_interface.AdaptiveActivationFunctionInterface`
12+
:class:`~pina.adaptive_function.adaptive_func_interface.AdaptiveActivationFunctionInterface`
1313
class makes a :class:`torch.nn.Module` activation function into an adaptive
1414
trainable activation function. If one wants to create an adpative activation
1515
function, this class must be use as base class.

pina/callback/__init__.py

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
__all__ = [
2+
"SwitchOptimizer",
3+
"R3Refinement",
4+
"MetricTracker",
5+
"PINAProgressBar",
6+
]
7+
8+
from .optimizer_callback import SwitchOptimizer
9+
from .adaptive_refinment_callback import R3Refinement
10+
from .processing_callback import MetricTracker, PINAProgressBar
File renamed without changes.
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ def __init__(self, new_optimizers, epoch_switch):
1919
2020
:param new_optimizers: The model optimizers to switch to. Can be a
2121
single :class:`torch.optim.Optimizer` or a list of them for multiple
22-
model solvers.
22+
model solver.
2323
:type new_optimizers: pina.optim.TorchOptimizer | list
2424
:param epoch_switch: The epoch at which to switch to the new optimizer.
2525
:type epoch_switch: int
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -87,12 +87,12 @@ def __init__(self, metrics="val", **kwargs):
8787
:Keyword Arguments:
8888
The additional keyword arguments specify the progress bar
8989
and can be choosen from the `pytorch-lightning
90-
TQDMProgressBar API <https://lightning.ai/docs/pytorch/stable/_modules/lightning/pytorch/callbacks/progress/tqdm_progress.html#TQDMProgressBar>`_
90+
TQDMProgressBar API <https://lightning.ai/docs/pytorch/stable/_modules/lightning/pytorch/callback/progress/tqdm_progress.html#TQDMProgressBar>`_
9191
9292
Example:
9393
>>> pbar = PINAProgressBar(['mean'])
9494
>>> # ... Perform training ...
95-
>>> trainer = Trainer(solver, callbacks=[pbar])
95+
>>> trainer = Trainer(solver, callback=[pbar])
9696
"""
9797
super().__init__(**kwargs)
9898
# check consistency

pina/callbacks/__init__.py

Lines changed: 0 additions & 10 deletions
This file was deleted.

pina/condition/input_equation_condition.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ def __setattr__(self, key, value):
2727
if key == 'input_points':
2828
check_consistency(
2929
value, (LabelTensor)
30-
) # for now only labeltensors, we need labels for the operators!
30+
) # for now only labeltensors, we need labels for the operator!
3131
InputPointsEquationCondition.__dict__[key].__set__(self, value)
3232
elif key == 'equation':
3333
check_consistency(value, (EquationInterface))

0 commit comments

Comments
 (0)