ray.rllib.train.load_experiments_from_file#

ray.rllib.train.load_experiments_from_file(config_file: str, file_type: SupportedFileType, stop: str | None = None, checkpoint_config: dict | None = None) dict[source]#

Load experiments from a file. Supports YAML and Python files.

If you want to use a Python file, it has to have a ‘config’ variable that is an AlgorithmConfig object and - optionally - a stop variable defining the stop criteria.

Parameters:
  • config_file – The yaml or python file to be used as experiment definition. Must only contain exactly one experiment.

  • file_type – One value of the SupportedFileType enum (yaml or python).

  • stop – An optional stop json string, only used if file_type is python. If None (and file_type is python), will try to extract stop information from a defined stop variable in the python file, otherwise, will use {}.

  • checkpoint_config – An optional checkpoint config to add to the returned experiments dict.

Returns:

The experiments dict ready to be passed into tune.run_experiments().

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