msticpy.init.azure_ml_tools module

Checker functions for Azure ML notebooks.

msticpy.init.azure_ml_tools.check_aml_settings(min_py_ver: str | Tuple = '3.10.0', min_mp_ver: str | Tuple = '2.12.0', extras: List[str] | None = None, mp_release: str | None = None, **kwargs)

Check the current versions of the Python kernel and MSTICPy.

Parameters:
  • min_py_ver (Union[Tuple[int, int], str]) – Minimum Python version

  • min_mp_ver (Union[Tuple[int, int], str]) – Minimum MSTICPy version

  • extras (Optional[List[str]], optional) – A list of extras required for MSTICPy

  • mp_release (Optional[str], optional) – Override the MSTICPy release version. This can also be specified in the environment variable ‘MP_TEST_VER’

Raises:

RuntimeError – If the Python version does not support the notebook. If the MSTICPy version does not support the notebook and the user chose not to upgrade

msticpy.init.azure_ml_tools.check_mp_ver(min_msticpy_ver: str | Tuple, extras: List[str] | None)

Check and optionally update the current version of msticpy.

Parameters:
  • min_msticpy_ver (Tuple[int, int]) – Minimum MSTICPy version

  • extras (Optional[List[str]], optional) – A list of extras required for MSTICPy

Raises:

ImportError – If MSTICPy version is insufficient and we need to upgrade

msticpy.init.azure_ml_tools.check_python_ver(min_py_ver: str | Tuple = '3.10.0')

Check the current version of the Python kernel.

Parameters:

min_py_ver (Tuple[int, int]) – Minimum Python version

Raises:

RuntimeError – If the Python version does not support the notebook.

msticpy.init.azure_ml_tools.check_versions(min_py_ver: str | Tuple = '3.10.0', min_mp_ver: str | Tuple = '2.12.0', extras: List[str] | None = None, mp_release: str | None = None, **kwargs)

Check the current versions of the Python kernel and MSTICPy.

Parameters:
  • min_py_ver (Union[Tuple[int, int], str]) – Minimum Python version

  • min_mp_ver (Union[Tuple[int, int], str]) – Minimum MSTICPy version

  • extras (Optional[List[str]], optional) – A list of extras required for MSTICPy

  • mp_release (Optional[str], optional) – Override the MSTICPy release version. This can also be specified in the environment variable ‘MP_TEST_VER’

Raises:

RuntimeError – If the Python version does not support the notebook. If the MSTICPy version does not support the notebook and the user chose not to upgrade

msticpy.init.azure_ml_tools.get_aml_user_folder() Path | None

Return the root of the user folder.

msticpy.init.azure_ml_tools.is_in_aml()

Return True if running in Azure Machine Learning.

msticpy.init.azure_ml_tools.is_in_aml_pyspark()

Return True if running in Spark on Azure Machine Learning.

msticpy.init.azure_ml_tools.populate_config_to_mp_config(mp_path)

Populate new or existing msticpyconfig with settings from config.json.