CheckpointConfig#
- class ray.data.checkpoint.interfaces.CheckpointConfig(id_column: str | None = None, checkpoint_path: str | None = None, *, generated_id_column: str | None = None, delete_checkpoint_on_success: bool = True, override_filesystem: pyarrow.fs.FileSystem | None = None, override_backend: CheckpointBackend | None = None, write_num_threads: int = 3, checkpoint_path_partition_filter: PathPartitionFilter | None = None, checkpoint_filter_cls: Type[CheckpointFilter] | None = None, checkpoint_manager_cls: Type[CheckpointManager] | None = None)[source]#
Bases:
objectConfiguration for checkpointing.
- Parameters:
id_column (str | None) – Name of the ID column in the input dataset. ID values must be unique across all rows in the dataset and must persist during all operators.
checkpoint_path (str | None) – Path to store the checkpoint data. It can be a path to a cloud object storage (e.g.
s3://bucket/path) or a file system path. If the latter, the path must be a network-mounted file system (e.g./mnt/cluster_storage/) that is accessible to the entire cluster. If not set, defaults toRAY_DATA_CHECKPOINT_PATH_BUCKET/ray_data_checkpoint.generated_id_column (str | None) – Name of the ID column to generate a row ID for each row. Use this when you don’t have an
id_columnin the input dataset. Currently, only Parquet files based data sources are supported for auto-generated row IDs feature.delete_checkpoint_on_success (bool) – If true, automatically delete checkpoint data when the dataset execution succeeds. Only supported for batch-based backend currently.
override_filesystem (pyarrow.fs.FileSystem | None) – Override the
pyarrow.fs.FileSystemobject used to read/write checkpoint data. Use this when you want to use custom credentials.override_backend (CheckpointBackend | None) – Override the
CheckpointBackendobject used to access the checkpoint backend storage.write_num_threads (int) – Number of threads used to write checkpoint files for completed rows.
checkpoint_path_partition_filter (PathPartitionFilter | None) – Filter for checkpoint files to load during restoration when reading from
checkpoint_path.checkpoint_filter_cls (Type[CheckpointFilter] | None) – Override the
CheckpointFiltersubclass used to filter out already-checkpointed rows during restoration. The class is instantiated once per checkpoint filter actor with(checkpoint_config, checkpoint_ref), wherecheckpoint_refis theObjectRefreturned by the checkpoint manager’sload_checkpoint(by default, a sorted NumPy array of checkpointed IDs). Defaults toNumpyArrayBasedCheckpointFilter.checkpoint_manager_cls (Type[CheckpointManager] | None) – Override the
CheckpointManagersubclass used to load checkpoint data during restoration. The class is instantiated on the driver with(checkpoint_config=..., data_context=...)and itsload_checkpointmust return an(ObjectRef, int)tuple: the ref is passed opaquely tocheckpoint_filter_cls, and the int (size in bytes) feeds the per-actor memory reservation. Typically customized together withcheckpoint_filter_cls. Defaults toIdColumnCheckpointManager.
PublicAPI (beta): This API is in beta and may change before becoming stable.