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
EmbeddedDocument field with a label type (ex: ground_truth of type Detections) should not have other typed fields of type primitives. #3577
EmbeddedDocument field with a label type (ex: ground_truth of type Detections) should not have other typed fields of type primitives. #3577
Conversation
in your screenshot after fix, the field annotator got moved to live at the Detection level. did you change your code to make that happen? or are you showing it nested incorrectly? |
Codecov ReportAll modified lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## release/v0.22.1 #3577 +/- ##
==================================================
Coverage ? 16.02%
==================================================
Files ? 594
Lines ? 72861
Branches ? 912
==================================================
Hits ? 11676
Misses ? 61185
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
good point! the two shouldn't really be compared. I added a nested annotator to detections field (in the second screenshare) which is ok to show I believe. The fix is to remove the annotator as in the first screenshare |
By showing it though, doesn't it imply that it can be visualized like the other fields (and that it would appear in the side bar). This is how I understand it. |
sweet - thanks for clarifying. lgtm! |
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 made a tweak to this because I think we only need to include the list field itself. This ensures all fields are excluded, includings list fields, dict fields, etc.
For example
dataset = foz.load_zoo_dataset("quickstart")
first = dataset.first()
first.detections["other_list"] = ["data"]
first.save()
We want other_list
to be omitted from schema settings, which should be handled now.
I am seeing an issue with frame fields (see screenshot). The nested detection fields are missing detections.detections
in the path. Is there an easy fix for that?
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.
LGTM, last comment is unrelated
What changes are proposed in this pull request?
An embedded document field with a label list type (ex: ground_truth of type Detections) should not have other typed fields (ground_truth.annotator for example) of type primitives.
Note this can be extended to more use cases but a good safeguard for now.
before fix
after fix
How is this patch tested? If it is not, please explain why.
(Details)
Release Notes
Is this a user-facing change that should be mentioned in the release notes?
notes for FiftyOne users.
(Details in 1-2 sentences. You can just refer to another PR with a description
if this PR is part of a larger change.)
What areas of FiftyOne does this PR affect?
fiftyone
Python library changes