hespas.estimator.run_config

Classes

EstimatorRunConfig(*[, config_dict, ...])

Configuration object that holds the configuration options required for an Estimator run.

EstimatorSingleRunConfig(*[, config_dict, ...])

Configuration object that holds the configuration options required for a single Estimator run with a single mlir file.

class hespas.estimator.run_config.EstimatorRunConfig(*, config_dict: dict | None = None, config_file: str | Path | None = None, disable_cache: bool | None = None, cache_dir: str | Path | None = None, **kwargs)

Bases: object

Configuration object that holds the configuration options required for an Estimator run. Generated from a configuration file, or directly through arguments.

Parameters:
  • config_dict – Configuration dictionary for the specified estimator. Optional, and will override the configuration loaded from file

  • config_file – Path for a configuration file for the run. Optional, and will be overriden by any other specified options.

  • disable_cache – Disables the cache for the estimator. Useful for debugging. Will override the setting in either the dict or file

  • cache_dir – Path to the directory to use for the cache. Optional, will override the setting in either the dict or file.

  • kwargs – Additional override arguments to the estimator. Optional, will override anything else.

__init__(*, config_dict: dict | None = None, config_file: str | Path | None = None, disable_cache: bool | None = None, cache_dir: str | Path | None = None, **kwargs)
to_hw_config() dict[str, Any]

Returns a hardware configuration dictionary that be directly fed into the Estimator’s initialisation call

Returns:

Estimator hardware config dictionary

class hespas.estimator.run_config.EstimatorSingleRunConfig(*, config_dict: dict | None = None, config_file: str | Path | None = None, mlir_file: str | Path | None = None, disable_cache: bool | None = None, cache_dir: str | Path | None = None, **kwargs)

Bases: EstimatorRunConfig

Configuration object that holds the configuration options required for a single Estimator run with a single mlir file. Generated from a configuration file, or directly through arguments.

Parameters:
  • config_dict – Configuration dictionary for the specified estimator. Optional, and will override the configuration loaded from file

  • config_file – Path for a configuration file for the run. Optional, and will be overriden by any other specified options.

  • mlir_file – Path for the mlir file for the run. Optional, and will be overriden by any other specified options.

  • disable_cache – Disables the cache for the estimator. Useful for debugging. Will override the setting in either the dict or file

  • cache_dir – Path to the directory to use for the cache. Optional, will override the setting in either the dict or file.

  • kwargs – Additional override arguments to the estimator. Optional, will override anything else.

__init__(*, config_dict: dict | None = None, config_file: str | Path | None = None, mlir_file: str | Path | None = None, disable_cache: bool | None = None, cache_dir: str | Path | None = None, **kwargs)