Instructions to use StrongRoboticsLab/pi05-so100-diverse with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- LeRobot
How to use StrongRoboticsLab/pi05-so100-diverse with LeRobot:
# No code snippets available yet for this library. # To use this model, check the repository files and the library's documentation. # Want to help? PRs adding snippets are welcome at: # https://github.com/huggingface/huggingface.js
- Notebooks
- Google Colab
- Kaggle
bot commited on
Commit ·
684902a
1
Parent(s): 9092725
Retry final upload 5x, skip shutdown on failure
Browse filesFiles changed (2)
570 unmodified lines571572573574575576577578579580581582583584585586570 unmodified lineslogging.info("End of training")if cfg.policy.push_to_hub:try:unwrapped_policy = accelerator.unwrap_model(policy)if cfg.policy.use_peft:unwrapped_policy.push_model_to_hub(cfg, peft_model=unwrapped_policy)else:unwrapped_policy.push_model_to_hub(cfg)preprocessor.push_to_hub(cfg.policy.repo_id)postprocessor.push_to_hub(cfg.policy.repo_id)except Exception as e:logging.warning(f"End-of-training push to hub failed (non-fatal): {e}")# Properly clean up the distributed process groupaccelerator.wait_for_everyone()570 unmodified lines571572573574575576577578579580581582583584585586587588589590591592593594595596597570 unmodified lineslogging.info("End of training")if cfg.policy.push_to_hub:upload_success = Falsefor attempt in range(5):try:unwrapped_policy = accelerator.unwrap_model(policy)if cfg.policy.use_peft:unwrapped_policy.push_model_to_hub(cfg, peft_model=unwrapped_policy)else:unwrapped_policy.push_model_to_hub(cfg)preprocessor.push_to_hub(cfg.policy.repo_id)postprocessor.push_to_hub(cfg.policy.repo_id)logging.info("Final model uploaded to HF successfully")upload_success = Truebreakexcept Exception as e:logging.error(f"Final model upload attempt {attempt+1}/5 failed: {e}")import timetime.sleep(30)if not upload_success:logging.error("CRITICAL: Final model upload failed after 5 attempts. DO NOT shut down - weights are still on disk.")import syssys.exit(1) # Non-zero exit prevents shutdown in train_cloud.sh# Properly clean up the distributed process groupaccelerator.wait_for_everyone()
73 unmodified lines7475767778798073 unmodified linesprint('Log uploaded')" 2>&1 | tee -a "$LOG_FILE"# Auto-shutdown if running on cloud (sudo available)if command -v sudo &> /dev/null; thensudo shutdown -h nowfi73 unmodified lines7475767778798081828373 unmodified linesprint('Log uploaded')" 2>&1 | tee -a "$LOG_FILE"# Only auto-shutdown if training succeeded (exit 0 = weights uploaded)if [ "$TRAIN_EXIT" -eq 0 ] && command -v sudo &> /dev/null; thensudo shutdown -h nowelseecho "=== NOT shutting down: training exited with code $TRAIN_EXIT ===" | tee -a "$LOG_FILE"echo "=== Weights may still be on disk at /ephemeral/production_run ===" | tee -a "$LOG_FILE"fi
lerobot/src/lerobot/scripts/lerobot_train.py+21-10
train_cloud.sh+5-2