ray.tune.Trainable.__init__#

Trainable.__init__(config: Dict[str, Any] = None, logger_creator: Callable[[Dict[str, Any]], Logger] = None, storage: StorageContext | None = None)[source]#

Initialize a Trainable.

Sets up logging and points self.logdir to a directory in which training outputs should be placed.

Subclasses should prefer defining setup() instead of overriding __init__() directly.

Parameters:
  • config – Trainable-specific configuration data. By default will be saved as self.config.

  • logger_creator – (Deprecated) Function that creates a ray.tune.Logger object. If unspecified, a default logger is created.

  • storage – StorageContext object that contains persistent storage paths