-
Notifications
You must be signed in to change notification settings - Fork 512
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
Bring back ODMSample base class #127
Labels
backlog
Issues related to the roadmap and feature backlog
Comments
I'm okay with this. The inheritance is ultimately messy no matter what we do, but I suppose this would be a bit cleaner. |
These definitions on fiftyone/fiftyone/core/odm/sample.py Lines 480 to 494 in 2730847
|
This was implemented in #156 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
#117 went out a bit quick, but, upon closer inspection, I think we should not have deleted
fiftyone.core.odm.ODMDatasetSample
.The current implementation has only
fiftyone.core.odm.ODMSample
andfiftyone.core.odm.NoDatasetSample
, where the latter inherits directly fromSerializableDocument
:fiftyone/fiftyone/core/odm/sample.py
Line 405 in 2730847
I think there's still value in having the following hierarchy:
where the base class
fiftyone.core.odm.ODMSample
defines the interface that all samples support. This will make it more clear whatfiftyone.core.sample.Sample
is allowed to do with its backing documents, for example.Although
NoDatasetSample
is now completely home brewed (no MongoEngine), it is still a "document" in the sense that it is a JSON serializable representation of a Sample. So I see no issue with using theODMNoDatasetSample
name. It is in theodm
package, after all.The text was updated successfully, but these errors were encountered: