你当前正在访问 Microsoft Azure Global Edition 技术文档网站。 如果需要访问由世纪互联运营的 Microsoft Azure 中国技术文档网站,请访问 https://docs.azure.cn。
SparkJobEntry 类
Spark 作业的条目。
- 继承
-
azure.ai.ml.entities._mixins.RestTranslatableMixinSparkJobEntry
构造函数
SparkJobEntry(*, entry: str, type: str = 'SparkJobPythonEntry')
仅限关键字的参数
名称 | 说明 |
---|---|
entry
|
文件或类入口点。 |
type
|
项类型。 接受的值是SparkJobEntryType.SPARK_JOB_FILE_ENTRY或SparkJobEntryType.SPARK_JOB_CLASS_ENTRY。 默认为 SparkJobEntryType.SPARK_JOB_FILE_ENTRY。 默认值: SparkJobPythonEntry
|
示例
正在创建 SparkComponent。
from azure.ai.ml.entities import SparkComponent
component = SparkComponent(
name="add_greeting_column_spark_component",
display_name="Aml Spark add greeting column test module",
description="Aml Spark add greeting column test module",
version="1",
inputs={
"file_input": {"type": "uri_file", "mode": "direct"},
},
driver_cores=2,
driver_memory="1g",
executor_cores=1,
executor_memory="1g",
executor_instances=1,
code="./src",
entry={"file": "add_greeting_column.py"},
py_files=["utils.zip"],
files=["my_files.txt"],
args="--file_input ${{inputs.file_input}}",
base_path="./sdk/ml/azure-ai-ml/tests/test_configs/dsl_pipeline/spark_job_in_pipeline",
)