mlos_bench.environments.remote.network_env
Network Environment.
Classes
| Network Environment. | 
Module Contents
- class mlos_bench.environments.remote.network_env.NetworkEnv(*, name: str, config: dict, global_config: dict | None = None, tunables: mlos_bench.tunables.tunable_groups.TunableGroups | None = None, service: mlos_bench.services.base_service.Service | None = None)[source]
- Bases: - mlos_bench.environments.base_environment.Environment- Network Environment. - Used to model creating a virtual network (and network security group), but no real tuning is expected for it … yet. - Create a new environment for network operations. - Parameters:
- name (str) – Human-readable name of the environment. 
- config (dict) – Free-format dictionary that contains the benchmark environment configuration. Each config must have at least the “tunable_params” and the “const_args” sections. 
- global_config (dict) – Free-format dictionary of global parameters (e.g., security credentials) to be mixed in into the “const_args” section of the local config. 
- tunables (TunableGroups) – A collection of tunable parameters for all environments. 
- service (Service) – An optional service object (e.g., providing methods to deploy a network, etc.). 
 
 - setup(tunables: mlos_bench.tunables.tunable_groups.TunableGroups, global_config: dict | None = None) bool[source]
- Check if network is ready. Provision, if necessary. - Parameters:
- tunables (TunableGroups) – 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_config (dict) – Free-format dictionary of global parameters of the environment that are not used in the optimization process. 
 
- Returns:
- is_success – True if operation is successful, false otherwise. 
- Return type: