Log Artifacts

An artifacts is a local file or a directory. We can log artifacts to remote storage and retrieve later. You can log your data files, serialized optimizer configurations, tokenizer and its metadata as artifact. The remote artifact storage is similar to a file-system dedicated for each run.

While logging artifact, optionaly you can pass an directory path through artifact_path argument. If passed, then the artifact will be stored in the passed directory on the remote storage. Otherwise it is stored at the root path.

import os
import mlfoundry
with open("artifact.txt", "w") as f:
        f.write("hello-world")
client = mlfoundry.get_client()
run = client.create_run(
        project_name="my-classification-project", run_name="svm-with-rbf-kernel"
)
run.log_artifact(
        name="hello-world-file",
        artifact_paths=[mlfoundry.ArtifactPath('artifact.txt', 'a/b/')]
)
run.end()

This is how it looks like on the dashboard.

1128

Artifact Dashboard