mlrl.testbed.experiments.file_path module

Author Michael Rapp (michael.rapp.ml@gmail.com)

Provides classes for representing paths to files.

class mlrl.testbed.experiments.file_path.FilePath(directory: Path, file_name: str, suffix: str | None, context: Context)

Bases: object

The path to a file, data can be written to or read from.

Attributes:

directory: The path to the directory, where the file is located file_name: The name of the file suffix: The suffix of the file (without leading dot) or None, if the suffix is unspecified context: A Context to be used to determine the path

context: Context
directory: Path
file_name: str
resolve(state: ExperimentState) Path

Determines and returns the path to the file to which output data should be written.

Parameters:

state – The state from which the output data has been generated

Returns:

The path to the file to which output data should be written

suffix: str | None