mirror of
https://github.com/huggingface/lerobot.git
synced 2026-05-19 10:40:04 +00:00
fd18beb3a1
- name the three modules everywhere (plan / interjections / vqa) instead of module_1/2/3 — config classes, config fields, executor params, staging keys and phase names now carry the module name - rename examples/annotation -> examples/annotations; add the Apache header to run_hf_job.py - drop the unused GeneralVqaModule._generate_one - remove "PR 1" references from comments/docstrings - frames.py: rely on the always-defined LeRobotDatasetMetadata.camera_keys - executor.py: read/write meta/info.json via load_info / write_info - reader.py: load meta/tasks.parquet via io_utils.load_tasks - make --push_to_hub a bool; push the annotated dataset back to --repo_id - move the on-disk test dataset builder into tests/fixtures (build_annotation_dataset); run_e2e_smoke reuses it - clarify in the docs that the vqa module grounds each pair on a single frame (K = per-tick anchor count) - hoist stdlib dynamic imports to module scope Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
52 lines
1.6 KiB
Python
52 lines
1.6 KiB
Python
#!/usr/bin/env python
|
|
|
|
# Copyright 2026 The HuggingFace Inc. team. All rights reserved.
|
|
#
|
|
# Licensed under the Apache License, Version 2.0 (the "License");
|
|
# you may not use this file except in compliance with the License.
|
|
# You may obtain a copy of the License at
|
|
#
|
|
# http://www.apache.org/licenses/LICENSE-2.0
|
|
#
|
|
# Unless required by applicable law or agreed to in writing, software
|
|
# distributed under the License is distributed on an "AS IS" BASIS,
|
|
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
# See the License for the specific language governing permissions and
|
|
# limitations under the License.
|
|
"""Shared fixtures for annotation-pipeline tests.
|
|
|
|
The on-disk dataset builder lives with the other dataset factories in
|
|
``tests/fixtures/dataset_factories.py`` (:func:`build_annotation_dataset`);
|
|
these fixtures only wire it into pytest.
|
|
"""
|
|
|
|
from __future__ import annotations
|
|
|
|
from pathlib import Path
|
|
|
|
import pytest
|
|
|
|
from tests.fixtures.dataset_factories import build_annotation_dataset
|
|
|
|
|
|
@pytest.fixture
|
|
def fixture_dataset_root(tmp_path: Path) -> Path:
|
|
"""A tiny dataset with two episodes, 12 frames each at 10 fps."""
|
|
return build_annotation_dataset(
|
|
tmp_path / "ds",
|
|
episode_specs=[
|
|
(0, 12, "Could you tidy the kitchen please?"),
|
|
(1, 12, "Please clean up the kitchen"),
|
|
],
|
|
fps=10,
|
|
)
|
|
|
|
|
|
@pytest.fixture
|
|
def single_episode_root(tmp_path: Path) -> Path:
|
|
return build_annotation_dataset(
|
|
tmp_path / "ds_one",
|
|
episode_specs=[(0, 30, "Pour water from the bottle into the cup.")],
|
|
fps=10,
|
|
)
|