ray.train.sklearn.SklearnCheckpoint
ray.train.sklearn.SklearnCheckpoint#
- class ray.train.sklearn.SklearnCheckpoint(local_path: Optional[Union[str, os.PathLike]] = None, data_dict: Optional[dict] = None, uri: Optional[str] = None)[source]#
Bases:
ray.air.checkpoint.CheckpointA
Checkpointwith sklearn-specific functionality.Create this from a generic
Checkpointby callingSklearnCheckpoint.from_checkpoint(ckpt)PublicAPI (alpha): This API is in alpha and may change before becoming stable.
Methods
__init__([local_path, data_dict, uri])DeveloperAPI: This API may change across minor Ray releases.
Return checkpoint directory path in a context.
from_bytes(data)Create a checkpoint from the given byte string.
from_checkpoint(other)Create a checkpoint from a generic
ray.air.checkpoint.Checkpoint.from_dict(data)Create checkpoint object from dictionary.
from_directory(path)Create checkpoint object from directory.
from_estimator(estimator, *, path[, ...])Create a
Checkpointthat stores an sklearnEstimator.from_uri(uri)Create checkpoint object from location URI (e.g.
Retrieve the
Estimatorstored in this checkpoint.Return tuple of (type, data) for the internal representation.
Return the saved preprocessor, if one exists.
set_preprocessor(preprocessor)Saves the provided preprocessor to this Checkpoint.
to_bytes()Return Checkpoint serialized as bytes object.
to_dict()Return checkpoint data as dictionary.
to_directory([path])Write checkpoint data to directory.
to_uri(uri)Write checkpoint data to location URI (e.g.
Attributes
Return path to checkpoint, if available.
Return checkpoint URI, if available.