Asset Class

Base class for asset.

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

Inheritance
azure.ai.ml.entities._resource.Resource
Asset

Constructor

Asset(name: str | None = None, version: str | None = None, description: str | None = None, tags: Dict | None = None, properties: Dict | None = None, **kwargs: Any)

Parameters

Name Description
name

The name of the asset. Defaults to a random GUID.

default value: None
version

The version of the asset. Defaults to "1" if no name is provided, otherwise defaults to autoincrement from the last registered version of the asset with that name. For a model name that has never been registered, a default version will be assigned.

default value: None
description

The description of the resource. Defaults to None.

default value: None
tags

Tag dictionary. Tags can be added, removed, and updated. Defaults to None.

default value: None
properties

The asset property dictionary. Defaults to None.

default value: None

Keyword-Only Parameters

Name Description
kwargs

A dictionary of additional configuration parameters.

Methods

dump

Dump the asset content into a file in YAML format.

dump

Dump the asset 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.

version

The asset version.

Returns

Type Description
str

The asset version.