build!: impose more strict constraint on rerun-sdk#1404
build!: impose more strict constraint on rerun-sdk#1404cverrier wants to merge 1 commit intohuggingface:mainfrom
Conversation
Originally, the constraint `rerun-sdk>=0.21.0` was imposed. However, in `rerun-sdk==0.23.0`, `Scalar` was deprecated in favor of the newly introduced `Scalars`. For relatively new users of LeRobot that install a new virtual environment, `rerun-sdk>=0.23.0` would be installed, hence raising multiple `DeprecationWarning`s when running robot experiments, which is annoying and clutters the logs. Therefore, replace `Scalar` with `Scalars` and update the associated dependency constraint accordingly. BREAKING CHANGE: requires rerun-sdk>=0.23.0 and replaces `Scalar` with `Scalars`, which is only available in rerun-sdk>=0.23.0. Users must upgrade their rerun-sdk version.
There was a problem hiding this comment.
Pull Request Overview
Updates the rerun-sdk requirement to v0.23.0+ and replaces deprecated Scalar calls with the new Scalars API to eliminate deprecation warnings.
- Bump
rerun-sdkconstraint inpyproject.toml - Replace
rr.Scalarwithrr.Scalarsin float logging within teleoperate and record loops
Reviewed Changes
Copilot reviewed 3 out of 3 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| pyproject.toml | Bumped rerun-sdk version requirement to >=0.23.0 |
| lerobot/teleoperate.py | Swapped rr.Scalar for rr.Scalars when logging floats |
| lerobot/record.py | Swapped rr.Scalar for rr.Scalars when logging floats |
Comments suppressed due to low confidence (2)
lerobot/teleoperate.py:87
- Consider adding a test to verify that float observations and actions are logged correctly using
rr.Scalars, ensuring no regressions and that deprecation warnings are gone.
rr.log(f"observation_{obs}", rr.Scalars(val))
lerobot/record.py:227
- Add a unit or integration test for the
record_loopto ensurerr.Scalarsis used for floats and no deprecation warnings are emitted.
rr.log(f"observation.{obs}", rr.Scalars(val))
|
Hi @cverrier, Thanks for the PR ! Is If that is all, I'll give it a try on my side and proceed to merge :) Best, Caroline. |
I don't know, I just saw the warnings that I mentioned earlier and decided to fix them, I didn't try to modify anything else 😄 |
|
Garbage collection (and Comparison with export RUST_LOG=debug LEROBOT_RERUN_MEMORY_LIMIT=100MiB; python -m lerobot.teleoperate --robot.type=so101_follower --robot.port=$F1_PORT --robot.id=f1 --robot.cameras="${CAMERA_CONFIG}" --teleop.type=so101_leader --teleop.port=$L1_PORT --teleop.id=l1 --display_data=trueI recommend always using a max version in requirements.txt. I usually set it to the next minor version, e.g. Made a PR for pinning the ceiling versions: #1435 |


What this does
Originally, the constraint
rerun-sdk>=0.21.0was imposed. However, inrerun-sdk==0.23.0,Scalarwas deprecated in favor of the newly introducedScalars. For relatively new users of LeRobot that install a new virtual environment,rerun-sdk>=0.23.0would be installed, hence raising multipleDeprecationWarnings when running robot experiments, which is annoying and clutters the logs. For example, runningwould lead to something similar to
for each recorded episode.
Therefore, replace
ScalarwithScalarsand update the associated dependency constraint accordingly (Scalarsis only available inrerun-sdk>=0.23.0).BREAKING CHANGE: requires rerun-sdk>=0.23.0 and replaces
ScalarwithScalars, which is only available in rerun-sdk>=0.23.0. Users must upgrade their rerun-sdk version.How it was tested
Run the same command as before:
No
DeprecationWarnings should be thrown anymore.How to checkout & try? (for the reviewer)
See explanations above.
Since this dependency update introduces a breaking change (for any user that has
rerun-sdk<0.23.0in his environment`), I am not sure you want to merge this pull request directly. But I found it nice to have it as reference for future dependency update. @CarolinePascal could you look at it?