ray.tune.TuneContext#

class ray.tune.TuneContext#

Bases: TrainContext

Context to access metadata within Ray Tune functions.

PublicAPI (beta): This API is in beta and may change before becoming stable.

Methods

__init__

get_experiment_name

Experiment name for the corresponding trial.

get_local_rank

Get the local rank of this worker (rank of the worker on its node).

get_local_world_size

Get the local world size of this node (i.e. number of workers on this node).

get_metadata

get_node_rank

Get the rank of this node.

get_storage

Returns the StorageContext storage context which gives advanced access to the filesystem and paths configured through RunConfig.

get_trial_dir

Log directory corresponding to the trial directory for a Tune session.

get_trial_id

Trial id for the corresponding trial.

get_trial_name

Trial name for the corresponding trial.

get_trial_resources

Trial resources for the corresponding trial.

get_world_rank

Get the world rank of this worker.

get_world_size

Get the current world size (i.e. total number of workers) for this run.