Instructions to use tuanhqv123/tars-mini with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- stable-baselines3
How to use tuanhqv123/tars-mini with stable-baselines3:
from huggingface_sb3 import load_from_hub checkpoint = load_from_hub( repo_id="tuanhqv123/tars-mini", filename="{MODEL FILENAME}.zip", ) - Notebooks
- Google Colab
- Kaggle
Download sim/hip_study.py from tuanhqv123/tars-mini: direct link, hf CLI and curl.
- Browser
- Download file 925 Bytes
-
https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/hip_study.py
- Command line
-
hf download hf://tuanhqv123/tars-mini/sim/hip_study.py
-
curl -L -o hip_study.py https://huggingface.co/tuanhqv123/tars-mini/resolve/main/sim/hip_study.py
925 Bytes
| """Self-righting vs hip (shaft) position: TARS-AI places it ~30 mm from the top (mini scale).""" | |
| import json, sys | |
| from multiprocessing import Pool | |
| from model import Params | |
| from getup import getup | |
| def job(a): | |
| hft, face, alpha, mu = a | |
| r, _ = getup(Params(hip_from_top=hft, mu=mu, cells=0.030, ups=0.012), face, alpha) | |
| return dict(hip_from_top_mm=round(hft * 1000, 1), **r) | |
| if __name__ == "__main__": | |
| jobs = [(h, f, 90, mu) for h in (0.030, 0.060, 0.0875) for f in ("front", "back") for mu in (0.5, 0.8, 1.0)] | |
| with Pool(9) as p: | |
| R = p.map(job, jobs) | |
| json.dump(R, open("../results/hip_study.json", "w"), indent=1) | |
| for r in R: | |
| print(f"hip {r['hip_from_top_mm']:5.1f} mm from top {r['face']:5s} mu {r['mu']} ok {r['ok']!s:5s} " | |
| f"final {r['final_tilt']:6.1f}° after push {r['tilt_after_push']:6.1f}° swing peak {r['swing_peak']:4.0f}% p95 {r['swing_p95']:4.0f}%") | |