Instructions to use Johnli2/ETIC_train with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use Johnli2/ETIC_train with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="Johnli2/ETIC_train", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
|
Download README.md from Johnli2/ETIC_train: direct link, hf CLI and curl.
- Browser
- Download file 2.93 kB
-
https://huggingface.co/Johnli2/ETIC_train/resolve/main/README.md
- Command line
-
hf download hf://Johnli2/ETIC_train/README.md
-
curl -L -o README.md https://huggingface.co/Johnli2/ETIC_train/resolve/main/README.md
2.93 kB
| tags: | |
| - reinforcement-learning | |
| - mujoco | |
| - stable-baselines3 | |
| # ETIC Task A training runs (Ant-v5 actuator-fault baselines) | |
| Six training runs for ETIC Task A: `sac_hist` and `rppo`, seeds 0/1/2, 10M environment steps each, checkpoint every 1M. | |
| Layout follows `task_a.py` (`runs/<variant>_s<seed>/`), so the directories can be dropped into | |
| `CS01:~/ETIC/paper/revision_analysis/laptop_runs/` and evaluated there with `task_a.py eval`. | |
| Evaluation results are **not** included; they are produced on CS01. | |
| | Path | Content | | |
| |---|---| | |
| | `runs/<variant>_s<seed>/ckpt_<N>.zip` | SB3 model, N = 1000000 … 10000000 | | |
| | `runs/rppo_s<seed>/vecnorm_<N>.pkl` | VecNormalize statistics (required for rppo eval) | | |
| | `runs/<variant>_s<seed>/train_log.json` | `[{"steps", "mean_return", "hours"}]`, one entry per 1M (training-time return) | | |
| | `logs/<variant>_s<seed>.log` | launcher stdout, one `[progress]` line per minute | | |
| | `MANIFEST.sha256` | sha256 of every file above (`sha256sum -c MANIFEST.sha256`) | | |
| ## How they were trained | |
| - `task_a.py` and `eval_cases.json` from the handoff, unmodified (sha256 `32df1de3…86d7e1` and `95a44011…f3360b`, checked | |
| before launch). All hyperparameters are the ones in `task_a.py`. | |
| - Environment: Python 3.10, torch 2.13.0+cu129, gymnasium 1.3.0, mujoco 3.11.0, stable-baselines3 2.9.0, | |
| sb3-contrib 2.9.0, numpy 2.2.6. Hardware: NVIDIA L20X, Intel Xeon Platinum 8558. | |
| - Launched through a speed launcher (`etic_fast.py`) that imports `task_a.py` unchanged and calls | |
| `task_a.train(variant, seed, out, "cuda", 10_000_000, 1_000_000)`. It patches library internals only: | |
| 1. **rppo:** sb3-contrib's `_process_sequence` falls back to a per-timestep Python loop whenever a minibatch contains an | |
| episode start. Because `RecurrentRolloutBuffer` cuts sequences at episode starts, a start can only be at position 0, | |
| so the launcher zeroes those sequences' initial state and runs one cuDNN LSTM call (it falls back to the original | |
| loop if a start ever appears later in a sequence). Checked equal to the original in float64 (gradients within | |
| 1e-15); on GPU in float32 the difference is TF32 rounding (~3e-4). | |
| 2. **sac_hist:** same `SAC.train` math without per-step host syncs: the logging-only `.item()` calls removed, | |
| `torch.distributions` argument validation off, a GPU mirror of the replay buffer sampled with the same | |
| `np.random.randint` indices, critic parameters frozen during the actor loss, polyak update via `torch._foreach_*`. | |
| Training state after N steps was checked bitwise identical to stock SB3 on CPU and on GPU. | |
| 3. Every minute the launcher checks that all policy parameters are finite and stops the run otherwise (with | |
| validation off this keeps the original fail-fast behaviour). | |
| - Wall time: rppo ≈ 3.3–3.6 h per run (3 runs sharing one GPU), sac_hist ≈ 15 h per run (3 sharing one GPU); per-1M | |
| times are in `train_log.json`. | |