-
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
Merged
Merged
Changes from 14 commits
Commits
Show all changes
17 commits
Select commit
Hold shift + click to select a range
1c866e3
[MODEL-1474] Quality modes as list
kozikkamil d469a20
:art: Cleaned
github-actions[bot] 3336e2b
:memo: README updated
github-actions[bot] 4fe10b2
Backwards compatible interface
kozikkamil 13c3f6a
Change comparison
kozikkamil bb7cf4e
Merge develop
kozikkamil 79e9c76
Develop fix
kozikkamil 0d714b5
CR
kozikkamil b08c69e
Merge develop
kozikkamil 1c0ac5d
Merge develop
kozikkamil 4ccdf2b
:memo: README updated
github-actions[bot] d1173a4
MODEL-1489: Allow marking Label with "is_benchmark_reference" flag
dubininsergey 0c80185
Merge branch 'develop' into sdubinin/model-1489
dubininsergey 1677269
MODEL-1489: Rewrote tests
dubininsergey 03134f7
Merge branch 'develop' into sdubinin/model-1489
dubininsergey 9f81f3c
MODEL-1489: Fixed metric tests
dubininsergey 3d0f526
MODEL-1489: Added inverted test cases
dubininsergey File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,8 @@ | ||
import datetime | ||
from labelbox.schema.label import Label | ||
import pytest | ||
import uuid | ||
|
||
from labelbox.data.annotation_types.data import ( | ||
AudioData, | ||
ConversationData, | ||
DicomData, | ||
DocumentData, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 commentThe reason will be displayed to describe this comment to others. Learn more. the imports were unused |
||
HTMLData, | ||
ImageData, | ||
|
@@ -15,11 +11,8 @@ | |
from labelbox.data.serialization import NDJsonConverter | ||
from labelbox.data.annotation_types.data.video import VideoData | ||
|
||
import labelbox as lb | ||
import labelbox.types as lb_types | ||
from labelbox.schema.media_type import MediaType | ||
from labelbox.schema.annotation_import import AnnotationImportState | ||
from labelbox import Project, Client | ||
|
||
# Unit test for label based on data type. | ||
# TODO: Dicom removed it is unstable when you deserialize and serialize on label import. If we intend to keep this library this needs add generic data types tests work with this data type. | ||
|
@@ -83,4 +76,4 @@ def test_data_row_type_by_global_key( | |
annotations=label.annotations) | ||
|
||
assert data_label.data.global_key == label.data.global_key | ||
assert label.annotations == data_label.annotations | ||
assert label.annotations == data_label.annotations |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 lineThere 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 haveisBenchmarkReferenceLabel
set to True. I don't see how the code above would help to avoid this logic