Data Class

Data for training and scoring.

Constructor

Data(*, name: str | None = None, version: str | None = None, description: str | None = None, tags: Dict | None = None, properties: Dict | None = None, path: str | None = None, type: str = 'uri_folder', **kwargs: Any)

Parameters

Name Description
kwargs
Required

A dictionary of additional configuration parameters.

Keyword-Only Parameters

Name Description
name
str

Name of the resource.

Default value: None
version
str

Version of the resource.

Default value: None
description
str

Description of the resource.

Default value: None
tags

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

Default value: None
properties

The asset property dictionary.

Default value: None
path
str

The path to the asset on the datastore. This can be local or remote

Default value: None
type
Literal[AssetTypes.URI_FILE, AssetTypes.URI_FOLDER, AssetTypes.MLTABLE]

The type of the asset. Valid values are uri_file, uri_folder, mltable. Defaults to uri_folder.

Default value: uri_folder

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.

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.

path

version

The asset version.

Returns

Type Description
str

The asset version.