Skip to content

Conversation

@JBWilkie
Copy link
Contributor

@JBWilkie JBWilkie commented Aug 27, 2024

Problem

When importing annotations, if any class needs to be created or assigned to the target dataset (not just masks), no raster layer annotations are actually imported

This is because if this happens, we create / update the classes as needed, then we re-fetch them here

The problem is when we re-fetch the classes, we only fetch classes assigned to the dataset with dataset.fetch_remote_classes()

Previously we were looking at team-wide classes with dataset.fetch_remote_classes(team_wide=True). It seems that the __raster_layer__ class is never assigned to any dataset. This is a problem because despite containing the actual annotation data, it's not assigned to the dataset so we skip importing it

Solution

Always return the __raster_layer__ class when fetching remote classes, because it's always available in every dataset

Changelog

Remove the need for a 2nd import to import mask annotations when classes are created or updated during import

@linear
Copy link

linear bot commented Aug 27, 2024

@JBWilkie JBWilkie merged commit fe582c8 into master Aug 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants