mlrl.testbed.experiments.output.sinks.sink module

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

Provides classes for implementing sinks, output data may be written to.

class mlrl.testbed.experiments.output.sinks.sink.DatasetFileSink(directory: ~pathlib.Path, suffix: str, options: ~mlrl.util.options.Options = <mlrl.util.options.Options object>, create_directory: bool = False)

Bases: FileSink, ABC

An abstract base class for all sinks that write datasets to a file.

class mlrl.testbed.experiments.output.sinks.sink.FileSink(directory: ~pathlib.Path, suffix: str, options: ~mlrl.util.options.Options = <mlrl.util.options.Options object>, create_directory: bool = False)

Bases: Sink, ABC

An abstract base class for all sinks that write output data to a file.

write_to_sink(state: ExperimentState, output_data: OutputData, **kwargs)

See mlrl.testbed.experiments.output.sinks.sink.Sink.write_to_sink()

class mlrl.testbed.experiments.output.sinks.sink.Sink(options: ~mlrl.util.options.Options = <mlrl.util.options.Options object>)

Bases: ABC

An abstract base class for all sinks, output data may be written to.

abstractmethod write_to_sink(state: ExperimentState, output_data: OutputData, **kwargs)

Must be implemented by subclasses in order to write output data to the sink.

Parameters:
  • state – The state from which the output data has been generated

  • output_data – The output data that should be written to the sink

class mlrl.testbed.experiments.output.sinks.sink.TabularFileSink(directory: ~pathlib.Path, suffix: str, options: ~mlrl.util.options.Options = <mlrl.util.options.Options object>, create_directory: bool = False)

Bases: FileSink, ABC

An abstract base class for all sinks that write tabular output data to a file.