ray.train.v2.api.context.TrainContext#

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

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

[Deprecated] 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

[Deprecated] Log directory corresponding to the trial directory for a Tune session.

get_trial_id

[Deprecated] Trial id for the corresponding trial.

get_trial_name

[Deprecated] Trial name for the corresponding trial.

get_trial_resources

[Deprecated] 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.