Skip to content

Commit

Permalink
bug when torch not installed
Browse files Browse the repository at this point in the history
  • Loading branch information
lferraz committed Mar 12, 2023
1 parent 5a37f08 commit 911a158
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions limbus/core/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
log = logging.getLogger(__name__)


base_class: Type = object
if config.COMPONENT_TYPE == "generic":
base_class: Type = object
pass
elif config.COMPONENT_TYPE == "torch":
try:
base_class = nn.Module
except NameError:
log.error("Torch not installed. Using generic base class.")
else:
base_class = object
log.error("Invalid component type. Using generic base class.")


Expand Down

0 comments on commit 911a158

Please sign in to comment.