mlos_bench.environments.remote.os_env
=====================================

.. py:module:: mlos_bench.environments.remote.os_env

.. autoapi-nested-parse::

   OS-level remote Environment on Azure.



Classes
-------

.. autoapisummary::

   mlos_bench.environments.remote.os_env.OSEnv


Module Contents
---------------

.. py:class:: OSEnv(*, 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)

   Bases: :py:obj:`mlos_bench.environments.base_environment.Environment`


   OS Level Environment for a host.

   Create a new environment for remote execution.

   :param name: Human-readable name of the environment.
   :type name: str
   :param config: Free-format dictionary that contains the benchmark environment
                  configuration. Each config must have at least the "tunable_params"
                  and the "const_args" sections.
                  `RemoteEnv` must also have at least some of the following parameters:
                  {setup, run, teardown, wait_boot}
   :type config: dict
   :param global_config: Free-format dictionary of global parameters (e.g., security credentials)
                         to be mixed in into the "const_args" section of the local config.
   :type global_config: dict
   :param tunables: A collection of tunable parameters for *all* environments.
   :type tunables: TunableGroups
   :param service: An optional service object (e.g., providing methods to
                   deploy or reboot a VM, etc.).
   :type service: Service


   .. py:method:: setup(tunables: mlos_bench.tunables.tunable_groups.TunableGroups, global_config: dict | None = None) -> bool

      Check if the host is up and running; boot it, if necessary.

      :param tunables: A collection of groups of tunable parameters along with the
                       parameters' values. HostEnv tunables are variable parameters that,
                       together with the HostEnv configuration, are sufficient to provision
                       and start a host.
      :type tunables: TunableGroups
      :param global_config: Free-format dictionary of global parameters of the environment
                            that are not used in the optimization process.
      :type global_config: dict

      :returns: **is_success** -- True if operation is successful, false otherwise.
      :rtype: bool



   .. py:method:: teardown() -> None

      Clean up and shut down the host without deprovisioning it.