-
Notifications
You must be signed in to change notification settings - Fork 560
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
Addressing multiple PCD overlay feedback #2964
Conversation
Codecov ReportPatch coverage:
Additional details and impacted files@@ Coverage Diff @@
## develop #2964 +/- ##
===========================================
+ Coverage 61.80% 62.18% +0.37%
===========================================
Files 248 250 +2
Lines 44705 45507 +802
Branches 317 319 +2
===========================================
+ Hits 27631 28297 +666
- Misses 17074 17210 +136
Flags with carried forward coverage won't be shown. Click here to find out more.
☔ View full report in Codecov by Sentry. |
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 see the code changes you made here on github, but when I build + test locally, I'm not seeing the changes for some reason... is it user error?
Also now the sample tags
entry in the modal sidebar is completely missing:
Also, unrelated but just reporting as I see things: when testing with this dataset:
import fiftyone as fo
import fiftyone.zoo as foz
dataset = fo.Dataset()
qsg = foz.load_zoo_dataset("quickstart-groups", max_samples=12)
qsg_pngs = qsg.select_group_slices("left").clone()
qsg_pcds = qsg.select_group_slices("pcd").clone()
ground_truth_label = qsg_pcds.first()["ground_truth"]
g1 = fo.Group()
g1s1 = fo.Sample(filepath=qsg_pcds.first().filepath, group=g1.element("pcd1"))
g1s1["detections"] = ground_truth_label
g1s2 = fo.Sample(filepath=qsg_pcds.skip(1).first().filepath, group=g1.element("pcd2"))
g1s3 = fo.Sample(filepath=qsg_pngs.first().filepath, group=g1.element("png"))
g2 = fo.Group()
g2s1 = fo.Sample(filepath=qsg_pcds.skip(2).first().filepath, group=g2.element("pcd1"))
g2s1["detections"] = ground_truth_label
g2s2 = fo.Sample(filepath=qsg_pcds.skip(3).first().filepath, group=g2.element("pcd2"))
g2s3 = fo.Sample(filepath=qsg_pngs.skip(1).first().filepath, group=g2.element("png"))
samples = [g1s1, g1s2, g1s3, g2s1, g2s2, g2s3]
dataset.add_samples(samples)
dataset.default_group_slice = "png"
session = fo.launch_app(dataset)
I get the following error when using the tagging menu above the grid to add some tags with one or more samples selected:
Traceback (most recent call last):
File "/Users/Brian/dev/fiftyone/fiftyone/server/decorators.py", line 34, in wrapper
response = await func(endpoint, request, data, *args)
File "/Users/Brian/dev/fiftyone/fiftyone/server/routes/tagging.py", line 64, in post
tags, items = await view._async_aggregate(
File "/Users/Brian/dev/fiftyone/fiftyone/core/collections.py", line 8827, in _async_aggregate
compiled_facet_aggs, facet_pipelines = self._build_facets(
File "/Users/Brian/dev/fiftyone/fiftyone/core/collections.py", line 8929, in _build_facets
field = self.get_field(root)
File "/Users/Brian/dev/fiftyone/fiftyone/core/collections.py", line 1025, in get_field
_, field = self._parse_field(
File "/Users/Brian/dev/fiftyone/fiftyone/core/collections.py", line 1058, in _parse_field
schema = self.get_field_schema(include_private=include_private)
File "/Users/Brian/dev/fiftyone/fiftyone/core/view.py", line 692, in get_field_schema
schema = self._get_filtered_schema(schema)
File "/Users/Brian/dev/fiftyone/fiftyone/core/view.py", line 1433, in _get_filtered_schema
selected_fields, excluded_fields = self._get_selected_excluded_fields(
File "/Users/Brian/dev/fiftyone/fiftyone/core/view.py", line 1468, in _get_selected_excluded_fields
_view = _view._add_view_stage(stage, validate=False)
File "/Users/Brian/dev/fiftyone/fiftyone/core/view.py", line 1412, in _add_view_stage
media_type = stage.get_media_type(self)
File "/Users/Brian/dev/fiftyone/fiftyone/core/stages.py", line 3998, in get_media_type
media_types = set(group_media_types.values())
AttributeError: 'NoneType' object has no attribute 'values'
I guess this means that the App is trying to append a SelectGroupSlices
stage to a view that's not grouped
…ne into feat/multiple-pcd-overlay
@benjaminpkane I merged I suspect this isn't related to this PR, but I'm just using this PR as a place to report it 😅
|
8e844c6
to
cc72b13
Compare
…ne into feat/multiple-pcd-overlay
Regarding
This has something to do with how th media type is computed on views. Perhaps it has changed recently. import fiftyone.core.view as fov
import fiftyone.zoo as foz
dataset = foz.load_zoo_dataset("quickstart-groups")
view = dataset.select_group_slices("png")
assert view.media_type == "image" # is image, correct
view = fov.make_optimized_select_view(view, [dataset.first().id])
assert view.media_type == "image" # should be image, is group |
Re, comment (2):
I attempted this but this is not as easy to persist, unfortunately. I'll wait until |
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, this pr also fixes the aggregation regressions
@benjaminpkane thanks for tracking down the tagging issue. I updated |
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
Resolves comments 1, 3, 4, and 5 from #2912 (comment)