AssetMetadataProvider

class fairseq2.assets.AssetMetadataProvider[source]

Bases: ABC

Provides asset metadata.

abstract clear_cache()[source]

Clear any cached asset metadata.

abstract get_metadata(name)[source]

Return the metadata of the specified asset.

Parameters:

name (str) – The name of the asset.

Return type:

Dict[str, Any]

abstract get_names()[source]

Return the names of the assets for which this provider has metadata.

Return type:

List[str]