-
Notifications
You must be signed in to change notification settings - Fork 68
MODEL-1489: Allow marking Label with "is_benchmark_reference" flag #1718
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
The PR is awaiting for the complementary changes in the BE to be merged/deployed |
29deb0c
to
d1173a4
Compare
Check out this pull request on See visual diffs & provide feedback on Jupyter Notebooks. Powered by ReviewNB |
by_alias=True, | ||
exclude={"uuid"} if annotation_uuid == "None" else None, | ||
) | ||
for k, v in list(res.items()): | ||
if k in IGNORE_IF_NONE and v is None: | ||
del res[k] | ||
if getattr(label, 'is_benchmark_reference'): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
did you try to declare class Label(_CamelCaseMixin)
, I do not think you would need this line
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tend to avoid juggling with mixins because this caused MRO problems in the past. Do you think we can leave it as is?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the way I have it above should prob work, can you try? If it does not work (i.e. test fails etc) we could use your approach, but I rather not have custom serialization if we can avoid it
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
actually, the logic is the following: if there is is_benchmark_reference
attribute set for the label, then all child annotations should have isBenchmarkReferenceLabel
set to True. I don't see how the code above would help to avoid this logic
|
||
from labelbox.data.annotation_types.data import ( | ||
AudioData, | ||
ConversationData, | ||
DicomData, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
why was this removed
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the imports were unused
Description
This PR enables marking import labels with "is_benchmark_reference" flag. Such labels will be set as benchmark references if the target project support "benchmark" quality mode.
https://www.loom.com/share/ccca6e59420b4848b5f146c9fdbe9950
Fixes # (issue)
Type of change
Please delete options that are not relevant.
All Submissions
New Feature Submissions
Changes to Core Features