Skip to content

docs(lerobot): use the hf CLI for Hugging Face login and dataset id#724

Open
jiwenc-nv wants to merge 1 commit into
NVIDIA:mainfrom
jiwenc-nv:so101-docs-tweak
Open

docs(lerobot): use the hf CLI for Hugging Face login and dataset id#724
jiwenc-nv wants to merge 1 commit into
NVIDIA:mainfrom
jiwenc-nv:so101-docs-tweak

Conversation

@jiwenc-nv

@jiwenc-nv jiwenc-nv commented Jul 2, 2026

Copy link
Copy Markdown
Collaborator

Split the combined login/cd prerequisite into two steps and switch from the deprecated huggingface-cli to the hf CLI (hf auth login); derive the example dataset repo_id from hf auth whoami.

Description

Fixes #(issue)

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Testing

Checklist

  • I have read and understood the contribution guidelines
  • I have run the linter and formatter with SKIP=check-copyright-year pre-commit run --all-files
  • I have made corresponding changes to the documentation
  • I have added tests that prove my fix/feature works (or explained why not)
  • I have signed off all my commits (git commit -s) per the DCO

Summary by CodeRabbit

  • Documentation
    • Updated the getting-started guide for real data collection with the latest Hugging Face login flow.
    • Clarified the order of setup steps before running the example commands.
    • Replaced placeholder dataset identifiers in recording examples with values derived from the currently signed-in Hugging Face account.

Split the combined login/cd prerequisite into two steps and switch from the
deprecated huggingface-cli to the hf CLI (hf auth login); derive the example
dataset repo_id from hf auth whoami.

Signed-off-by: Jiwen Cai <jiwenc@nvidia.com>
@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

📝 Docs preview is not auto-deployed for fork PRs.

A maintainer with write access to NVIDIA/IsaacTeleop can deploy a preview by
commenting /preview-docs on this PR. Once deployed, the preview
will live at:

https://nvidia.github.io/IsaacTeleop/preview/pr-724/

@coderabbitai

coderabbitai Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

Review Change Stack

📝 Walkthrough

Walkthrough

Documentation updates to the real data collection getting-started guide replace the login instruction with hf auth login, separate it from the script-run step, and update dataset recording command examples to derive --dataset.repo_id dynamically from the authenticated user via hf auth whoami piped through jq, instead of using a static placeholder value.

Estimated code review effort: 1 (Trivial) | ~3 minutes

Compact metadata:

  • Type: Documentation-only change
  • Files changed: 1
  • Lines: +10/-6

Related issues: None referenced
Related PRs: None referenced
Suggested labels: documentation
Suggested reviewers: None identified from provided context

Poem:
A rabbit hops through docs so neat,
Swaps old logins for hf auth feat.
No more placeholders left behind—
whoami now speaks its mind.
Repo IDs filled with jq's delight,
Docs made cleaner, day and night. 🐇📄

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly matches the main documentation update: switching to the hf CLI for login and dataset id handling.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

Comment @coderabbitai help to get the list of available commands.

@jiwenc-nv jiwenc-nv requested a review from nv-jakob July 2, 2026 00:05
@jiwenc-nv

Copy link
Copy Markdown
Collaborator Author

/preview-docs

@github-actions

github-actions Bot commented Jul 2, 2026

Copy link
Copy Markdown
Contributor

✅ Preview deployed: https://NVIDIA.github.io/IsaacTeleop/preview/pr-724/

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@docs/source/getting_started/lerobot/data_collection_real.rst`:
- Line 84: The `hf auth whoami --format json` examples in the getting-started
docs are using the wrong JSON field, so `dataset.repo_id` can become invalid.
Update both occurrences in the documentation to use the `name` property instead
of `user`, keeping the surrounding `dataset.repo_id` example intact.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: 3417b31a-15e4-4a67-b0a6-50c83e2b9402

📥 Commits

Reviewing files that changed from the base of the PR and between 8b75c1a and 8f55943.

📒 Files selected for processing (1)
  • docs/source/getting_started/lerobot/data_collection_real.rst

--teleop.type=xr_controller \
--robot.cameras="{ front: {type: opencv, index_or_path: 0, width: 640, height: 480, fps: 30}}" \
--dataset.repo_id=<hf_user>/<dataset_name> \
--dataset.repo_id=$(hf auth whoami --format json | jq -r '.user')/my_test_dataset \

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

🎯 Functional Correctness | 🟠 Major | ⚡ Quick win

🧩 Analysis chain

🏁 Script executed:

#!/bin/bash
hf auth whoami --format json | jq -r '.name'

Repository: NVIDIA/IsaacTeleop

Length of output: 192


🏁 Script executed:

#!/bin/bash
set -euo pipefail

# Show the relevant doc sections with line numbers.
sed -n '70,170p' docs/source/getting_started/lerobot/data_collection_real.rst

# Find other whoami usages in the repo.
rg -n "hf auth whoami|jq -r '\\.(user|name)'" docs/source/getting_started/lerobot/data_collection_real.rst docs -S || true

Repository: NVIDIA/IsaacTeleop

Length of output: 5606


🌐 Web query:

huggingface_hub CLI hf auth whoami --format json name user payload docs

💡 Result:

The huggingface_hub CLI command hf auth whoami is used to identify the currently authenticated Hugging Face account [1][2]. To receive the output in JSON format, you can use the --format json option [1][3]. The command also supports a shorthand --json flag [3]. When --format json is specified, the CLI outputs the full response from the underlying whoami API call as a pretty-printed JSON object [3]. The default output format is table, which prints formatted text including your username and the organizations you are a member of [3][2][4]. Example usage: $ hf auth whoami --format json This feature is designed to facilitate scripting and programmatic access to your authentication status [3][5].

Citations:


🌐 Web query:

huggingface_hub whoami JSON payload name field user field auth.py source

💡 Result:

The whoami functionality in the huggingface_hub library calls the Hub API endpoint /api/whoami-v2, which returns a JSON response containing information about the authenticated entity [1][2]. In the context of the huggingface_hub Python library, specifically in auth.py and related CLI implementations, the 'name' field in the returned dictionary corresponds to the unique username of the authenticated user or organization [3][4][5][6]. The 'user' field itself is not a standard key within the root level of this specific JSON payload; rather, the CLI code accesses the 'name' key directly from the dictionary returned by the whoami function [3][4][6]. Key details: - The JSON response typically includes keys such as 'type' (user, org, or app), 'id', 'name', 'fullname', and an 'orgs' list [7][1]. - In the CLI source code (e.g., src/huggingface_hub/cli/auth.py), the output is formatted by accessing info['name'] to display the account username [3][4]. - While some developer discussions have proposed formalizing these fields into typed dataclasses, the primary interaction remains through a dictionary returned by the API [7]. - The /api/whoami-v2 response is documented in the broader Hugging Face Hub API specification and includes an 'auth' object containing details about the access token itself (e.g., role, display name) [7][1].

Citations:


Use name instead of user in both hf auth whoami --format json examples. .user resolves to null, so dataset.repo_id becomes invalid.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@docs/source/getting_started/lerobot/data_collection_real.rst` at line 84, The
`hf auth whoami --format json` examples in the getting-started docs are using
the wrong JSON field, so `dataset.repo_id` can become invalid. Update both
occurrences in the documentation to use the `name` property instead of `user`,
keeping the surrounding `dataset.repo_id` example intact.

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.

1 participant