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.ResourceAsset
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
|
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. |
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
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
Azure SDK for Python