PythonSection 类

定义要在目标计算上用于运行的 Python 环境和解释器。

此类在 Environment 类中使用。

类 PythonSection 构造函数。

继承
azureml._base_sdk_common.abstract_run_config_element._AbstractRunConfigElement
PythonSection

构造函数

PythonSection(**kwargs)

变量

user_managed_dependencies
bool

指示 Azure 机器学习是否重复使用现有的 Python 环境。

如果设置为 True,需要确保自己选择用来运行脚本的 Python 环境中包含所有必需包。 如果为 false(默认值),Azure 将基于 conda 依赖项规范创建 Python 环境。 环境只生成一次,并在后续执行中重复使用,前提是 conda 依赖项保持不变。

interpreter_path
str

Python 解释器路径。 仅当 user_managed_dependencies=True 时才使用此参数。 默认值为 "python"。

conda_dependencies
CondaDependencies

Conda 依赖项。

属性

conda_dependencies_file

已弃用。 要用于此运行的 conda 依赖项文件的路径。

使用 <xref:azureml.core.environment.PythonSection.from_existing_conda_environment>。