azure_ml_sdk.utils.asset_manager ================================ .. py:module:: azure_ml_sdk.utils.asset_manager Classes ------- .. autoapisummary:: azure_ml_sdk.utils.asset_manager.AssetManager Module Contents --------------- .. py:class:: AssetManager(ml_client: azure.ai.ml.MLClient, config_dir: str) Manage Azure Machine Learning assets for experiments. .. py:attribute:: ml_client .. py:attribute:: config_dir .. py:attribute:: asset_manager_map .. py:method:: _check_existing_asset(asset_type: str, name: str, version: Optional[str] = 'latest') Check if an asset exists in the workspace. :param asset_type: The type of the asset. :type asset_type: str :param name: The name of the asset. :type name: str :param version: The version of the asset. Defaults to "latest". :type version: str, optional :raises ValueError: If the asset or version does not exist. .. py:method:: _build_environment_from_config(name: str) Build an environment from a config file. :param name: The name of the environment. :type name: str .. py:method:: _build_compute_from_config(name: str) Build a compute from a configuration file. :param name: The name of the compute. :type name: str .. py:method:: check_environment(name: str, version: str = 'latest', build: bool = False) Check an existing environment in the workspace or build a new one from a config. :param name: The name of the environment. :type name: str :param version: The version of the environment. Defaults to 'latest'. :type version: str, optional :param build: If true, builds a new environment using a configuration file. Defaults to False. :type build: bool, optional :raises ValueError: If the specified environment or version does not exist. .. py:method:: check_compute(name: str, build: bool = False) Check an existing compute in the workspace or build a new one from a config. :param name: The name of the compute :type name: str :param build: If true, build a new compute using a configuration file. Defaults to False. :type build: bool, optional :raises ValueError: If the specified compute does not exist. .. py:method:: check_model(name: str, version: str = 'latest') Check an existing model in the workspace. :param name: The name of the model. :type name: str :param version: The version of the model. Defaults to 'latest'. :type version: str :raises ValueError: If the specified model or version does not exist. .. py:method:: check_dataset(name: str, version: str = 'latest') Check an existing dataset in the workspace. :param name: The name of the dataset. :type name: str :param version: The version of the model. Defaults to 'latest'. :type version: str, optional :raises ValueError: If the specified dataset or version does not exist. .. py:method:: validate_assets(assets_dict: dict, build_env: bool, build_compute: bool) Validate a list of assets. Build new ones from config if demanded. :param assets_dict: The dictionary of assets. :type assets_dict: dict :param build_env: If True, build environments from config file. :type build_env: bool :param build_compute: If True, build computes from config file. :type build_compute: bool