Store Artifacts
Here we will learn how to store any file that you generate during your
experiment on Picsellia so you and your team can access it anywhere, anytime.
The store method
Storing a file to Picsellia during an experiment is as simple as this:
from picsellia import Client
api_token = 'YOUR TOKEN'
project_name = 'My awesome Project'
client = Client(api_token)
project = client.get_project(project_name)
experiment = project.get_experiment(
name='my_new_experiment'
)
experiment.store('config', 'pipeline.config')
Now you can check that your file has nicely been uploaded on Picsellia.
Arguments
Here are the arguments of the store
method:
name
(string, default="") name of the file as displayed in Picsellia, use it to retrieve your filepath
(string, default=None) the path to the file you want to uploadexperiment_id
(string, default=None) specify the id of your experiment if you have not initialized it earlierzip
(Boolean, default=False), set to True if you need to zip the file or even a directory before upload
The download method
If you need to retrieve and download an asset previously saved to Picsellia, you can use the download
method
config = experiment.get_artifact('config')
config.download('path/to/config')
You can optionally set some parameters when calling this method:
path
, the name of the directory you want to download your file in.large
, if the download fail, try setting this parameter to True to force multipart download.
Updated 12 months ago