Compartir a través de


SparkResourceConfiguration Clase

Configuración de recursos de proceso para el componente o el trabajo de Spark.

Herencia
azure.ai.ml.entities._mixins.RestTranslatableMixin
SparkResourceConfiguration
azure.ai.ml.entities._mixins.DictMixin
SparkResourceConfiguration

Constructor

SparkResourceConfiguration(*, instance_type: str | None = None, runtime_version: str | None = None)

Parámetros de palabra clave únicamente

Nombre Description
instance_type

Tipo de máquina virtual que va a usar el destino de proceso.

runtime_version

Versión del entorno de ejecución de Spark.

Ejemplos

Configuración de sparkJob con SparkResourceConfiguration.


   from azure.ai.ml import Input, Output
   from azure.ai.ml.entities._credentials import AmlTokenConfiguration, SparkJob, SparkResourceConfiguration

   spark_job = SparkJob(
       code="./tests/test_configs/spark_job/basic_spark_job/src",
       entry={"file": "./main.py"},
       jars=["simple-1.1.1.jar"],
       identity=AmlTokenConfiguration(),
       driver_cores=1,
       driver_memory="2g",
       executor_cores=2,
       executor_memory="2g",
       executor_instances=2,
       dynamic_allocation_enabled=True,
       dynamic_allocation_min_executors=1,
       dynamic_allocation_max_executors=3,
       name="builder-spark-job",
       experiment_name="builder-spark-experiment-name",
       environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:33",
       inputs={
           "input1": Input(
               type="uri_file", path="azureml://datastores/workspaceblobstore/paths/python/data.csv", mode="direct"
           )
       },
       outputs={
           "output1": Output(
               type="uri_file",
               path="azureml://datastores/workspaceblobstore/spark_titanic_output/titanic.parquet",
               mode="direct",
           )
       },
       resources=SparkResourceConfiguration(instance_type="Standard_E8S_V3", runtime_version="3.2.0"),
   )

Métodos

get
has_key
items
keys
update
values

get

get(key: Any, default: Any | None = None) -> Any

Parámetros

Nombre Description
key
Requerido
default
valor predeterminado: None

has_key

has_key(k: Any) -> bool

Parámetros

Nombre Description
k
Requerido

items

items() -> list

keys

keys() -> list

update

update(*args: Any, **kwargs: Any) -> None

values

values() -> list

Atributos

instance_type_list

instance_type_list = ['standard_e4s_v3', 'standard_e8s_v3', 'standard_e16s_v3', 'standard_e32s_v3', 'standard_e64s_v3']