mlos_bench.config.schemas.config_schemas module¶
A simple class for describing where to find different config schemas and validating configs against them.
- class mlos_bench.config.schemas.config_schemas.ConfigSchema(value, names=None, *, module=None, qualname=None, type=None, start=1, boundary=None)¶
Bases:
Enum
An enum to help describe schema types and help validate configs against them.
- CLI = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/cli/cli-schema.json'¶
- ENVIRONMENT = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/environments/environment-schema.json'¶
- GLOBALS = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/cli/globals-schema.json'¶
- OPTIMIZER = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/optimizers/optimizer-schema.json'¶
- SCHEDULER = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/schedulers/scheduler-schema.json'¶
- SERVICE = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/services/service-schema.json'¶
- STORAGE = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/storage/storage-schema.json'¶
- TUNABLE_PARAMS = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/tunables/tunable-params-schema.json'¶
- TUNABLE_VALUES = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/tunables/tunable-values-schema.json'¶
- UNIFIED = '/workspaces/MLOS/mlos_bench/mlos_bench/config/schemas/mlos-bench-config-schema.json'¶
- property schema: dict¶
Gets the schema object for this type.
- validate(config: dict) None ¶
Validates the given config against this schema.
- Parameters:
- configdict
The config to validate.
- Raises:
- jsonschema.exceptions.ValidationError
- jsonschema.exceptions.SchemaError
- class mlos_bench.config.schemas.config_schemas.SchemaStore¶
Bases:
Mapping
A simple class for storing schemas and subschemas for the validator to reference.
- Attributes:
registry
Returns a Registry object with all the schemas loaded.
Methods
get
(k[,d])items
()keys
()values
()- property registry: Registry¶
Returns a Registry object with all the schemas loaded.