Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 2 additions & 5 deletions physicsnemo/core/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,10 +353,7 @@ def _get_class_from_args(cls, arg_dict: Dict[str, Any]) -> type:
_cls = cls

# This works with the importlib.metadata.EntryPoint
# if isinstance(_cls, importlib.metadata.EntryPoint):
if "EntryPoint" in str(type(_cls)):
# I hate myself for this. Somehow, we've got crossvoer pollution from
# importlib_metadata.EntryPoint.
if isinstance(_cls, importlib.metadata.EntryPoint):
_cls = _cls.load()

return _cls
Expand Down Expand Up @@ -384,7 +381,7 @@ def instantiate(cls, arg_dict: Dict[str, Any]) -> "Module":

Examples
--------
>>> from physicsnemo.core.module import Module
>>> from physicsnemo.core.module import Module # doctest: +SKIP
>>> # Define the argument dictionary with the three required keys
>>> arg_dict = {
... '__name__': 'FullyConnected',
Expand Down
2 changes: 0 additions & 2 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -228,8 +228,6 @@ EDMPrecondSR = "physicsnemo.models.diffusion:EDMPrecondSR"
VEPrecond = "physicsnemo.models.diffusion:VEPrecond"
VPPrecond = "physicsnemo.models.diffusion:VPPrecond"
iDDPMPrecond = "physicsnemo.models.diffusion:iDDPMPrecond"
VEPrecond_dfsr_cond = "physicsnemo.models.diffusion:VEPrecond_dfsr_cond"
VEPrecond_dfsr = "physicsnemo.models.diffusion:VEPrecond_dfsr"

# DLWP
DLWP = "physicsnemo.models.dlwp:DLWP"
Expand Down
Loading