Skip to content

Commit

Permalink
add dynamic embedded document field type for rrd files
Browse files Browse the repository at this point in the history
  • Loading branch information
sashankaryal committed Oct 1, 2024
1 parent 8413c2b commit cab1aad
Showing 1 changed file with 28 additions and 0 deletions.
28 changes: 28 additions & 0 deletions fiftyone/utils/rerun.py
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")

0 comments on commit cab1aad

Please sign in to comment.