2021-01-22

New Features

Updating Label Class Maps

Label Class Maps have been usually immutable once attached or created for a Project. Most changes to the existing Labels cause all sorts of issues in metrics calculations for existing Dataset or Inference Set.
Now, we support append-only updates to Label Class Maps.
Before, your code would look like below...
1
import aquariumlearning as al
2
label_class_map = al.LabelClassMap(entries=[
3
al.ClassMapEntry(name="car", class_id=0),
4
al.ClassMapEntry(name="van", class_id=1),
5
al.ClassMapEntry(name="truck", class_id=2)
6
])
7
​
8
al_client = al.Client()
9
​
10
if not al_client.project_exists(aquarium_project):
11
print("Creating Project")
12
al_client.create_project(aquarium_project, label_class_map)
Copied!
Now, we can update the Label Class Map by calling create_project on an existing project with the new Label Class Map
1
import aquariumlearning as al
2
label_class_map = al.LabelClassMap(entries=[
3
al.ClassMapEntry(name="car", class_id=0),
4
al.ClassMapEntry(name="van", class_id=1),
5
al.ClassMapEntry(name="truck", class_id=2),
6
al.ClassMapEntry(name="pedestrian", class_id=3) # New APPEND-ONLY Label Class
7
])
8
​
9
al_client = al.Client()
10
​
11
print("Updating Project")
12
al_client.create_project(aquarium_project, label_class_map)
Copied!
As a reminder, this update flow will only support append-only changes.

Additional Client-side Checks

We've added error checking for a few common issues encountered in the data processing pipeline. These errors would usually take ~10 minutes to surface since they are part of the batched processing step. We now added an option to check for common error cases on the first frame locally before submitting, which should surface errors in seconds.
To enable, run create_dataset with check_first_frame=True. This will check for errors, then exit without creating the dataset.
1
al_client.create_dataset(
2
aquarium_project, aquarium_dataset, dataset=dataset,
3
wait_until_finish=True, embedding_distance_metric='cosine',
4
check_first_frame=True
5
)
Copied!
Specifically, this checks the accessibility of image URLs from Aquarium servers as well as your local machine.
  1. 1.
    If the URL is formatted incorrectly, not a GS, HTTP, or HTTPS URL, returns an "invalid URL" error.
  2. 2.
    If the URL is valid but inaccessible from both, it will return an "inaccessible URL" error.
  3. 3.
    If the URL is valid, but accessible only from the local client, anonymous mode is assumed. In anonymous mode, Aquarium does not have access to the raw images, so we cannot compute embeddings. If no embeddings are provided, we return an error.
Hopefully, this will help speed up iteration on data integration!

App Improvements

Last modified 8mo ago