-
Notifications
You must be signed in to change notification settings - Fork 590
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
add dynamic embedded document field type for rrd files
- Loading branch information
1 parent
8413c2b
commit cab1aad
Showing
1 changed file
with
28 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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 |
---|---|---|
@@ -0,0 +1,28 @@ | ||
""" | ||
Utilities for working with `Rerun <https://rerun.io/>`_. | ||
| Copyright 2017-2024, Voxel51, Inc. | ||
| `voxel51.com <https://voxel51.com/>`_ | ||
| | ||
""" | ||
|
||
import fiftyone.core.fields as fof | ||
import fiftyone.core.labels as fol | ||
from fiftyone.core.odm import DynamicEmbeddedDocument | ||
|
||
|
||
class RrdFile(DynamicEmbeddedDocument, fol._HasMedia): | ||
"""Class for storing a rerun data (rrd) file and its associated metadata. | ||
Args: | ||
filepath (None): the path to the rrd file | ||
version (0.18.2): the version of the rrd file. Since rrd files do not | ||
yet guarantee backwards compatibility, this field is used to | ||
determine how to parse the file and what rerun viewer to use. | ||
If not provided, the default version is 0.18.2 | ||
""" | ||
|
||
_MEDIA_FIELD = "filepath" | ||
|
||
filepath = fof.StringField() | ||
version = fof.StringField(default="0.18.2") |