JobResourceConfiguration Class
Job resource configuration class, inherited and extended functionalities from ResourceConfiguration.
- Inheritance
-
azure.ai.ml.entities._mixins.RestTranslatableMixinJobResourceConfigurationazure.ai.ml.entities._mixins.DictMixinJobResourceConfiguration
Constructor
JobResourceConfiguration(*, locations: List[str] | None = None, instance_count: int | None = None, instance_type: str | List | None = None, properties: Properties | Dict | None = None, docker_args: str | None = None, shm_size: str | None = None, max_instance_count: int | None = None, **kwargs: Any)
Keyword-Only Parameters
Name | Description |
---|---|
locations
|
A list of locations where the job can run. |
instance_count
|
The number of instances or nodes used by the compute target. |
instance_type
|
The type of VM to be used, as supported by the compute target. |
properties
|
A dictionary of properties for the job. |
docker_args
|
Extra arguments to pass to the Docker run command. This would override any parameters that have already been set by the system, or in this section. This parameter is only supported for Azure ML compute types. |
shm_size
|
The size of the docker container's shared memory block. This should be in the format of (number)(unit) where the number has to be greater than 0 and the unit can be one of b(bytes), k(kilobytes), m(megabytes), or g(gigabytes). |
max_instance_count
|
The maximum number of instances or nodes used by the compute target. |
kwargs
|
A dictionary of additional configuration parameters. |
Examples
Configuring a CommandJob with a JobResourceConfiguration.
from azure.ai.ml import MpiDistribution
from azure.ai.ml.entities import JobResourceConfiguration
trial = CommandJob(
environment="AzureML-sklearn-1.0-ubuntu20.04-py38-cpu:33",
command="echo hello world",
distribution=MpiDistribution(),
environment_variables={"ENV1": "VAR1"},
resources=JobResourceConfiguration(instance_count=2, instance_type="STANDARD_BLA"),
code="./",
)
Methods
get | |
has_key | |
items | |
keys | |
update | |
values |
get
get(key: Any, default: Any | None = None) -> Any
Parameters
Name | Description |
---|---|
key
Required
|
|
default
|
Default value: None
|
has_key
has_key(k: Any) -> bool
Parameters
Name | Description |
---|---|
k
Required
|
|
items
items() -> list
keys
keys() -> list
update
update(*args: Any, **kwargs: Any) -> None
values
values() -> list
Attributes
properties
The properties of the job.
Returns
Type | Description |
---|---|
<xref:azure.ai.ml.entities._job.job_resource_configuration.Properties>
|
Azure SDK for Python