Skip to content

Commit

Permalink
TorchModel now has graph description in meta
Browse files Browse the repository at this point in the history
  • Loading branch information
Oxid15 committed Jul 29, 2022
1 parent 375894a commit 580208a
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions cascade/utils/torch_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,3 +34,8 @@ def save(self, path, *args, **kwargs) -> None:
def load(self, path, *args, **kwargs) -> None:
with open(path, 'rb') as f:
self._model = torch.load(f)

def get_meta(self):
meta = super().get_meta()
meta[-1]['module'] = repr(self._model)
return meta

0 comments on commit 580208a

Please sign in to comment.