Job Class

Base class for jobs.

This class should not be instantiated directly. Instead, use one of its subclasses.

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: str | None = None, display_name: str | None = None, description: str | None = None, tags: Dict | None = None, properties: Dict | None = None, experiment_name: str | None = None, compute: str | None = None, services: Dict[str, JobService] | None = None, **kwargs: Any)

Parameters

Name Description
name

The name of the job.

default value: None
display_name

The display name of the job.

default value: None
description

The description of the job.

default value: None
tags

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

default value: None
properties

The job property dictionary.

default value: None
experiment_name

The name of the experiment the job will be created under. Defaults to the name of the current directory.

default value: None
services

Information on services associated with the job.

default value: None
compute

Information about the compute resources associated with the job.

default value: None

Keyword-Only Parameters

Name Description
kwargs

A dictionary of additional configuration parameters.

Methods

dump

Dumps the job content into a file in YAML format.

dump

Dumps the job content into a file in YAML format.

dump(dest: str | PathLike | IO, **kwargs: Any) -> None

Parameters

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

The local path or file stream to write the YAML content to. If dest is a file path, a new file will be created. If dest is an open file, the file will be written to directly.

Keyword-Only Parameters

Name Description
kwargs

Additional arguments to pass to the YAML serializer.

Exceptions

Type Description

Raised if dest is a file path and the file already exists.

Raised if dest is an open file and the file is not writable.

Attributes

base_path

The base path of the resource.

Returns

Type Description
str

The base path of the resource.

creation_context

The creation context of the resource.

Returns

Type Description

The creation metadata for the resource.

id

The resource ID.

Returns

Type Description

The global ID of the resource, an Azure Resource Manager (ARM) ID.

log_files

Job output files.

Returns

Type Description

The dictionary of log names and URLs.

status

The status of the job.

Common values returned include "Running", "Completed", and "Failed". All possible values are:

  • NotStarted - This is a temporary state that 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 - On-demand compute is being created for a given job submission.

  • Preparing - The run environment is being prepared and is in one of two stages:

    • Docker image build

    • conda environment setup

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

    while waiting for all the requested nodes to be ready.

  • Running - The job has started to run on the compute target.

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

  • CancelRequested - Cancellation has been requested for the job.

  • Completed - The run has completed successfully. This includes both the user code execution 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

Type Description

Status of the job.

studio_url

Azure ML studio endpoint.

Returns

Type Description

The URL to the job details page.

type

The type of the job.

Returns

Type Description

The type of the job.