Skip to content

fix(scripts): serve grpc for a web viewer#2881

Open
sotanakamura wants to merge 2 commits intohuggingface:mainfrom
sotanakamura:rerun
Open

fix(scripts): serve grpc for a web viewer#2881
sotanakamura wants to merge 2 commits intohuggingface:mainfrom
sotanakamura:rerun

Conversation

@sotanakamura
Copy link
Contributor

@sotanakamura sotanakamura commented Jan 30, 2026

Type / Scope

  • Type: Bug
  • Scope: lerobot_dataset_viz.py

Summary / Motivation

Serving grpc is necessary to visualize data in the distant mode.

Related issues

fix #2898

What changed

Serve grpc and pass its uri to the web viewer.

How was this tested (or how to run locally)

Run the lerobot_dataset_viz as follows:

lerobot-dataset-viz --repo-id "lerobot/pusht"  --episode-index 0 --mode distant --display-compressed-images true

Access to http://localhost:9090/?url=rerun%2Bhttp%3A%2F%2Flocalhost%3A9876%2Fproxy

Checklist (required before merge)

  • Linting/formatting run (pre-commit run -a)
  • All tests pass locally (pytest)
  • Documentation updated
  • CI is green

Reviewer notes

  • Anything the reviewer should focus on (performance, edge-cases, specific files) or general notes.
  • Anyone in the community is free to review the PR.

@CarolinePascal
Copy link
Collaborator

Hi @sotanakamura,

We (@imstevenpmwork) refactored our rerun visualizer to correctly support distant viewers (fbe4c8b). The implementation differs from your PR but it should solve the issue. I'm closing this PR, but feel free to open a new one if you spot another issue !

Best,

Caroline.

@sotanakamura
Copy link
Contributor Author

sotanakamura commented Feb 3, 2026

This problem has not been solved yet in the latest code. Please run the command to reproduce the bug.

lerobot-dataset-viz --repo-id "lerobot/pusht"  --episode-index 0 --mode distant --display-compressed-images true

Access to http://localhost:9090/?url=rerun%2Bhttp%3A%2F%2Flocalhost%3A9876%2Fproxy

@CarolinePascal CarolinePascal reopened this Feb 3, 2026
@CarolinePascal
Copy link
Collaborator

You're right, sorry ! I re-opened the PR and will try it asap - Thanks for notifying me.

@CarolinePascal
Copy link
Collaborator

Hi @sotanakamura,

This PR indeed solves the issue, again sorry for the early deletion. Before merging it, could you change open_browser to True (it's handier than having to get the URL manually) ? Thank you !

Best,

Caroline.

@CarolinePascal
Copy link
Collaborator

Duplicate of #2534

@CarolinePascal CarolinePascal marked this as a duplicate of #2534 Feb 5, 2026
@sotanakamura
Copy link
Contributor Author

Thank you for reviewing my PR. I found that opening a web viewer in a remote machine dose not work well. Instead of that, I added command line output to show the web viewer URI.

I also fixed the following problems:

  • fix the command line help
  • deprecate the unused ws_port option
  • remove "required" from --display-compressed-images
  • add grpc_port option

@CarolinePascal
Copy link
Collaborator

CarolinePascal commented Feb 6, 2026

Thank you for the additions ! Deprecating websockets was the next item in my TODO 👍

Though I'm not 100% sure the way you recover the distant machine IP will be robust on all setups... I think you can safely ask the user to provide the distant machine IP in the URL, or to use ssh forwarding as we did for websockets (c.f. file header).

Also to avoid syntax errors on the URL, you can stick to the rerun command : rerun rerun+http://{remote_ip}:{grpc_port}/proxy.

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.

Rerun can not display datasets in the distant mode

2 participants