You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When I create a dataset with a sample containing keypoints, and use the method dataset.add_dynamic_sample_fields(), fiftyone crashes when I try to show the details of the keypoints. It also fails when I try to get the get sample manually with a view on the dataset
the error returned when using view.take(1).first() is the following
Traceback (most recent call last):
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/fiftyone/core/dataset.py", line 6202, in _sample_dict_to_doc
return self._sample_doc_cls.from_dict(d, extended=False)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/fiftyone/core/odm/document.py", line 410, in from_dict
return cls._from_son(d)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/mongoengine/base/document.py", line 836, in _from_son
obj = cls(__auto_convert=False, _created=created, **data)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/mongoengine/base/document.py", line 128, in __init__
setattr(self, key, value)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/fiftyone/core/odm/mixins.py", line 63, in __setattr__
self._fields[name].validate(value)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/fiftyone/core/fields.py", line 1345, in validate
v.validate(val)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/mongoengine/fields.py", line 972, in validate
super().validate(value)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/mongoengine/base/fields.py", line 481, in validate
self.error(f"Invalid {field_class} item ({value})", errors=errors)
File "/home/arthurtrehet/.cache/pypoetry/virtualenvs/code-db5bzWv4-py3.9/lib/python3.9/site-packages/mongoengine/base/fields.py", line 171, in error
raise ValidationError(message, errors=errors, field_name=field_name)
mongoengine.errors.ValidationError: Invalid EmbeddedDocumentField item ([<Keypoint: {
'id': '6483112be1e4b4c5b385d6ac',
'attributes': {},
'tags': [],
'label': 'head',
'points': [[0.7, 0.8]],
'confidence': [0.2],
'index': None,
}>])([0.7, 0.8] could not be converted to float: [0])
print(dataset.get_dynamic_field_schema()) just before using dataset.add_dynamic_sample_fields() returns {'ground_truth.keypoints.points[]': <fiftyone.core.fields.FloatField object at 0x7f7a69f5ca30>}. Which makes me think keypoints are considered dynamic by default even though they shouldn't.
What areas of FiftyOne does this bug affect?
App: FiftyOne application issue
Core: Core Python library issue
Server: FiftyOne server issue
Willingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
Yes. I can contribute a fix for this bug independently
Yes. I would be willing to contribute a fix for this bug with guidance from the FiftyOne community
No. I cannot contribute a bug fix at this time
The text was updated successfully, but these errors were encountered:
System information
Describe the problem
When I create a dataset with a sample containing keypoints, and use the method dataset.add_dynamic_sample_fields(), fiftyone crashes when I try to show the details of the keypoints. It also fails when I try to get the get sample manually with a view on the dataset
Code to reproduce issue
with either
or
Other info/logs
the error returned when using
view.take(1).first()
is the followingprint(dataset.get_dynamic_field_schema())
just before usingdataset.add_dynamic_sample_fields()
returns{'ground_truth.keypoints.points[]': <fiftyone.core.fields.FloatField object at 0x7f7a69f5ca30>}
. Which makes me think keypoints are considered dynamic by default even though they shouldn't.What areas of FiftyOne does this bug affect?
App
: FiftyOne application issueCore
: Core Python library issueServer
: FiftyOne server issueWillingness to contribute
The FiftyOne Community encourages bug fix contributions. Would you or another member of your organization be willing to contribute a fix for this bug to the FiftyOne codebase?
The text was updated successfully, but these errors were encountered: