public interface Artifact
Comet Artifacts allow keeping track of assets beyond any particular experiment. You can keep track of Artifact versions, create many types of assets, manage them, and use them in any step in your ML pipelines - from training to production deployment.
Artifacts live in a Comet Project, are identified by their name and version string number.
| Modifier and Type | Method and Description |
|---|---|
void |
addAsset(byte[] data,
String logicalPath) |
void |
addAsset(byte[] data,
String logicalPath,
boolean overwrite) |
void |
addAsset(byte[] data,
String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
Adds a local asset data to the current pending artifact object.
|
void |
addAsset(File file,
boolean overwrite) |
void |
addAsset(File file,
boolean overwrite,
Map<String,Object> metadata) |
void |
addAsset(File file,
String logicalPath,
boolean overwrite) |
void |
addAsset(File file,
String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
Adds a local asset file to the current pending artifact object.
|
void |
addAssetFolder(File folder) |
void |
addAssetFolder(File folder,
boolean logFilePath) |
void |
addAssetFolder(File folder,
boolean logFilePath,
boolean recursive) |
void |
addAssetFolder(File folder,
boolean logFilePath,
boolean recursive,
Map<String,Object> metadata)
Adds all asset files located in the given folder to this artifact.
|
void |
addRemoteAsset(URI uri,
String logicalPath) |
void |
addRemoteAsset(URI uri,
String logicalPath,
boolean overwrite) |
void |
addRemoteAsset(URI uri,
String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
Adds remote asses to the current pending artifact object.
|
Collection<ArtifactAsset> |
getAssets()
Returns assets associated with this artifact.
|
static ArtifactBuilder |
newArtifact(@NonNull String name,
@NonNull String type)
Creates new
ArtifactBuilder instance which can be used to create properly initialized instances of the
Artifact. |
void addAsset(File file, String logicalPath, boolean overwrite, Map<String,Object> metadata) throws ConflictingArtifactAssetNameException
file - the path to the file asset.logicalPath - the custom asset's file name to be displayed. If not
provided the filename from the file argument will be used.overwrite - if true will overwrite all existing assets with the same name.metadata - Some additional data to attach to the asset. Must be a map with JSON-encodable values.ConflictingArtifactAssetNameException - is name of the asset is not unique within this artifact.void addAsset(File file, boolean overwrite, Map<String,Object> metadata) throws ConflictingArtifactAssetNameException
void addAsset(File file, String logicalPath, boolean overwrite) throws ConflictingArtifactAssetNameException
void addAsset(File file, boolean overwrite) throws ConflictingArtifactAssetNameException
void addAsset(byte[] data,
String logicalPath,
boolean overwrite,
Map<String,Object> metadata)
throws ConflictingArtifactAssetNameException
data - the data of the asset.logicalPath - the custom asset's file name to be displayed.overwrite - if true will overwrite all existing assets with the same name.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.ConflictingArtifactAssetNameException - is name of the asset is not unique within this artifact.void addAsset(byte[] data,
String logicalPath,
boolean overwrite)
throws ConflictingArtifactAssetNameException
void addAsset(byte[] data,
String logicalPath)
throws ConflictingArtifactAssetNameException
void addRemoteAsset(URI uri, String logicalPath, boolean overwrite, Map<String,Object> metadata) throws ConflictingArtifactAssetNameException
uri - the URI pointing to the location of the remote asset.logicalPath - the "name" of the remote asset, could be a dataset name, a model file name.overwrite - if true will overwrite all existing assets with the same name.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.ConflictingArtifactAssetNameException - is name of the asset is not unique within this artifact.void addRemoteAsset(URI uri, String logicalPath, boolean overwrite) throws ConflictingArtifactAssetNameException
void addRemoteAsset(URI uri, String logicalPath) throws ConflictingArtifactAssetNameException
void addAssetFolder(File folder, boolean logFilePath, boolean recursive, Map<String,Object> metadata) throws ConflictingArtifactAssetNameException, IOException
folder - the folder you want to log.logFilePath - if true, logs the relative file path of each file.recursive - if true, recurse the folder.metadata - some additional data to attach to the asset. Must be a map with JSON-encodable values.ConflictingArtifactAssetNameException - is name of some asset is not unique within this artifact.IOException - if an I/O exception occurred when walking through the folder.void addAssetFolder(File folder, boolean logFilePath, boolean recursive) throws ConflictingArtifactAssetNameException, IOException
void addAssetFolder(File folder, boolean logFilePath) throws ConflictingArtifactAssetNameException, IOException
void addAssetFolder(File folder) throws ConflictingArtifactAssetNameException, IOException
Collection<ArtifactAsset> getAssets()
static ArtifactBuilder newArtifact(@NonNull @NonNull String name, @NonNull @NonNull String type)
ArtifactBuilder instance which can be used to create properly initialized instances of the
Artifact.name - the name of the artifact.type - the type of the artifact. Typical artifact types could be "dataset", "image", "training-data",
"validation-data", "testing-data", etc.ArtifactBuilder instance to create properly initialized instances of the Artifact.Copyright © 2022. All rights reserved.