Artifact | R Documentation |
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.
new()
Creates new Artifact
object with provided parameters. After that,
the Artifact
object can be used to save assets and can be logged
with an Experiment
.
Artifact$new( artifact_name, artifact_type, artifact_version = NULL, aliases = NULL, metadata = NULL, version_tags = NULL )
artifact_name
(Required) Artifact name.
artifact_type
(Required) The artifact type, for example 'dataset'.
artifact_version
The version number to create. If not provided, a new version number will be created automatically.
aliases
List of aliases. Some aliases to attach to the future Artifact Version. The aliases list is normalized to remove duplicates.
metadata
Some additional meta-data to attach to the future Artifact Version.
version_tags
List of tags to be attached to the future Artifact Version.
get_artifact_name()
Get the name of the artifact.
Artifact$get_artifact_name()
get_artifact_type()
Get the type of the artifact.
Artifact$get_artifact_type()
get_artifact_version()
Get the version of the artifact.
Artifact$get_artifact_version()
get_aliases()
Get the version of the artifact.
Artifact$get_aliases()
get_metadata()
Get the metadata of the artifact.
Artifact$get_metadata()
get_version_tags()
Get the list of tags of the artifact version.
Artifact$get_version_tags()
get_assets()
Get the list of assets of the artifact version.
Artifact$get_assets()
add()
Add a local asset to the current pending artifact object.
Artifact$add( local_path, overwrite = FALSE, logical_path = NULL, metadata = NULL )
local_path
(Required) Either a file/directory path of the files you want to log
overwrite
If TRUE
will overwrite all existing assets with the same name.
logical_path
A custom file name to be displayed. If not
provided the file name from the local_path
argument will be used.
metadata
Some additional data to attach to the asset.
add_remote()
Add a remote asset to the current pending artifact object. A Remote Asset is an asset but its content is not uploaded and stored on Comet. Rather a link for its location is stored so you can identify and distinguish between two experiment using different version of a dataset stored somewhere else.
Artifact$add_remote( uri, logical_path = NULL, overwrite = FALSE, metadata = NULL )
uri
(Required) The remote asset location, there is no imposed format and it could be a private link.
logical_path
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.
add_asset()
Adds an initialized ArtifactAsset
object to this Artifact.
Artifact$add_asset(asset)
asset
The initialized ArtifactAsset
object
## Not run:
library(cometr)
# Assuming you have COMET_API_KEY, COMET_WORKSPACE, COMET_PROJECT_NAME variables define
exp <- create_experiment()
# Create a Comet Artifact
artifact <- Artifact$new(artifact_name = "Artifact-Name", artifact_type = "Artifact-Type")
artifact$add("local-file")
exp$log_artifact(artifact)
exp$stop()
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.