Commit Graph

810 Commits

Author SHA1 Message Date
Michel Aractingi 98c473a41e Added support for checkpointing the policy. We can save and load the policy state dict, optimizers state, optimization step and interaction step
Added functions for converting the replay buffer from and to LeRobotDataset. When we want to save the replay buffer, we convert it first to LeRobotDataset format and save it locally and vice-versa.

Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:44:10 +01:00
Michel Aractingi c84ac4a798 Removed unnecessary time.sleep in the streaming server on the learner side
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:43:28 +01:00
Michel Aractingi 7cfd2c7676 Added missing config files `env/maniskill_example.yaml` and `policy/sac_maniskill.yaml` that are necessary to run the lerobot implementation of sac with the maniskill baselines.
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:43:28 +01:00
Michel Aractingi fb47eeb9e3 - Added additional logging information in wandb around the timings of the policy loop and optimization loop.
- Optimized critic design that improves the performance of the learner loop by a factor of 2
- Cleaned the code and fixed style issues

- Completed the config with actor_learner_config field that contains host-ip and port elemnts that are necessary for the actor-learner servers.

Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:43:28 +01:00
Michel Aractingi 2acac87969 FREEDOM, added back the optimization loop code in `learner_server.py`
Ran experiment with pushcube env from maniskill. The learning seem to work.

Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:43:28 +01:00
Michel Aractingi ab1273ca2f Added server directory in `lerobot/scripts` that contains scripts and the protobuf message types to split training into two processes, acting and learning. The actor rollouts the policy and collects interaction data while the learner recieves the data, trains the policy and sends the updated parameters to the actor. The two scripts are ran simultaneously
Co-authored-by: Adil Zouitine <adilzouitinegm@gmail.com>
2025-03-24 13:43:28 +01:00
AdilZouitine 5ec330f82d Stable version of rlpd + drq 2025-03-24 13:42:57 +01:00
AdilZouitine 45eef44503 Add type annotations and restructure SACConfig class fields 2025-03-24 13:42:06 +01:00
Adil Zouitine 0e38125b29 Change SAC policy implementation with configuration and modeling classes 2025-03-24 13:42:06 +01:00
Adil Zouitine 65b8b47740 Add rlpd tricks 2025-03-24 13:41:35 +01:00
Adil Zouitine 967375229a SAC works 2025-03-24 13:41:35 +01:00
Adil Zouitine 0f4750de55 remove breakpoint 2025-03-24 13:41:35 +01:00
Adil Zouitine 51d858a36b [WIP] correct sac implementation 2025-03-24 13:41:35 +01:00
Adil Zouitine 521200f8a4 Add rlpd tricks 2025-03-24 13:41:35 +01:00
Adil Zouitine ca1a1f8a72 SAC works 2025-03-24 13:41:34 +01:00
Adil Zouitine 88934c7713 remove breakpoint 2025-03-24 13:41:34 +01:00
Adil Zouitine eb53a6edcb [WIP] correct sac implementation 2025-03-24 13:41:34 +01:00
Michel Aractingi 9e157454b3 Extend reward classifier for multiple camera views (#626) 2025-03-24 13:41:10 +01:00
Eugene Mironov f2e0426af0 [Port HIL_SERL] Final fixes for the Reward Classifier (#598) 2025-03-24 13:40:47 +01:00
Michel Aractingi 324404b47a added temporary fix for missing task_index key in online environment 2025-03-24 13:24:38 +01:00
Michel Aractingi ebff8f7437 split encoder for critic and actor 2025-03-24 13:24:23 +01:00
Michel Aractingi 5070295e59 style fixes 2025-03-24 13:24:23 +01:00
KeWang1017 012ef3217e Refactor SAC configuration and policy for improved action sampling and stability
- Updated SACConfig to replace standard deviation parameterization with log_std_min and log_std_max for better control over action distributions.
- Modified SACPolicy to streamline action selection and log probability calculations, enhancing stochastic behavior.
- Removed deprecated TanhMultivariateNormalDiag class to simplify the codebase and improve maintainability.

These changes aim to enhance the robustness and performance of the SAC implementation during training and inference.
2025-03-24 13:24:23 +01:00
KeWang1017 6380f82bbc Refine SAC configuration and policy for enhanced performance
- Updated standard deviation parameterization in SACConfig to 'softplus' with defined min and max values for improved stability.
- Modified action sampling in SACPolicy to use reparameterized sampling, ensuring better gradient flow and log probability calculations.
- Cleaned up log probability calculations in TanhMultivariateNormalDiag for clarity and efficiency.
- Increased evaluation frequency in YAML configuration to 50000 for more efficient training cycles.

These changes aim to enhance the robustness and performance of the SAC implementation during training and inference.
2025-03-24 13:24:23 +01:00
KeWang1017 ecb91b37eb Refactor SACPolicy for improved action sampling and standard deviation handling
- Updated action selection to use distribution sampling and log probabilities for better stochastic behavior.
- Enhanced standard deviation clamping to prevent extreme values, ensuring stability in policy outputs.
- Cleaned up code by removing unnecessary comments and improving readability.

These changes aim to refine the SAC implementation, enhancing its robustness and performance during training and inference.
2025-03-24 13:24:23 +01:00
KeWang1017 c89bcc5aa8 trying to get sac running 2025-03-24 13:24:23 +01:00
Michel Aractingi cc85bca2b5 Added normalization schemes and style checks 2025-03-24 13:24:23 +01:00
Michel Aractingi 3b07766c33 added optimizer and sac to factory.py 2025-03-24 13:23:53 +01:00
Eugene Mironov 287968b418 [HIL-SERL PORT] Fix linter issues (#588) 2025-03-24 13:23:02 +01:00
Eugene Mironov c9f1a037e3 [Port Hil-SERL] Add unit tests for the reward classifier & fix imports & check script (#578) 2025-03-24 13:23:02 +01:00
Michel Aractingi 8a7f74ee65 added comments from kewang 2025-03-24 13:21:05 +01:00
KeWang1017 8220546036 Enhance SAC configuration and policy with new parameters and subsampling logic
- Added `num_subsample_critics`, `critic_target_update_weight`, and `utd_ratio` to SACConfig.
- Implemented target entropy calculation in SACPolicy if not provided.
- Introduced subsampling of critics to prevent overfitting during updates.
- Updated temperature loss calculation to use the new target entropy.
- Added comments for future UTD update implementation.

These changes improve the flexibility and performance of the SAC implementation.
2025-03-24 13:21:05 +01:00
KeWang 214beec994 Port SAC WIP (#581)
Co-authored-by: KeWang1017 <ke.wang@helloleap.ai>
2025-03-24 13:21:05 +01:00
Michel Aractingi 909ca8d9b6 completed losses 2025-03-24 13:21:05 +01:00
Michel Aractingi 5fe56e0a49 nit in control_robot.py 2025-03-24 13:21:05 +01:00
Michel Aractingi a60d3facee Update lerobot/scripts/train_hilserl_classifier.py
Co-authored-by: Yoel <yoel.chornton@gmail.com>
2025-03-24 13:21:04 +01:00
Claudio Coppola 298a31bc45 LerobotDataset pushable to HF from any folder (#563) 2025-03-24 13:21:04 +01:00
berjaoui 05b8f8b4fd Update 7_get_started_with_real_robot.md (#559) 2025-03-24 13:21:04 +01:00
Michel Aractingi 0f05dc5faf Control simulated robot with real leader (#514)
Co-authored-by: Remi <remi.cadene@huggingface.co>
2025-03-24 13:21:04 +01:00
Remi 36d89156b1 Fix missing local_files_only in record/replay (#540)
Co-authored-by: Simon Alibert <alibert.sim@gmail.com>
2025-03-24 13:21:04 +01:00
Michel Aractingi 1dd5e3cd3f Refactor OpenX (#505) 2025-03-24 13:21:04 +01:00
Eugene Mironov 4f8633dd26 Fixup 2025-03-24 13:21:04 +01:00
Michel Aractingi d733e5681f Add human intervention mechanism and eval_robot script to evaluate policy on the robot (#541)
Co-authored-by: Yoel <yoel.chornton@gmail.com>
2025-03-24 13:21:02 +01:00
Yoel 0ebdae8a40 Reward classifier and training (#528)
Co-authored-by: Daniel Ritchie <daniel@brainwavecollective.ai>
Co-authored-by: resolver101757 <kelster101757@hotmail.com>
Co-authored-by: Jannik Grothusen <56967823+J4nn1K@users.noreply.github.com>
Co-authored-by: Remi <re.cadene@gmail.com>
Co-authored-by: Michel Aractingi <michel.aractingi@huggingface.co>
2025-03-24 13:20:43 +01:00
Michel Aractingi d037f4a322 nit 2025-03-24 13:19:37 +01:00
Steven Palma a6015a55f9
chore(scripts): remove deprecated script (#887) 2025-03-23 01:16:50 +01:00
Cole f39652707c
add docs details for resolving firmware update issues (#627)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Simon Alibert <75076266+aliberts@users.noreply.github.com>
2025-03-19 19:17:07 +01:00
Steven Palma 712d5dae4f
fix(os): fix default codec for windows (#875) 2025-03-18 22:04:21 +01:00
Pepijn 952e892fe5
Use float32 instead of int (#877) 2025-03-18 16:36:37 +01:00
Pepijn e8159997c7
User/pepijn/2025 03 17 act different image shapes (#870) 2025-03-18 11:09:05 +01:00