Skip to content

fix(docs): Update links in il_robots.mdx and il_sim.mdx to use absolute URLs #1313

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

Merged
merged 13 commits into from
Aug 5, 2025

Conversation

tc-huang
Copy link
Contributor

@tc-huang tc-huang commented Jun 15, 2025

What this does

This PR fixes two broken links in the il_robots.mdx and il_sim.mdx by replacing relative file paths with their corresponding absolute GitHub URLs.

The relative paths were causing "404 Not Found" errors when viewing the file on GitHub because they were pointing to incorrect locations. Using absolute URLs ensures the links always resolve to the correct files in the main branch.

Note

The same broken links also cause 404 errors on the documentation page: huggingface.co/docs/lerobot/il_robots and huggingface.co/docs/lerobot/il_sim.

The following changes were made in both il_robots.mdx and il_sim.mdx:

  1. The link for python -m lerobot.scripts.train was updated:
    - To train a policy to control your robot, use the [`python -m lerobot.scripts.train`](../src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
    + To train a policy to control your robot, use the [`python -m lerobot.scripts.train`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/scripts/train.py) script. A few arguments are required. Here is an example command:
  2. The link for configuration_act.py was updated:
    - 2. We provided the policy with `policy.type=act`. This loads configurations from [`configuration_act.py`](../src/lerobot/policies/act/configuration_act.py). Importantly, this policy will automatically adapt to the number of motor states, motor actions and cameras of your robot (e.g. `laptop` and `phone`) which have been saved in your dataset.
    + 2. We provided the policy with `policy.type=act`. This loads configurations from [`configuration_act.py`](https://github.com/huggingface/lerobot/blob/main/src/lerobot/policies/act/configuration_act.py). Importantly, this policy will automatically adapt to the number of motor states, motor actions and cameras of your robot (e.g. `laptop` and `phone`) which have been saved in your dataset.

For example:

  • Before change: Clicking the configuration_act.py link in the GitHub file preview of lerobot/docs/source/il_robots.mdxresulted in a 404 error, as it incorrectly pointed to docs/src/lerobot/policies/act/configuration_act.py.
    image
    image

  • After change: After updating the link to an absolute URL, it now correctly directs to the configuration_act.py file.
    image

How it was tested

I verified the fix by following the testing instructions provided for the reviewer below. The links now navigate to the correct pages both in the GitHub file preview and in the local documentation preview.

How to checkout & try? (for the reviewer)

1. Verify on GitHub

  1. In the "Files changed" tab of this PR, preview the modified docs/source/il_robots.mdx and il_sim.mdx files.
  2. Use your web browser's search function to locate the following 2 text snippets:
    To train a policy to control your robot, use the python -m lerobot.scripts.train script.
    
    This loads configurations from configuration_act.py.
    
  3. Click on the links (python -m lerobot.scripts.train and configuration_act.py) and confirm they lead to the correct files.

2. Verify by previewing locally

  1. Run the following commands from the root directory to build and preview the documentation (as the instruction in the docs/README.md)
    doc-builder build lerobot docs/source/ --build_dir ~/tmp/test-build
    doc-builder preview lerobot docs/source/
  2. In your browser, navigate to the Imitation Learning on Real-World Robots and Imitation Learning in Sim pages from the left-hand navigation bar.
  3. Search for the same text snippets mentioned above and click the associated links (python -m lerobot.scripts.train and configuration_act.py) to verify they work correctly.

Updated the relative file paths for `train.py` and `configuration_act.py`
to their absolute URLs on the main branch of the GitHub repository.

This prevents broken links when the documentation is viewed outside of
the local repository structure.
@tc-huang tc-huang marked this pull request as ready for review June 15, 2025 19:31
@CarolinePascal CarolinePascal added bug Something isn’t working correctly documentation Improvements or fixes to the project’s docs labels Jul 25, 2025
@CarolinePascal
Copy link
Collaborator

Hi @tc-huang,

Thanks for this PR and for fixing broken links in our docs ! Unfortunately, the folder architecture has changed a bit since your initial PR and the links are now incorrect. Could you update them to match the new folder architecture, and if possible, also apply the changes to ìl_sim.mdx` ? Thanks !

Best,

Caroline.

@tc-huang
Copy link
Contributor Author

Hi @CarolinePascal,

Thanks for the review on this PR. I'll take a look at it soon. I expect to have this done by end of today or tomorrow.

Best,

tc-huang

@tc-huang tc-huang marked this pull request as draft July 27, 2025 03:02
tc-huang added 2 commits July 27, 2025 11:07
Updated the relative file paths for `train.py` and `configuration_act.py`
to their absolute URLs on the main branch of the GitHub repository.

This prevents broken links when the documentation is viewed outside of
the local repository structure.
@tc-huang tc-huang changed the title fix(docs): Update links in il_robots.mdx to use absolute URLs fix(docs): Update links in il_robots.mdx and il_sim.mdx to use absolute URLs Jul 27, 2025
@tc-huang tc-huang marked this pull request as ready for review July 27, 2025 19:03
@Copilot Copilot AI review requested due to automatic review settings July 27, 2025 19:03
Copy link
Contributor

@Copilot 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

This PR fixes broken documentation links in two MDX files by replacing relative file paths with absolute GitHub URLs. The relative paths were causing 404 errors when viewing the documentation on GitHub and the Hugging Face documentation site.

  • Updates broken relative links to absolute GitHub URLs in documentation files
  • Fixes navigation to train.py and configuration_act.py files from documentation pages
  • Ensures links work correctly both in GitHub file previews and rendered documentation

Reviewed Changes

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

File Description
docs/source/il_sim.mdx Updates two broken relative links to absolute GitHub URLs for train.py and configuration_act.py
docs/source/il_robots.mdx Updates the same two broken relative links to absolute GitHub URLs for train.py and configuration_act.py

@tc-huang
Copy link
Contributor Author

Hi @CarolinePascal,

Thanks for your patience. I've pushed the updates to this PR.

The main change was to replace relative file paths with their corresponding absolute GitHub URLs for links python -m lerobot.scripts.train and configuration_act.py within the il_robots.mdx and il_sim.mdx files. This ensures they reflect the new folder architecture.

During this process, I noticed two things I'd like to bring to your attention:

First, regarding the diff preview in this PR, the il_robots.mdx file shows some unexpected deep red highlighting that il_sim.mdx does not. I generated the docs locally to inspect this (using the instructions in docs/README.md) and confirmed that both pages render correctly and seem unaffected. However, I would appreciate it if you could help review this to ensure there are no hidden issues.

Additionally, I noticed that the link to the so101_test dataset in il_robots.mdx is causing a 404 error, as the corresponding dataset appears to have been removed. Since I am not sure which dataset link should be used as a replacement, I have not fixed this at this time.

I'd appreciate your review. I'm happy to help with any further changes or adjustments. Thanks!

Best,

tc-huang

@CarolinePascal
Copy link
Collaborator

Hi @tc-huang,

Thank you for updating the links ! We're converging towards a fully functional documentation now 😎 Regarding your observations :

I have noticed the same deep red highlights on the diff preview, without being able to identify its cause. As the documentation still builds and renders pages correctly, I think we can safely ignore this for now.

The link to the so101_test dataset is actually a dummy link used to illustrate how to check on your uploaded datasets. Ideally, we should change cadene to ${HF_USER} to match the link provided in the echo command just below ! Could you take care of this change ?

Thank you again for your help !

Best,

Caroline.

CarolinePascal and others added 4 commits July 28, 2025 13:06
The example link in `Dataset upload` was hardcoded with the username `cadene`
(https://huggingface.co/datasets/cadene/so101_test), causing a 404 error and
inconsistency with the `echo` command example below it, which uses `${HF_USER}`
(https://huggingface.co/datasets/${HF_USER}/so101_test).

This commit replaces `cadene` with `${HF_USER}` to ensure consistency.
Adds backticks around the dataset upload example link in `il_robots.mdx`.

This prevents a `ReferenceError: HF_USER is not defined` that occurred when
inspecting the `il_robots.mdx` document locally.
@tc-huang
Copy link
Contributor Author

Hi @CarolinePascal,

I've pushed the updates to change cadene to ${HF_USER} in the "Dataset upload" example link to match the echo command. It's ready for your review at your convenience.

As a side note, I saw the same deep red highlighting in the Github code viewing mode of il_robots.mdx, which seems to confirm that the deep red highlighting in the diff preview in this PR wasn't introduced by the commits of this PR.

Best,

tc-huang

@tc-huang
Copy link
Contributor Author

tc-huang commented Aug 5, 2025

Hi @CarolinePascal,

Just a quick note to follow up on the PR. Please take a look when you have a moment, and let me know if you have any questions or feedback.

Thanks,

tc-huang

@CarolinePascal CarolinePascal mentioned this pull request Aug 5, 2025
@CarolinePascal
Copy link
Collaborator

CarolinePascal commented Aug 5, 2025

Hi @tc-huang !

I'll merge the PR today :)

Best,

Caroline.

@HuggingFaceDocBuilderDev

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@CarolinePascal CarolinePascal self-requested a review August 5, 2025 09:10
@CarolinePascal CarolinePascal merged commit e0096fe into huggingface:main Aug 5, 2025
9 checks passed
@tc-huang
Copy link
Contributor Author

tc-huang commented Aug 5, 2025

Hi @CarolinePascal,

Thank you for the review and for getting this merged. I appreciate your help.

Best,

tc-huang

@tc-huang tc-huang deleted the fix/broken-links-in-doc branch August 5, 2025 11:03
AdilZouitine pushed a commit that referenced this pull request Aug 10, 2025
…te URLs (#1313)

* Update links to use absolute URLs. 

* Update dataset upload example link to use HF_USER variable and match the correct syntax.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn’t working correctly documentation Improvements or fixes to the project’s docs
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants