Auto-detect dataset types#7
Open
lukeschmitt-tr wants to merge 1 commit into04-15-rename_supported_formatsfrom
Open
Auto-detect dataset types#7lukeschmitt-tr wants to merge 1 commit into04-15-rename_supported_formatsfrom
lukeschmitt-tr wants to merge 1 commit into04-15-rename_supported_formatsfrom
Conversation
Contributor
Author
|
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.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
Open
b9dbedd to
6023989
Compare
b3b0c65 to
5de06ea
Compare
Contributor
There was a problem hiding this comment.
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--typewhen omitted. - Updates
uploadandimport-hfcommands 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.
5de06ea to
b7c834b
Compare
b7c834b to
74c6523
Compare
74c6523 to
741180d
Compare
741180d to
28e96f5
Compare
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 |
28e96f5 to
6bdb4a2
Compare
6bdb4a2 to
85e63a3
Compare
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR does the following:
mcap→trossenmcap,lerobot→lerobot_v3--typeoptional onuploadandimport-hf