Skip to content

Commit

Permalink
Merge pull request #75 from Oxid15/torch_model_update
Browse files Browse the repository at this point in the history
TorchModel now has graph description in meta
  • Loading branch information
Oxid15 authored Jul 30, 2022
2 parents 8bd1dc6 + 580208a commit 2372418
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 2372418

Please sign in to comment.