|
Download README.md from ynkos/curriculum-learning-panda: direct link, hf CLI and curl.
- Browser
- Download file 2.72 kB
-
https://huggingface.co/ynkos/curriculum-learning-panda/resolve/main/README.md
- Command line
-
hf download hf://ynkos/curriculum-learning-panda/README.md
-
curl -L -o README.md https://huggingface.co/ynkos/curriculum-learning-panda/resolve/main/README.md
2.72 kB
| library_name: brax | |
| tags: | |
| - reinforcement-learning | |
| - robotics | |
| - mujoco | |
| - mjx | |
| - ppo | |
| - franka-panda | |
| - curriculum-learning | |
| # Curriculum Learning for Robotic Manipulation: Trained Weights | |
| PPO policy and value weights for every run in [ynkos22/Curriculum_Learning](https://github.com/ynkos22/Curriculum_Learning). That project tests whether pretraining on harder tasks transfers better than pretraining on easier ones (Franka Panda, MuJoCo MJX, Brax PPO, 50 tasks). | |
| Code, results tables and figures are in the GitHub repo. This repo only holds the weights. | |
| ## Layout | |
| The folders mirror `runs/` in the GitHub repo. Each run folder contains `params.pkl` (final), `best_params.pkl` (best eval), `config.json` and `summary.json`. | |
| | Folder | Runs | Contents | | |
| | :--- | :---: | :--- | | |
| | `phase1_calibration_final/<Task>/seed_<s>/` | 150 | Single-task PPO from scratch, 50 tasks × 3 seeds, 40M steps | | |
| | `phase2_pretrain/<condition>/seed_<s>/` | 15 | Multi-task pretraining, 5 conditions (`easy`, `medium`, `hard`, `uniform`, `curriculum`) × 3 seeds, 120M steps. Also `ckpt_40M.pkl`, `ckpt_80M.pkl`, `ckpt_120M.pkl` | | |
| | `phase2_transfer/<condition>/seed_<s>/<Task>/` | 210 | Fine-tuning from each pretrained model on 14 held-out tasks, 40M steps | | |
| | `phase2_hero_snapshots/<Task>/<condition>/seed_0/` | 18 | Selected fine-tuning runs with checkpoints at 0, 5, 10, 20 and 40M steps | | |
| ## Format | |
| Each `.pkl` is a pickled Brax PPO params tuple `(normalizer_params, policy_params, value_params)` as NumPy arrays (loading needs `brax` installed). Network: 155-D observation, 8-D action, policy and value MLPs of (256, 256, 256). | |
| Pickle files can run code when loaded. Only load files from a source you trust. | |
| ## Usage | |
| ```python | |
| import pickle | |
| import jax, jax.numpy as jnp | |
| from huggingface_hub import hf_hub_download | |
| from brax.training.acme import running_statistics | |
| from brax.training.agents.ppo import networks as ppo_networks | |
| path = hf_hub_download( | |
| "ynkos/curriculum-learning-panda", | |
| "phase2_pretrain/hard/seed_0/params.pkl", | |
| ) | |
| with open(path, "rb") as f: | |
| params = jax.tree_util.tree_map(jnp.asarray, pickle.load(f)) | |
| net = ppo_networks.make_ppo_networks( | |
| 155, 8, | |
| preprocess_observations_fn=running_statistics.normalize, | |
| policy_hidden_layer_sizes=(256, 256, 256), | |
| value_hidden_layer_sizes=(256, 256, 256), | |
| ) | |
| policy = ppo_networks.make_inference_fn(net)(params, deterministic=True) | |
| ``` | |
| To fine-tune from a checkpoint, pass it to the trainer in the GitHub repo: | |
| ```bash | |
| python -m curriculum_learning.train_baseline --task <Task> --restore_params_path params.pkl | |
| ``` | |
| Download a whole folder with `huggingface_hub.snapshot_download(..., allow_patterns="phase2_pretrain/*")`. | |