Locate or create a release
Find out how to locate or create a release using our Python SDK
You can download each of the available versions of your data by selecting the download icon. Whenever you create an export in V7, it creates a new export version, which we'll be referring to here as a "release." Here's a quick refresher of what generating a release looks like in V7:

If you've already generated one or more releases in V7, open up the Terminal if you're a Mac user, or the Command prompt if you're on a PC, and enter the following command to get a list of all of your releases.
darwin dataset releases
From there, you can specify which release you'd like to pull:
release_name = "name_of_export_here"
try:
release = dataset.get_release(release_name)
except NotFound:
print(f"Dataset release {release_name} not found")
You can generate a new release using the snippet below:
dataset.export(release_name)
This release will contain all of the completed images and videos within your dataset. You can also filter for specific classes within your dataset by adding the names of your annotation classes:
dataset.export(release_name, annotation_class_ids=[...])
Once you have generated your release object, it's time to pull that release. This will pull all completed images and videos and their annotations:
dataset.pull(release=release)
Note that there may be a few seconds delays between the exporting and pulling.
Waiting for Release Creation
It may be necessary to factor in the release creation time (typically a few seconds) before attempting to pull the release. Otherwise, you may run into a release not found exception.
You can also copy the pre-populated command above to your clipboard by clicking the copy icon for any release from the GUI:

You can pull just the annotations by adding the only_annotators
argument.
dataset.pull(release=release, only_annotations=True)
If your dataset has multiple folders, you can keep that structure by using the use_folders
argument:
dataset.pull(release=release, use_folders=True)
Finally, if you're exporting video, you can choose to either pull it as a video, or as individual frames. By default, the parameter video_frames
is false, but if it's set as true, your video will be pulled with each frame as its own image:
dataset.pull(release=release, video_frames=True)
The release can also be downloaded using the below line instead of dataset.pull
release.download_zip(Path(f"./{release_name}.zip"))
By putting all the above together, the full code for locating, creating and pulling a release can be found on the recipes page below.
Updated 3 months ago