Skip to content

Commit

Permalink
Add component cache property
Browse files Browse the repository at this point in the history
  • Loading branch information
kartik4949 committed Aug 13, 2024
1 parent c33f892 commit 3f29b14
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions superduper/components/component.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,6 +85,10 @@ class Component(Leaf):
:param artifacts: A dictionary of artifacts paths and `DataType` objects
:param upstream: A list of upstream components
:param plugins: A list of plugins to be used in the component.
:param cache: (Optional) If set `true` the component will not be cached
during primary job of the component i.e on a distributed
cluster this component will be reloaded on every component
task e.g model prediction.
"""

type_id: t.ClassVar[str] = 'component'
Expand All @@ -95,6 +99,7 @@ class Component(Leaf):
upstream: t.Optional[t.List["Component"]] = None
plugins: t.Optional[t.List["Plugin"]] = None
artifacts: dc.InitVar[t.Optional[t.Dict]] = None
cache: t.Optional[bool] = False

@property
def children(self):
Expand Down

0 comments on commit 3f29b14

Please sign in to comment.