mlos_bench.storage.storage_factory

Factory method to create a new Storage instance from a STORAGE type json config.

See also

mlos_bench.storage

For example usage.

Functions

from_config(→ mlos_bench.storage.base_storage.Storage)

Create a new storage object from JSON5 config file.

Module Contents

mlos_bench.storage.storage_factory.from_config(config: str, global_configs: List[str] | None = None, **kwargs: Any) mlos_bench.storage.base_storage.Storage[source]

Create a new storage object from JSON5 config file.

Parameters:
  • config (str) – JSON5 config file or string to load.

  • global_configs (Optional[List[str]]) – An optional list of config files with global parameters.

  • kwargs (dict) – Additional configuration parameters.

Returns:

storage – A new storage object.

Return type:

Storage