Skip to content

Commit

Permalink
Add Task.models property
Browse files Browse the repository at this point in the history
  • Loading branch information
allegroai committed Mar 23, 2020
1 parent 0211d23 commit 766c8ab
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions trains/task.py
Original file line number Diff line number Diff line change
Expand Up @@ -458,6 +458,16 @@ def artifacts(self):
artifacts_pairs += list(self._artifacts_manager.registered_artifacts.items())
return ReadOnlyDict(artifacts_pairs)

@property
def models(self):
# type: () -> Dict[str, List[Model]]
"""
Read-only dictionary of the Task's loaded/stored models
:return: dictionary of models loaded/stored {'input': list(Model), 'output': list(Model)}
"""
return self.get_models()

@classmethod
def clone(cls, source_task=None, name=None, comment=None, parent=None, project=None):
"""
Expand Down

0 comments on commit 766c8ab

Please sign in to comment.