ray.train.context.TrainContext#

class ray.train.context.TrainContext[source]#

Context for Ray training executions.

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.

get_metadata

User metadata dict passed to the Trainer constructor.

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.