Job Class

Base class for job, can't be instantiated directly.

Inheritance
azure.ai.ml.entities._resource.Resource
Job
azure.ai.ml.entities._job.pipeline._component_translatable.ComponentTranslatableMixin
Job
azure.ai.ml.entities._mixins.TelemetryMixin
Job

Constructor

Job(name: Optional[str] = None, display_name: Optional[str] = None, description: Optional[str] = None, tags: Optional[Dict] = None, properties: Optional[Dict] = None, experiment_name: Optional[str] = None, compute: Optional[str] = None, services: Optional[Dict[str, azure.ai.ml._restclient.v2022_06_01_preview.models._models_py3.JobService]] = None, **kwargs)

Parameters

name
str
default value: None

Name of the resource.

display_name
str
default value: None

Display name of the resource.

description
str
default value: None

Description of the resource.

tags
dict[str, str]
default value: None

Tag dictionary. Tags can be added, removed, and updated.

properties
dict[str, str]
default value: None

The job property dictionary.

experiment_name
str
default value: None

Name of the experiment the job will be created under, if None is provided, experiment will be set to current directory.

services
dict[str, <xref:JobService>]
default value: None

Information on services associated with the job.

compute
str
default value: None

Information on compute resources associated with the job.

kwargs
dict
Required

A dictionary of additional configuration parameters.

Methods

dump

Dump the job content into a file in yaml format.

dump

Dump the job content into a file in yaml format.

dump(*args, dest: Optional[Union[str, os.PathLike, IO]] = None, path: Optional[Union[os.PathLike, str]] = None, **kwargs) -> None

Parameters

dest
<xref:Union>[<xref:PathLike>, str, <xref:IO>[<xref:AnyStr>]]
Required

The destination to receive this job's content. Must be either a path to a local file, or an already-open file stream. If dest is a file path, a new file will be created, and an exception is raised if the file exists. If dest is an open file, the file will be written to directly, and an exception will be raised if the file is not writable.

path
<xref:Union>[str, <xref:Pathlike>]
Required

Deprecated path to a local file as the target, a new file will be created, raises exception if the file exists. It's recommended what you change 'path=' inputs to 'dest='. The first unnamed input of this function will also be treated like a path input.

Attributes

log_files

Job output files.

Returns

Dictionary of log names to url.

Return type

<xref:Optional>[<xref:Dict>[str, str]]

status

Status of the job.

Common values returned include "Running", "Completed", and "Failed".

Note

NotStarted - This is a temporary state client-side Run objects are in before cloud submission.

Starting - The Run has started being processed in the cloud. The caller has a run ID at this point.

Provisioning - Returned when on-demand compute is being created for a given job submission.

Preparing - The run environment is being prepared:

docker image build

conda environment setup

Queued - The job is queued in the compute target. For example, in BatchAI the job is in queued state

while waiting for all the requested nodes to be ready.

Running - The job started to run in the compute target.

Finalizing - User code has completed and the run is in post-processing stages.

CancelRequested - Cancellation has been requested for the job.

Completed - The run completed successfully. This includes both the user code and run

post-processing stages.

Failed - The run failed. Usually the Error property on a run will provide details as to why.

Canceled - Follows a cancellation request and indicates that the run is now successfully cancelled.

NotResponding - For runs that have Heartbeats enabled, no heartbeat has been recently sent.

Returns

Status of the job.

Return type

str

studio_url

Azure ML studio endpoint.

Returns

URL to the job detail page.

Return type

<xref:Optional>[str]

type

Type of the job, supported are 'command' and 'sweep'.

Returns

Type of the job.

Return type

str