BackendConfig#

class ray.train.backend.BackendConfig#

Bases: object

Parent class for configurations of training backend.

DeveloperAPI: This API may change across minor Ray releases.

property backend_cls#

The Backend class that sets up this framework on the workers.

property framework#

The training framework this config sets up. None on the base class.

to_dict() → Dict[str, Any][source]#

Returns serializable dictionary representation of the backend config. Subclasses can override this to expose framework-specific configuration.

The fields here are used for state export of the backend config. If a field is not serializable, it should be excluded.

Returns:

A dictionary of the config’s serializable fields. The base class returns an empty dictionary.

Return type:

Dict[str, Any]

property train_func_context#

The context manager class wrapping each worker’s training function.

The base class uses contextlib.nullcontext, which does nothing.