This is part of our commercial offering.
Polyaxon provides a caching layer for operation executions, this behavior is enabled by default for all runs executed in the context of a DAG, a hyperparameter tuning, or a mapping.
When runs are cached their outputs will be reused for future runs with similar inputs and component version.
- disable: bool, optional, default: False
- ttl: int, optional
- io: List[str], optional
cache: disable: ttl: inputs:
from polyaxon.polyflow import V1Cache cache = V1Cache( disable=False, ttl=3600, io=['param1', 'param4'] )
Caching is enabled by default, if you want to disable the cache
for a component or just for a specific component run, you can set this field to
cache: disable: true
the default caching behavior is to persist and reuse a run's results everytime a new operation with similar characteristics is scheduled to run.
In order to invalidate the cache after a certain period of time you can define a time to live value.
cache: ttl: 36000 # 10 hours
You may want to discard an input/output from being considered for the cache state calculation, or you may want to cache a component's run irrespective of the params you pass to some io.
This field gives you full control to define how you want to calculate the cache state.
cache: io: ['param1', 'param4']