Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Fixes ReadTheDocs build (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
ethanwharris authored Jun 21, 2021
1 parent 41630a4 commit 40fc879
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions flash/core/model.py
Original file line number Diff line number Diff line change
Expand Up @@ -91,9 +91,11 @@ def __new__(mcs, *args, **kwargs):
result = ABCMeta.__new__(mcs, *args, **kwargs)
if result.required_extras is not None:
result.__init__ = _requires_extras(result.required_extras)(result.__init__)
result.load_from_checkpoint = classmethod(
_requires_extras(result.required_extras)(result.load_from_checkpoint.__func__)
)
load_from_checkpoint = getattr(result, "load_from_checkpoint", None)
if load_from_checkpoint is not None:
result.load_from_checkpoint = classmethod(
_requires_extras(result.required_extras)(result.load_from_checkpoint.__func__)
)
return result


Expand Down

0 comments on commit 40fc879

Please sign in to comment.