ray.tune.SyncConfig#
- class ray.tune.SyncConfig(sync_period: int = 300, sync_timeout: int = 1800, sync_artifacts: bool = False, sync_artifacts_on_checkpoint: bool = True)[source]#
Bases:
SyncConfig
Configuration object for Tune file syncing to
RunConfig(storage_path)
.In Ray Tune, here is where syncing (mainly uploading) happens:
The experiment driver (on the head node) syncs the experiment directory to storage (which includes experiment state such as searcher state, the list of trials and their statuses, and trial metadata).
It’s also possible to sync artifacts from the trial directory to storage by setting
sync_artifacts=True
. For a Ray Tune run with many trials, each trial will upload its trial directory to storage, which includes arbitrary files that you dumped during the run.- Parameters:
sync_period – Minimum time in seconds to wait between two sync operations. A smaller
sync_period
will have the data in storage updated more often but introduces more syncing overhead. Defaults to 5 minutes.sync_timeout – Maximum time in seconds to wait for a sync process to finish running. A sync operation will run for at most this long before raising a
TimeoutError
. Defaults to 30 minutes.sync_artifacts – [Beta] Whether or not to sync artifacts that are saved to the trial directory (accessed via
ray.tune.get_context().get_trial_dir()
) to the persistent storage configured viatune.RunConfig(storage_path)
. The trial or remote worker will try to launch an artifact syncing operation every timetune.report
happens, subject tosync_period
andsync_artifacts_on_checkpoint
. Defaults to False – no artifacts are persisted by default.sync_artifacts_on_checkpoint – If True, trial/worker artifacts are forcefully synced on every reported checkpoint. This only has an effect if
sync_artifacts
is True. Defaults to True.
PublicAPI (beta): This API is in beta and may change before becoming stable.
Methods
Attributes