standardize module docstring

This commit is contained in:
giovanni
2025-03-14 16:32:19 +01:00
committed by Nicola Demo
parent 0fcb78bc51
commit aea24d0bee
60 changed files with 61 additions and 122 deletions

View File

@@ -1,6 +1,4 @@
"""
Module for the Pina library.
"""
"""Module for the Pina library."""
__all__ = [
"Trainer",

View File

@@ -1,6 +1,4 @@
"""
Adaptive Activation Functions Module.
"""
"""Adaptive Activation Functions Module."""
__all__ = [
"AdaptiveActivationFunctionInterface",

View File

@@ -1,4 +1,4 @@
"""Module for adaptive functions."""
"""Module for the Adaptive Functions."""
import torch
from ..utils import check_consistency

View File

@@ -1,4 +1,4 @@
"""Module for adaptive functions."""
"""Module for the Adaptive Function interface."""
from abc import ABCMeta
import torch

View File

@@ -1,6 +1,4 @@
"""
Old module for adaptive functions. Deprecated in 0.2.0.
"""
"""Old module for adaptive functions. Deprecated in 0.2.0."""
import warnings

View File

@@ -1,3 +1,5 @@
"""Module for the Pina Callbacks."""
__all__ = [
"SwitchOptimizer",
"R3Refinement",

View File

@@ -1,4 +1,4 @@
"""PINA Callbacks Implementations"""
"""Module for the R3Refinement callback."""
import importlib.metadata
import torch

View File

@@ -1,4 +1,4 @@
"""PINA Callbacks Implementations"""
"""Module for the LinearWeightUpdate callback."""
import warnings
from lightning.pytorch.callbacks import Callback

View File

@@ -1,4 +1,4 @@
"""PINA Callbacks Implementations"""
"""Module for the SwitchOptimizer callback."""
from lightning.pytorch.callbacks import Callback
from ..optim import TorchOptimizer

View File

@@ -1,4 +1,4 @@
"""PINA Callbacks Implementations"""
"""Module for the Processing Callbacks."""
import copy
import torch

View File

@@ -1,6 +1,4 @@
"""
Old module for callbacks. Deprecated in 0.2.0.
"""
"""Old module for callbacks. Deprecated in 0.2.0."""
import warnings

View File

@@ -1,6 +1,4 @@
"""
Module for the Collector class.
"""
"""Module for the Collector class."""
from .graph import Graph
from .utils import check_consistency

View File

@@ -1,6 +1,4 @@
"""
Module for importing Conditions objects.
"""
"""Module for PINA Conditions classes."""
__all__ = [
"Condition",

View File

@@ -1,4 +1,4 @@
"""Condition module."""
"""Module for the Condition class."""
import warnings
from .data_condition import DataCondition

View File

@@ -1,6 +1,4 @@
"""
Module that defines the ConditionInterface class.
"""
"""Module for the Condition interface."""
from abc import ABCMeta
from torch_geometric.data import Data

View File

@@ -1,6 +1,4 @@
"""
DataCondition class
"""
"""Module for the DataCondition class."""
import torch
from torch_geometric.data import Data

View File

@@ -1,6 +1,4 @@
"""
DomainEquationCondition class definition.
"""
"""Module for the DomainEquationCondition class."""
from .condition_interface import ConditionInterface
from ..utils import check_consistency

View File

@@ -1,6 +1,4 @@
"""
Module to define InputEquationCondition class and its subclasses.
"""
"""Module for the InputEquationCondition class and its subclasses."""
from torch_geometric.data import Data
from .condition_interface import ConditionInterface

View File

@@ -1,6 +1,4 @@
"""
Module for data data module and dataset.
"""
"""Module for data, data module, and dataset."""
__all__ = ["PinaDataModule", "PinaDataset"]

View File

@@ -1,6 +1,4 @@
"""
Module for the PINA dataset
"""
"""Module for the PINA dataset classes."""
from abc import abstractmethod, ABC
from torch.utils.data import Dataset

View File

@@ -1,6 +1,4 @@
"""
Module to define equations and systems of equations.
"""
"""Module to define equations and systems of equations."""
__all__ = [
"SystemEquation",

View File

@@ -1,4 +1,4 @@
"""Module for the Equation Interface"""
"""Module for the Equation Interface."""
from abc import ABCMeta, abstractmethod

View File

@@ -1,7 +1,4 @@
"""
Old module for geometry related classes and functions.
Deprecated in 0.2.0.
"""
"""Old module for geometry classes and functions. Deprecated in 0.2.0."""
import warnings

View File

@@ -1,6 +1,4 @@
"""
Module to build Graph objects and perform operations on them.
"""
"""Module to build Graph objects and perform operations on them."""
import torch
from torch_geometric.data import Data, Batch

View File

@@ -1,4 +1,4 @@
"""Module for the Loss Interface"""
"""Module for the Loss Interface."""
from abc import ABCMeta, abstractmethod
from torch.nn.modules.loss import _Loss

View File

@@ -1,4 +1,4 @@
"""Module for LpLoss class"""
"""Module for the LpLoss class."""
import torch

View File

@@ -1,4 +1,4 @@
"""Module for PowerLoss class"""
"""Module for the PowerLoss class."""
import torch

View File

@@ -1,4 +1,4 @@
"""Module for the Weighting Interface"""
"""Module for the Weighting Interface."""
from abc import ABCMeta, abstractmethod

View File

@@ -1,6 +1,4 @@
"""
Module for the Neural model classes.
"""
"""Module for the Neural model classes."""
__all__ = [
"FeedForward",

View File

@@ -1,6 +1,4 @@
"""
Module for the building blocks of the neural models.
"""
"""Module for the building blocks of the neural models."""
__all__ = [
"ContinuousConvBlock",

View File

@@ -1,4 +1,4 @@
"""Module for Continuous Convolution class"""
"""Module for the Continuous Convolution class."""
import torch
from .convolution import BaseContinuousConv

View File

@@ -1,4 +1,4 @@
"""Modules for the Embedding blocks."""
"""Modules for the the Embedding blocks."""
import torch
from pina.utils import check_consistency

View File

@@ -1,6 +1,4 @@
"""
Module for the Fourier Neural Operator Block class.
"""
"""Module for the Fourier Neural Operator Block class."""
import torch
from torch import nn

View File

@@ -1,6 +1,4 @@
"""
Module for the Graph Neural Operator Block class.
"""
"""Module for the Graph Neural Operator Block class."""
import torch
from torch_geometric.nn import MessagePassing

View File

@@ -1,6 +1,4 @@
"""
Module to perform integration for continuous convolution.
"""
"""Module to perform integration for continuous convolution."""
import torch

View File

@@ -1,6 +1,4 @@
"""
Module for residual blocks and enhanced linear layers.
"""
"""Module for residual blocks and enhanced linear layers."""
import torch
from torch import nn

View File

@@ -1,6 +1,4 @@
"""
Module for spectral convolution blocks.
"""
"""Module for spectral convolution blocks."""
import torch
from torch import nn

View File

@@ -1,6 +1,4 @@
"""
Module for the Stride class.
"""
"""Module for the Stride class."""
import torch

View File

@@ -1,6 +1,4 @@
"""
Module for utility functions for the convolutional layer.
"""
"""Module for utility functions for the convolutional layer."""
import torch

View File

@@ -1,4 +1,4 @@
"""Module for the DeepONet and MIONet model classes"""
"""Module for the DeepONet and MIONet model classes."""
from functools import partial
import torch

View File

@@ -1,4 +1,4 @@
"""Module for the Feed Forward model class"""
"""Module for the Feed Forward model class."""
import torch
from torch import nn

View File

@@ -1,6 +1,4 @@
"""
Module for the Fourier Neural Operator model class.
"""
"""Module for the Fourier Neural Operator model class."""
import warnings
import torch

View File

@@ -1,6 +1,4 @@
"""
Module for the Graph Neural Operator model class.
"""
"""Module for the Graph Neural Operator model class."""
import torch
from torch.nn import Tanh

View File

@@ -1,6 +1,4 @@
"""
Module for the Kernel Neural Operator model class.
"""
"""Module for the Kernel Neural Operator model class."""
import torch
from ..utils import check_consistency

View File

@@ -1,6 +1,4 @@
"""
Old layers module, deprecated in 0.2.0.
"""
"""Old layers module, deprecated in 0.2.0."""
import warnings

View File

@@ -1,4 +1,4 @@
"""Module for the Multi Feed Forward model class"""
"""Module for the Multi Feed Forward model class."""
from abc import ABC, abstractmethod
import torch

View File

@@ -1,4 +1,4 @@
"""Module for the Spline model class"""
"""Module for the Spline model class."""
import torch
from ..utils import check_consistency

View File

@@ -1,6 +1,4 @@
"""
Old module for operators. Deprecated in 0.2.0.
"""
"""Old module for operators. Deprecated in 0.2.0."""
import warnings

View File

@@ -1,4 +1,4 @@
"""Module for the AbstractProblem class"""
"""Module for the AbstractProblem class."""
from abc import ABCMeta, abstractmethod
from copy import deepcopy

View File

@@ -1,4 +1,4 @@
"""Module for the InverseProblem class"""
"""Module for the InverseProblem class."""
from abc import abstractmethod
import torch

View File

@@ -1,4 +1,4 @@
"""Module for the ParametricProblem class"""
"""Module for the ParametricProblem class."""
from abc import abstractmethod

View File

@@ -1,4 +1,4 @@
"""Module for the SpatialProblem class"""
"""Module for the SpatialProblem class."""
from abc import abstractmethod

View File

@@ -1,4 +1,4 @@
"""Module for the TimeDependentProblem class"""
"""Module for the TimeDependentProblem class."""
from abc import abstractmethod

View File

@@ -1,4 +1,4 @@
"""Module for the physics-informed solvers."""
"""Module for the Physics-Informed solvers."""
__all__ = [
"PINNInterface",

View File

@@ -1,4 +1,4 @@
"""Module for the Physics Informed Neural Network Interface."""
"""Module for the Physics-Informed Neural Network Interface."""
from abc import ABCMeta, abstractmethod
import torch

View File

@@ -1,4 +1,4 @@
"""Module for Self-Adaptive PINN."""
"""Module for the Self-Adaptive PINN solver."""
from copy import deepcopy
import torch

View File

@@ -1,4 +1,4 @@
"""Module for ReducedOrderModelSolver"""
"""Module for the Reduced Order Model solver"""
import torch
from .supervised import SupervisedSolver

View File

@@ -1,4 +1,4 @@
"""Module for the Supervised Solver."""
"""Module for the Supervised solver."""
import torch
from torch.nn.modules.loss import _Loss

View File

@@ -1,6 +1,4 @@
"""
Old module for solvers. Deprecated in 0.2.0 .
"""
"""Old module for solvers. Deprecated in 0.2.0 ."""
import warnings

View File

@@ -1,6 +1,4 @@
"""
Old module for the PINNs solver. Deprecated in 0.2.0.
"""
"""Old module for the PINNs solver. Deprecated in 0.2.0."""
import warnings