mlos_bench.config.schemas.config_schemas
A simple class for describing where to find different json config schemas and validating configs against them.
Used by the Launcher
and
ConfigPersistenceService
to
validate configs on load.
Notes
See mlos_bench/config/schemas/README.md for additional documentation in the source tree.
See mlos_bench/config/README.md for additional config examples in the source tree.
Attributes
The local directory where all config schemas shipped as a part of the |
|
Static |
|
The special environment flag to set to skip schema validation when "true". |
Classes
An enum to help describe schema types and help validate configs against them. |
|
A simple class for storing schemas and subschemas for the validator to |
Module Contents
- class mlos_bench.config.schemas.config_schemas.ConfigSchema(*args, **kwds)[source]
Bases:
enum.Enum
An enum to help describe schema types and help validate configs against them.
- validate(config: dict) None [source]
Validates the given config against this schema.
- Parameters:
config (dict) – The config to validate.
- Raises:
jsonschema.exceptions.ValidationError – On validation failure.
jsonschema.exceptions.SchemaError – On schema loading error.
- Return type:
None
- CLI = b''[source]
Json config schema for
mlos_bench
CLI configuration.See also
mlos_bench.config
documentation on the configuration system.
mlos_bench.launcher.Launcher
class is responsible for processing the CLI args.
- ENVIRONMENT = b''[source]
Json config schema for
environments
.
- GLOBALS = b''[source]
Json config schema for
global variables
.
- OPTIMIZER = b''[source]
Json config schema for
optimizers
.
- SCHEDULER = b''[source]
Json config schema for
schedulers
.
- TUNABLE_VALUES = b''[source]
Json config schema for values of
TunableGroups
instances.These can be used to specify the values of the tunables for a given experiment using the
OneShotOptimizer
for instance.
- class mlos_bench.config.schemas.config_schemas.SchemaStore[source]
Bases:
Mapping
A simple class for storing schemas and subschemas for the validator to reference.
- property registry: referencing.Registry[source]
Returns a Registry object with all the schemas loaded.
- Return type:
- mlos_bench.config.schemas.config_schemas.CONFIG_SCHEMA_DIR = b''[source]
The local directory where all config schemas shipped as a part of the
mlos_bench
module are stored.
- mlos_bench.config.schemas.config_schemas.SCHEMA_STORE[source]
Static
SchemaStore
instance used for storing and retrieving schemas for config validation.
- mlos_bench.config.schemas.config_schemas.VALIDATION_ENV_FLAG = 'MLOS_BENCH_SKIP_SCHEMA_VALIDATION'[source]
The special environment flag to set to skip schema validation when “true”.
Useful for local development when you’re making a lot of changes to the config or adding new classes that aren’t in the main repo yet.