Datasets:
Formats:
csv
Languages:
English
Size:
< 1K
Tags:
robotics
embodied-ai
human-demonstration
egocentric-video
bimanual-manipulation
tactile-sensing
License:
Download player/runtime/python/Lib/site-packages/rerun/components/entry_kind.py from alinarus/MultimodalData: direct link, hf CLI and curl.
- Browser
- Download file 3.25 kB
-
https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/components/entry_kind.py
- Command line
-
hf download hf://datasets/alinarus/MultimodalData/player/runtime/python/Lib/site-packages/rerun/components/entry_kind.py
-
curl -L -o entry_kind.py https://huggingface.co/datasets/alinarus/MultimodalData/resolve/main/player/runtime/python/Lib/site-packages/rerun/components/entry_kind.py
3.25 kB
| # DO NOT EDIT! This file was auto-generated by crates/build/re_types_builder/src/codegen/python/mod.rs | |
| # Based on "crates/build/re_type_definitions/rerun/components/entry_kind.def.rs". | |
| # You can extend this class by creating a "EntryKindExt" class in "entry_kind_ext.py". | |
| from __future__ import annotations | |
| from collections.abc import Sequence | |
| from typing import Literal | |
| import pyarrow as pa | |
| from .._baseclasses import ( | |
| BaseBatch, | |
| ComponentBatchMixin, | |
| ) | |
| __all__ = ["EntryKind", "EntryKindArrayLike", "EntryKindBatch", "EntryKindLike"] | |
| from enum import Enum | |
| class EntryKind(Enum): | |
| """ | |
| **Component**: The kind of a catalog entry. | |
| The values match those of `rerun.cloud.v1alpha1.EntryKind`. | |
| ⚠️ **This type is _unstable_ and may change significantly in a way that the data won't be backwards compatible.** | |
| """ | |
| Dataset = 1 | |
| """A dataset.""" | |
| DatasetView = 2 | |
| """A view over a dataset.""" | |
| Table = 3 | |
| """A table.""" | |
| TableView = 4 | |
| """A view over a table.""" | |
| BlueprintDataset = 5 | |
| """A dataset holding the blueprints of another entry.""" | |
| AssetDataset = 6 | |
| """A dataset holding the static assets shared by the segments of another dataset.""" | |
| def auto(cls, val: str | int | EntryKind) -> EntryKind: | |
| """Best-effort converter, including a case-insensitive string matcher.""" | |
| if isinstance(val, EntryKind): | |
| return val | |
| if isinstance(val, int): | |
| return cls(val) | |
| try: | |
| return cls[val] | |
| except KeyError: | |
| val_lower = val.lower() | |
| for variant in cls: | |
| if variant.name.lower() == val_lower: | |
| return variant | |
| raise ValueError(f"Cannot convert {val} to {cls.__name__}") | |
| def __str__(self) -> str: | |
| """Returns the variant name.""" | |
| return self.name | |
| EntryKindLike = ( | |
| EntryKind | |
| | Literal[ | |
| "AssetDataset", | |
| "BlueprintDataset", | |
| "Dataset", | |
| "DatasetView", | |
| "Table", | |
| "TableView", | |
| "assetdataset", | |
| "blueprintdataset", | |
| "dataset", | |
| "datasetview", | |
| "table", | |
| "tableview", | |
| ] | |
| | int | |
| ) | |
| """A type alias for any EntryKind-like object.""" | |
| EntryKindArrayLike = ( | |
| EntryKind | |
| | Literal[ | |
| "AssetDataset", | |
| "BlueprintDataset", | |
| "Dataset", | |
| "DatasetView", | |
| "Table", | |
| "TableView", | |
| "assetdataset", | |
| "blueprintdataset", | |
| "dataset", | |
| "datasetview", | |
| "table", | |
| "tableview", | |
| ] | |
| | int | |
| | Sequence[EntryKindLike] | |
| ) | |
| """A type alias for any EntryKind-like array object.""" | |
| class EntryKindBatch(BaseBatch[EntryKindArrayLike], ComponentBatchMixin): | |
| _ARROW_DATATYPE = pa.uint8() | |
| _COMPONENT_TYPE: str = "rerun.components.EntryKind" | |
| def _native_to_pa_array(data: EntryKindArrayLike, data_type: pa.DataType) -> pa.Array: | |
| items: Sequence[EntryKindLike | str] = [data] if isinstance(data, (EntryKind, int, str)) else data | |
| pa_data = [EntryKind.auto(v).value if v is not None else None for v in items] # type: ignore[redundant-expr] | |
| return pa.array(pa_data, type=data_type) | |