Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Improve push_dataset_to_hub API + Add unit tests #231

Merged
merged 21 commits into from
Jun 13, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 10 additions & 6 deletions lerobot/scripts/push_dataset_to_hub.py
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,8 @@ def push_videos_to_hub(repo_id, videos_dir, revision):


def push_dataset_to_hub(
data_dir: Path,
raw_dir: Path,
out_dir: Path,
dataset_id: str,
raw_format: str | None,
community_id: str,
Expand All @@ -161,9 +162,6 @@ def push_dataset_to_hub(
):
repo_id = f"{community_id}/{dataset_id}"

raw_dir = data_dir / f"{dataset_id}_raw"

out_dir = data_dir / repo_id
meta_data_dir = out_dir / "meta_data"
videos_dir = out_dir / "videos"

Expand Down Expand Up @@ -245,10 +243,16 @@ def main():
parser = argparse.ArgumentParser()

parser.add_argument(
"--data-dir",
"--raw-dir",
type=Path,
required=True,
help="Directory containing input raw datasets (e.g. `data/aloha_mobile_chair_raw` or `data/pusht_raw).",
)
parser.add_argument(
"--out-dir",
type=Path,
required=True,
Cadene marked this conversation as resolved.
Show resolved Hide resolved
help="Root directory containing datasets (e.g. `data` or `tmp/data` or `/tmp/lerobot/data`).",
help="Root directory containing output dataset (e.g. `data/lerobot/aloha_mobile_chair` or `data/lerobot/pusht`).",
)
parser.add_argument(
"--dataset-id",
Expand Down
Loading