Skip to content

Auto-detect dataset types#7

Open
lukeschmitt-tr wants to merge 1 commit into04-15-rename_supported_formatsfrom
04-15-auto-detect_dataset_types
Open

Auto-detect dataset types#7
lukeschmitt-tr wants to merge 1 commit into04-15-rename_supported_formatsfrom
04-15-auto-detect_dataset_types

Conversation

@lukeschmitt-tr
Copy link
Copy Markdown
Contributor

@lukeschmitt-tr lukeschmitt-tr commented Apr 16, 2026

This PR does the following:

  • Rename dataset type enum: mcaptrossenmcap, lerobotlerobot_v3
  • Make --type optional on upload and import-hf

Copy link
Copy Markdown
Contributor Author

lukeschmitt-tr commented Apr 16, 2026

Warning

This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
Learn more

This stack of pull requests is managed by Graphite. Learn more about stacking.

@lukeschmitt-tr lukeschmitt-tr marked this pull request as ready for review April 16, 2026 02:52
@lukeschmitt-tr lukeschmitt-tr mentioned this pull request Apr 16, 2026
@lukeschmitt-tr lukeschmitt-tr force-pushed the 04-15-rename_supported_formats branch from b9dbedd to 6023989 Compare May 8, 2026 03:58
@lukeschmitt-tr lukeschmitt-tr force-pushed the 04-15-auto-detect_dataset_types branch from b3b0c65 to 5de06ea Compare May 8, 2026 03:58
@lukeschmitt-tr lukeschmitt-tr requested a review from Copilot May 8, 2026 04:07
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds dataset type auto-detection so users can omit --type for dataset upload and dataset import-hf, aligning the CLI with the renamed dataset type enum values (trossenmcap, lerobot_v3).

Changes:

  • Introduces detect_dataset_type() and uses it to resolve --type when omitted.
  • Updates upload and import-hf commands to accept an optional dataset type and emit a clear error when detection fails.
  • Adds/extends tests for type detection and CLI auto-detection; updates CLI/README examples to omit --type.

Reviewed changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
tests/test_validators.py Adds unit tests for dataset type detection and CLI-level tests ensuring --type can be omitted (and errors are clear when detection fails).
src/trossen_cloud_cli/validators/__init__.py Adds detect_dataset_type() used for auto-detection based on filesystem contents.
src/trossen_cloud_cli/commands/datasets.py Makes --type optional for upload/import-hf and resolves the dataset type via the new detection helper.
src/trossen_cloud_cli/cli.py Updates help/usage example to reflect --type omission.
README.md Updates documentation example to reflect --type omission.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/trossen_cloud_cli/validators/__init__.py
Comment thread src/trossen_cloud_cli/commands/datasets.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread src/trossen_cloud_cli/validators/__init__.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread src/trossen_cloud_cli/validators/__init__.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Comment thread src/trossen_cloud_cli/validators/__init__.py Outdated
Comment thread src/trossen_cloud_cli/validators/__init__.py
Comment thread tests/test_validators.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment on lines +10 to +20
def _has_visible_mcap(root: Path) -> bool:
"""True if ``root`` contains a non-hidden ``.mcap`` file outside any hidden directory.

A path is considered hidden if any component of its path relative to ``root``
starts with ``.`` — including the filename itself, so ``root/.foo.mcap`` is
excluded the same as ``root/.cache/foo.mcap``.
"""
for f in root.rglob("*.mcap"):
if not any(part.startswith(".") for part in f.relative_to(root).parts):
return True
return False
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Comment thread src/trossen_cloud_cli/validators/__init__.py Outdated
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Copilot reviewed 5 out of 5 changed files in this pull request and generated no new comments.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants