rl-job-cleanup

Publish the best RL training checkpoint to Hugging Face and Supabase after job termination.

276|37|Updated Dec 5, 2025
One-click install
npx skills add https://github.com/open-thoughts/OpenThoughts-Agent --skill rl-job-cleanup
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rl-job-cleanup
Source: https://github.com/open-thoughts/OpenThoughts-Agent/tree/main/.claude/skills/rl-job-cleanup
Command: npx skills add https://github.com/open-thoughts/OpenThoughts-Agent --skill rl-job-cleanup

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Preserve and publish finished RL training checkpoints after a job terminates on an HPC cluster, ensuring reproducibility and proper artifact management across the full restart chain.

Core Features & Use Cases

  • Cancel pending retries for a completed RL run to avoid conflicts and wasted compute.
  • Locate and select the best checkpoint using a trailing-5 EMA of reward across all restart links, then flatten weights to the repository root.
  • Upload artifacts to Hugging Face under laion/<job_name>-<step>-<size>, scan for secrets, and register the run in the database with cross-user safety checks.
  • Upload training traces, parse metrics, and re-upload debugging logs to support auditing and analysis.
  • Clean up the experiments directory after successful publication to reclaim storage.

Quick Start

Run the rl-job-cleanup workflow for a completed RL job to preserve the best checkpoint, upload artifacts, register metadata, and clean up.

Frequently Asked Questions about rl-job-cleanup

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I automatically publish RL training checkpoints to Hugging Face after a job terminates?

Automated checkpoint publishing uploads your RL training artifacts to Hugging Face after a job terminates. The workflow selects the best checkpoint using a trailing-5 EMA of reward, flattens weights to the repo root, and uploads them under laion/<job_name>-<step>-<size>.

How are the best RL experiment steps selected for artifact upload?

Best RL experiment steps are selected by calculating a trailing-5 EMA of reward across all restart links. This identifies the highest-performing checkpoint to flatten to the repository root and publish, ensuring optimal model preservation.

Does RL artifact publication include secret scanning and database registration?

RL artifact publication includes a secret scan before uploading weights to Hugging Face. It also registers the run in a Supabase database with cross-user safety checks and uploads training traces to support auditing.

Can I clean up the experiments directory and cancel pending retries after an HPC RL run?

You can clean up the experiments directory and cancel pending retries after an HPC RL run. The workflow cancels pending retries to avoid wasted compute, then removes the experiments directory after successful publication to reclaim storage.

What is the best way to preserve Hugging Face RL artifacts and parse training traces?

Preserving Hugging Face RL artifacts involves uploading the best checkpoint weights alongside parsed training traces. The workflow re-uploads debugging logs and metrics to support post-run analysis and maintain full reproducibility across the restart chain.