Spaces:
Sleeping
Sleeping
Download src/cdpr/learn/rl/__init__.py from JoeTach/cdpr-simulator: direct link, hf CLI and curl.
- Browser
- Download file 836 Bytes
-
https://huggingface.co/spaces/JoeTach/cdpr-simulator/resolve/main/src/cdpr/learn/rl/__init__.py
- Command line
-
hf download hf://spaces/JoeTach/cdpr-simulator/src/cdpr/learn/rl/__init__.py
-
curl -L -o __init__.py https://huggingface.co/spaces/JoeTach/cdpr-simulator/resolve/main/src/cdpr/learn/rl/__init__.py
836 Bytes
| """Reinforcement-learning wrappers around Stable-Baselines3. | |
| Three thin factories (one per algorithm) build a configured SB3 agent | |
| over a :class:`cdpr.learn.env.CDPREnv`. They share the | |
| :class:`PhysicsLoggingCallback`, which records per-step physics | |
| diagnostics (tracking error, condition number, infeasibility rate, | |
| tension bounds usage) alongside the standard SB3 logger so a learning | |
| curve is interpretable in CDPR terms, not just "episode reward went up". | |
| Construction is lazy --- importing this package does not import SB3; | |
| calling a factory does, and raises a helpful install hint if the extra | |
| is missing. | |
| """ | |
| from cdpr.learn.rl.callbacks import PhysicsLoggingCallback | |
| from cdpr.learn.rl.factories import make_ppo, make_sac, make_td3 | |
| __all__ = [ | |
| "PhysicsLoggingCallback", | |
| "make_ppo", | |
| "make_sac", | |
| "make_td3", | |
| ] | |