mlos_bench.environments.remote.network_env module¶
Network Environment.
- class mlos_bench.environments.remote.network_env.NetworkEnv(*, name: str, config: dict, global_config: dict | None = None, tunables: TunableGroups | None = None, service: Service | None = None)¶
Bases:
Environment
Network Environment.
Used to model creating a virtual network (and network security group), but no real tuning is expected for it … yet.
- Attributes:
parameters
Key/value pairs of all environment parameters (i.e., const_args and tunable_params).
tunable_params
Get the configuration space of the given environment.
Methods
new
(*, env_name, class_name, config[, ...])Factory method for a new environment with a given config.
pprint
([indent, level])Pretty-print the environment configuration.
run
()Execute the run script for this environment.
setup
(tunables[, global_config])Check if network is ready.
status
()Check the status of the benchmark environment.
teardown
()Shut down the Network and releases it.
- setup(tunables: TunableGroups, global_config: dict | None = None) bool ¶
Check if network is ready. Provision, if necessary.
- Parameters:
- tunablesTunableGroups
A collection of groups of tunable parameters along with the parameters’ values. NetworkEnv tunables are variable parameters that, together with the NetworkEnv configuration, are sufficient to provision and start a set of network resources (e.g., virtual network and network security group).
- global_configdict
Free-format dictionary of global parameters of the environment that are not used in the optimization process.
- Returns:
- is_successbool
True if operation is successful, false otherwise.
- teardown() None ¶
Shut down the Network and releases it.