-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Mock evals reference camera names from local config, not model #1135
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
Comments
FYI was able to prove this out: However... going to wait on #777 before finalizing any changes. Of note, it looks like the robot.mock still relies on local physical robot config for some reason. I think this is less of a concern given that robot configs are more likely to be consistent, and others are less likely to be running evals for robots that they don't have configured, but it would be nice to have. Along those lines... probably would be good to think about having configs and cache in gitignore and possibly refactor so that all robots aren't lumped together (haven't looked at #777 in depth so possible this is addressed there). In any case, will revisit after those updates come through. PS - Sounds like it's possible that this is at least loosely related to #699 and #694 as well. |
Hi, thanks for your proposal! Just so that I understand the use case here: you're trying to run a pretrained policy on a mocked robot for testing/debug purposes? We are removing the On the more general problem of matching robots features keys with the ones expected by the policies, we're thinking of having a pipeline system -much like in most ML frameworks- to handle these translations. WDYT?
Calibration files are written to |
Thanks @aliberts - yes this was for testing hardware setup. It was a nice to have but I don't necessarily need it to persist. This conversation is possibly going beyond the scope of this, but since this was where I was pointed to have a design discussion let's go for it :) Let's say we have the following categories for related assets: Operational Cache
Generated Output
Static User Configuration Files
Generated Environmental Details / State / Calibration
Summary
TBD: Generated CalibrationI would consider this to be a type of environmental state file. If we assume the cache is considered to be fully ephemeral then I'm not sure that TBD: User ConfigurationThe elephant in the room :) This needs to be revisited separately; it would be a massive improvement for the project and developer experience if the configuration were abstracted from the implementation. I burned a bunch of time when I took a crack at this before I knew about the move to Draccus was happening, another user explored a different solution this week, and it sounds like now there are more design changes coming which would also block potential related improvements. My initial thought is to align with existing convention and simplify with TL;DR I would suggest
|
PS - I also agree about a pipeline, and I think the above could also serve as as a foundation for mapping models/features to local config |
Starting this as a conversation to confirm approach before submitting a PR.
Conceptually I feel good about this proposal, but I'd like to get confirmation from others who have been around longer than I have to confirm that this is a desired approach. Also mentioning related issues #1095 and #1078.
The Problem
Proposed Solution
Adapt the mock robot creation process to use camera names from the model's normalization statistics when mock mode is enabled and a policy is provided.
Specific Changes:
Add a utility function to extract camera names from policy
lerobot/common/policies/utils.py
extract_camera_names_from_policy(policy)
that:Modify robot creation to adapt camera names in mock mode
lerobot/common/robot_devices/robots/utils.py
make_robot_from_config(config, policy=None)
to:Update the control flow to load policy before creating the robot
lerobot/scripts/control_robot.py
control_robot(cfg)
to:make_robot_from_config
I expect that this is an easy one to accept because it works with existing framework, only affects mock mode with policies, and uses actual camera names from the model (assuming they are available) but would be easy to fallback to local config if not.
The text was updated successfully, but these errors were encountered: