Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

cortex-training-rl

БесплатноБез исполняемых скриптовНе проверен

Run reinforcement-learning post-training of a model inside the OpenHands agent harness on Snowflake Cortex Training for any Harbor training and eval task…

OpenHandsот OpenHands★ 190 звёзд на GitHub

Об этом скилле

OpenHands RL post-training on Cortex Training

The trainer and the sampler run on Cortex Training GPUs (4 training + 4 sampling H200s). Your machine runs a CPU-only driver that executes OpenHands rollouts against a local OpenAI-compatible proxy (ChatCompletionsProxy) and sends the exact sampled token IDs (loss_mask = 1 on assistant turns, 0 on prompts and tool outputs) plus verifier rewards back to Cortex for a GSPO/GRPO update.

Two recipes ship in Arctic Platform:

  1. Harbor RL (recipes/rl/harbor + arctic_platform/integrations/harbor, PR #294): Takes any Harbor training and eval task directories (TRAIN_HARBOR_TASKS and EVAL_HARBOR_TASKS, each task containing instruction.md, environment/, and tests/test.sh) and any target OpenHands agent (HARBOR_SKILL, OPENHANDS_TOOLS, OPENHANDS_SYSTEM_PROMPT_FILE, or HARBOR_AGENT). Each rollout is orchestrated by Harbor's Trial and scored by Harbor's Verifier (tests/test.sh $\to$ /logs/verifier/reward.txt or reward.json).
  2. Code localization (recipes/rl/openhands/code_localization): Direct SWE-smith code localization (file + module + function F1, max 3.0).

Rules

  1. Identify jobs by comment. Set ARCTIC_CORTEX_JOB_COMMENT with your name; never cancel a job whose comment is not yours.
  2. One run per driver machine. Concurrent runs collide on tmux sessions, ptys, and workspace disk.
  3. Never kill -9 the driver. Stop with SIGTERM or Ctrl-C so the launcher's exit trap cancels the Cortex GPU job.
  4. Keep credentials private. Never print, log, or commit PATs or login configs. Don't cat ~/cortex-training-config.json or ~/.snowflake/connections.toml; check them with jq 'keys' or grep -c '^\['.
  5. Keep recipe hyperparameters intact. Fix environment issues (references/troubleshooting.md) rather than changing batch size, context length, or learning rate.

Workflow

1. Preflight

cortex-training login ~/cortex-training-config.json   # once per machine
# The launchers read the Cortex connection only from ARCTIC_CORTEX_*; login alone is not enough.
cfg=~/cortex-training-config.json
export ARCTIC_CORTEX_HOST=$(jq -r .host "$cfg") ARCTIC_CORTEX_DATABASE=$(jq -r .database "$cfg")
export ARCTIC_CORTEX_SCHEMA=$(jq -r .schema "$cfg") ARCTIC_CORTEX_PAT=$(jq -r .pat "$cfg")
cortex-training capacity                              # available_gpus must be at least 8
cortex-training list --status running                 # check for live jobs
pgrep -af 'run_qwen35_4b.sh|skyrl.train'              # live driver on this host?
tmux ls 2>/dev/null | grep -c '^openhands-'           # leaked rollout sessions
cat /proc/sys/kernel/pty/nr /proc/sys/kernel/pty/max  # ptys in use / limit
df -h "${OPENHANDS_WORKSPACE:-/tmp/testbed}"          # workspace disk

If no run is live and openhands-* tmux sessions remain, clear them before launching:

tmux ls -F '#{session_name}' 2>/dev/null | grep '^openhands-' | xargs -r -n1 tmux kill-session -t

2. Prepare data

Requires uv. Run everything below from the root of an Arctic-Platform checkout, with SkyRL at skyrl-v0.3.0 next to it:

git clone https://github.com/Snowflake-AI-Research/Arctic-Platform && cd Arctic-Platform
git clone --branch skyrl-v0.3.0 --depth 1 https://github.com/NovaSky-AI/SkyRL
export SKYRL_HOME=$PWD/SkyRL
  • Any Harbor task set (recipes/rl/harbor): Point TRAIN_HARBOR_TASKS and EVAL_HARBOR_TASKS at any directories of Harbor tasks (instruction.md + tests/test.sh). To export SWE-smith code localization into Harbor task directories (train/ and eval/):
    uv run recipes/rl/harbor/prepare_data.py \
      --export-swe-smith-to ~/data/swe-smith-harbor-tasks \
      --out ~/data/harbor-rl
    
  • Direct SWE-smith code localization (recipes/rl/openhands/code_localization):
    uv run recipes/rl/openhands/code_localization/prepare_data.py
    

3. Launch detached

Always launch on a dedicated tmux socket (-L "$RUN_NAME") with TMUX and TMUX_PANE unset so libtmux inside OpenHands does not attach to the launcher's tmux server.

Harbor RL (recipes/rl/harbor/run_qwen35_4b.sh):

export RUN_NAME=qwen35-4b-harbor-rl-$(date +%m%d-%H%M)
export CKPT_DIR=$HOME/checkpoints/$RUN_NAME
export TRAIN_HARBOR
Полный SKILL.md на GitHub

Установить cortex-training-rl в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

.claude-plugin.codex-plugin.plugin/plugin.jsonREADME.mdcommands/cortex-training-rl.mdreferences/monitoring.mdreferences/troubleshooting.md

FAQ

Что делает скилл cortex-training-rl?

Run reinforcement-learning post-training of a model inside the OpenHands agent harness on Snowflake Cortex Training for any Harbor training and eval task directories or SWE-smith code localization, and generate the reward convergence graph. Use when asked to launch, monitor, debug, stop, or plot an OpenHands or Harbor RL run on Cortex Training.

Как установить скилл cortex-training-rl?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл cortex-training-rl запускает скрипты?

Нет, скилл состоит только из инструкций (SKILL.md), без исполняемых скриптов.

Похожие скиллы

Сравнить cortex-training-rl с