Skip to content

Commit

Permalink
chore: bump deps (#35)
Browse files Browse the repository at this point in the history
  • Loading branch information
egorchakov authored Feb 17, 2025
1 parent df252dd commit 6eb6844
Show file tree
Hide file tree
Showing 10 changed files with 85 additions and 94 deletions.
5 changes: 5 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,11 @@ repos:
hooks:
- id: basedpyright

- repo: https://github.com/kynan/nbstripout
rev: 0.8.1
hooks:
- id: nbstripout

- repo: local
hooks:
- id: just-format
Expand Down
1 change: 0 additions & 1 deletion examples/.gitattributes

This file was deleted.

22 changes: 11 additions & 11 deletions examples/nuscenes_mcap.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "f199a6c2-62e9-47c3-b5c3-18c10fab78d7",
"id": "0",
"metadata": {},
"source": [
"# [nuScenes](https://nuscenes.org) x [mcap](https://mcap.dev)\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8372e8fa-2170-4f5e-8da9-ae91e9382169",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +25,7 @@
},
{
"cell_type": "markdown",
"id": "5722b10d-2dd9-4e9f-8e03-1cafe223f0aa",
"id": "2",
"metadata": {},
"source": [
"#### Compose a [hydra](https://hydra.cc) config:"
Expand All @@ -34,7 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5e297ae3-1a7e-46e4-94ca-3da749209c8c",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "markdown",
"id": "83e29131-0392-4a39-9ab9-e2745d59fefa",
"id": "4",
"metadata": {},
"source": [
"#### Instantiate the dataloader:"
Expand All @@ -61,7 +61,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "df270b3c-f637-48ad-9acf-89d8c5cf892e",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "e14b7f76-fb2e-46b4-903f-0f5ed32aee1c",
"id": "6",
"metadata": {},
"source": [
"#### Inspect a batch:"
Expand All @@ -79,7 +79,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9bfe7401-76fb-46d6-83a1-d511eed774c4",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "markdown",
"id": "f5225adf-da67-4626-86c6-beae09974989",
"id": "8",
"metadata": {},
"source": [
"#### (optional) Visualize the dataset:"
Expand All @@ -98,7 +98,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d5eaad36-97fd-4b60-8c67-df5eb9977a52",
"id": "9",
"metadata": {
"editable": true,
"slideshow": {
Expand Down Expand Up @@ -135,7 +135,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
24 changes: 12 additions & 12 deletions examples/nuscenes_rrd.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "f199a6c2-62e9-47c3-b5c3-18c10fab78d7",
"id": "0",
"metadata": {},
"source": [
"# [nuScenes](https://nuscenes.org) x [rrd](https://github.com/rerun-io/rerun/blob/main/ARCHITECTURE.md#rrd-files)\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8372e8fa-2170-4f5e-8da9-ae91e9382169",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,7 +25,7 @@
},
{
"cell_type": "markdown",
"id": "5722b10d-2dd9-4e9f-8e03-1cafe223f0aa",
"id": "2",
"metadata": {},
"source": [
"#### Compose a [hydra](https://hydra.cc) config:"
Expand All @@ -34,7 +34,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "5e297ae3-1a7e-46e4-94ca-3da749209c8c",
"id": "3",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -52,7 +52,7 @@
},
{
"cell_type": "markdown",
"id": "83e29131-0392-4a39-9ab9-e2745d59fefa",
"id": "4",
"metadata": {},
"source": [
"#### Instantiate the dataloader:"
Expand All @@ -61,7 +61,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "df270b3c-f637-48ad-9acf-89d8c5cf892e",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -70,7 +70,7 @@
},
{
"cell_type": "markdown",
"id": "e14b7f76-fb2e-46b4-903f-0f5ed32aee1c",
"id": "6",
"metadata": {},
"source": [
"#### Inspect a batch:"
Expand All @@ -79,7 +79,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "9bfe7401-76fb-46d6-83a1-d511eed774c4",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -89,7 +89,7 @@
},
{
"cell_type": "markdown",
"id": "7314432a-0e5b-4134-be16-9e0bd2f12581",
"id": "8",
"metadata": {},
"source": [
"#### (optional) Visualize the dataset:"
Expand All @@ -98,7 +98,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d5eaad36-97fd-4b60-8c67-df5eb9977a52",
"id": "9",
"metadata": {
"editable": true,
"slideshow": {
Expand All @@ -118,7 +118,7 @@
"rr.notebook_show(height=1000, width=2000)\n",
"\n",
"# log the original recording for comparison\n",
"rr.log_file_from_path(\"../tests/data/nuscenes.rrd\")"
"rr.log_file_from_path(\"../tests/data/nuscenes/rrd/nuscenes_dataset.rrd\")"
]
}
],
Expand All @@ -138,7 +138,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.12.4"
"version": "3.12.7"
}
},
"nbformat": 4,
Expand Down
2 changes: 1 addition & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ generate-config:
--output yaml \
--strict

test *ARGS: generate-config
test *ARGS: build-protos generate-config
uv run --all-extras pytest --capture=no {{ ARGS }}

notebook FILE *ARGS: sync generate-config
Expand Down
44 changes: 20 additions & 24 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,24 +1,23 @@
[project]
name = "rbyte"
version = "0.12.0"
version = "0.12.1"
description = "Multimodal PyTorch dataset library"
authors = [{ name = "Evgenii Gorchakov", email = "[email protected]" }]
maintainers = [{ name = "Evgenii Gorchakov", email = "[email protected]" }]
dependencies = [
"tensordict>=0.7.0",
"torch",
"numpy",
"polars>=1.21.0",
"pydantic>=2.10.2",
"more-itertools>=10.5.0",
"polars>=1.22.0",
"pydantic>=2.10.6",
"more-itertools>=10.6.0",
"hydra-core>=1.3.2",
"optree>=0.13.1",
"cachetools>=5.5.0",
"diskcache>=5.6.3",
"optree>=0.14.0",
"cachetools>=5.5.1",
"parse>=1.20.2",
"structlog>=24.4.0",
"tqdm>=4.66.5",
"pipefunc>=0.53.0",
"structlog>=25.1.0",
"tqdm>=4.67.1",
"pipefunc>=0.53.3",
"xxhash>=3.5.0",
]
readme = "README.md"
Expand All @@ -38,32 +37,29 @@ classifiers = [
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"]
build = ["hatchling>=1.27.0"]
protos = ["grpcio-tools>=1.70.0", "protoletariat>=3.3.9"]
visualize = ["rerun-sdk[notebook]>=0.22.0"]
mcap = [
"mcap>=1.2.1",
"mcap>=1.2.2",
"mcap-ros2-support>=0.5.5",
"protobuf",
"mcap-protobuf-support>=0.5.2",
"mcap-protobuf-support>=0.5.3",
]
yaak = ["protobuf", "ptars>=0.0.3"]
jpeg = ["simplejpeg>=1.7.6"]
jpeg = ["simplejpeg>=1.8.1"]
video = [
"python-vali>=4.2.0.post0; sys_platform == 'linux'",
"video-reader-rs>=0.2.2",
"python-vali>=4.2.9.post1; sys_platform == 'linux'",
"video-reader-rs>=0.2.3",
]
hdf5 = ["h5py>=3.12.1"]
rrd = ["rerun-sdk==0.21.0", "pyarrow-stubs"]
rrd = ["rerun-sdk>=0.22.0", "pyarrow-stubs"]

[project.scripts]
rbyte-visualize = 'rbyte.scripts.visualize:main'

[build-system]
requires = [
"hatchling>=1.25.0",
"grpcio-tools>=1.62.0",
"protoletariat==3.2.19",
]
requires = ["hatchling>=1.27.0"]
build-backend = "hatchling.build"

[dependency-groups]
Expand Down Expand Up @@ -91,7 +87,7 @@ artifacts = ["src/rbyte/io/yaak/proto/*_pb2.py*"]

[tool.hatch.build.targets.sdist.hooks.custom]
enable-by-default = true
require-runtime-features = ["build"]
require-runtime-features = ["protos"]

[tool.hatch.build.targets.wheel]
packages = ["src/rbyte"]
Expand Down
8 changes: 3 additions & 5 deletions src/rbyte/io/_numpy/tensor_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,7 @@

import numpy as np
import torch
from numpy.lib.recfunctions import (
structured_to_unstructured, # pyright: ignore[reportUnknownVariableType]
)
from numpy.lib.recfunctions import structured_to_unstructured
from pydantic import validate_call
from torch import Tensor

Expand All @@ -34,8 +32,8 @@ def _path_posix(self) -> str:

def _getitem(self, index: object) -> Tensor:
path = self._path_posix.format(index)
array = structured_to_unstructured(np.load(path)[self._select]) # pyright: ignore[reportUnknownVariableType]
return torch.from_numpy(np.ascontiguousarray(array)) # pyright: ignore[reportUnknownMemberType, reportUnknownArgumentType]
array = structured_to_unstructured(np.load(path)[self._select])
return torch.from_numpy(np.ascontiguousarray(array)) # pyright: ignore[reportUnknownMemberType]

@override
def __getitem__(self, indexes: object | Iterable[object]) -> Tensor:
Expand Down
4 changes: 4 additions & 0 deletions src/rbyte/io/video/ffmpeg_source.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,13 +20,17 @@ def __init__(
path: FilePath,
threads: NonNegativeInt | None = None,
resize_shorter_side: NonNegativeInt | None = None,
device: str | None = None,
filter: str | None = None,
) -> None:
super().__init__()

self._reader: PyVideoReader = PyVideoReader(
filename=Path(path).resolve().as_posix(),
threads=threads,
resize_shorter_side=resize_shorter_side,
device=device,
filter=filter,
)

@override
Expand Down
2 changes: 1 addition & 1 deletion src/rbyte/io/yaak/idl-repo
Loading

0 comments on commit 6eb6844

Please sign in to comment.