-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- expose `Dataset.get_batch(keys=...)`, mimicking `TensorDict.select` - bump `tensordict>=0.7.0`
- Loading branch information
1 parent
9585c74
commit df252dd
Showing
9 changed files
with
241 additions
and
76 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
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 |
---|---|---|
@@ -1,11 +1,11 @@ | ||
[project] | ||
name = "rbyte" | ||
version = "0.11.1" | ||
version = "0.12.0" | ||
description = "Multimodal PyTorch dataset library" | ||
authors = [{ name = "Evgenii Gorchakov", email = "[email protected]" }] | ||
maintainers = [{ name = "Evgenii Gorchakov", email = "[email protected]" }] | ||
dependencies = [ | ||
"tensordict>=0.6.2", | ||
"tensordict>=0.7.0", | ||
"torch", | ||
"numpy", | ||
"polars>=1.21.0", | ||
|
@@ -39,7 +39,7 @@ repo = "https://github.com/yaak-ai/rbyte" | |
|
||
[project.optional-dependencies] | ||
build = ["hatchling>=1.25.0", "grpcio-tools>=1.62.0", "protoletariat==3.2.19"] | ||
visualize = ["rerun-sdk[notebook]>=0.21.0"] | ||
visualize = ["rerun-sdk[notebook]==0.21.0"] | ||
mcap = [ | ||
"mcap>=1.2.1", | ||
"mcap-ros2-support>=0.5.5", | ||
|
@@ -53,7 +53,7 @@ video = [ | |
"video-reader-rs>=0.2.2", | ||
] | ||
hdf5 = ["h5py>=3.12.1"] | ||
rrd = ["rerun-sdk>=0.21.0", "pyarrow-stubs"] | ||
rrd = ["rerun-sdk==0.21.0", "pyarrow-stubs"] | ||
|
||
[project.scripts] | ||
rbyte-visualize = 'rbyte.scripts.visualize:main' | ||
|
@@ -66,20 +66,18 @@ requires = [ | |
] | ||
build-backend = "hatchling.build" | ||
|
||
[tool.uv] | ||
dev-dependencies = [ | ||
[dependency-groups] | ||
dev = [ | ||
"wat-inspector>=0.4.3", | ||
"lovely-tensors>=0.1.18", | ||
"pudb>=2024.1.2", | ||
"ipython>=8.30.0", | ||
"ipython>=8.32.0", | ||
"ipython-autoimport>=0.5", | ||
"pytest>=8.3.3", | ||
"pytest>=8.3.4", | ||
"testbook>=0.4.2", | ||
"ipykernel>=6.29.5", | ||
] | ||
|
||
[tool.uv.sources] | ||
|
||
[tool.hatch.metadata] | ||
allow-direct-references = true | ||
|
||
|
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,27 @@ | ||
from typing import Literal | ||
|
||
from tensordict import ( | ||
NonTensorData, # pyright: ignore[reportAttributeAccessIssue, reportUnknownVariableType] | ||
TensorClass, | ||
TensorDict, | ||
) | ||
from torch import Tensor | ||
|
||
|
||
class BatchMeta(TensorClass, autocast=True): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue] | ||
sample_idx: Tensor | None = None | ||
input_id: NonTensorData | None = None # pyright: ignore[reportUnknownVariableType] | ||
|
||
|
||
class Batch(TensorClass, autocast=True): # pyright: ignore[reportGeneralTypeIssues, reportCallIssue] | ||
data: TensorDict | None = None # pyright: ignore[reportIncompatibleMethodOverride] | ||
meta: BatchMeta | None = None | ||
|
||
|
||
type BatchKeys = frozenset[ | ||
Literal["data", "meta"] | ||
| tuple[Literal["data"], str] | ||
| tuple[Literal["meta"], Literal["sample_idx", "input_id"]] | ||
] | ||
|
||
BATCH_KEYS_DEFAULT = frozenset(("data", "meta")) |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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
Submodule idl-repo
updated
from fe299e to 6c5ab8
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
Oops, something went wrong.