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★ 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:
- Harbor RL (
recipes/rl/harbor+arctic_platform/integrations/harbor, PR #294): Takes any Harbor training and eval task directories (TRAIN_HARBOR_TASKSandEVAL_HARBOR_TASKS, each task containinginstruction.md,environment/, andtests/test.sh) and any target OpenHands agent (HARBOR_SKILL,OPENHANDS_TOOLS,OPENHANDS_SYSTEM_PROMPT_FILE, orHARBOR_AGENT). Each rollout is orchestrated by Harbor'sTrialand scored by Harbor'sVerifier(tests/test.sh$\to$/logs/verifier/reward.txtorreward.json). - Code localization (
recipes/rl/openhands/code_localization): Direct SWE-smith code localization (file + module + function F1, max3.0).
- Cortex Training guides:
docs/integrations/openhands.md·docs/integrations/bring-your-own-agent.md - Harbor recipe guide:
recipes/rl/harbor/README.md. Its Snowflake sandbox environment (HARBOR_ENV=snowflake) ships in Arctic Platform.
Rules
- Identify jobs by comment. Set
ARCTIC_CORTEX_JOB_COMMENTwith your name; never cancel a job whose comment is not yours. - One run per driver machine. Concurrent runs collide on tmux sessions, ptys, and workspace disk.
- Never
kill -9the driver. Stop withSIGTERMor Ctrl-C so the launcher's exit trap cancels the Cortex GPU job. - Keep credentials private. Never print, log, or commit PATs or login configs. Don't
cat~/cortex-training-config.jsonor~/.snowflake/connections.toml; check them withjq 'keys'orgrep -c '^\['. - 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): PointTRAIN_HARBOR_TASKSandEVAL_HARBOR_TASKSat any directories of Harbor tasks (instruction.md+tests/test.sh). To export SWE-smith code localization into Harbor task directories (train/andeval/):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
Установить cortex-training-rl в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
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), без исполняемых скриптов.
Похожие скиллы
mcp-builder
Guide for creating high-quality MCP (Model Context Protocol) servers that enable LLMs to interact with external services through well-designed tools. Use when…
от Anthropicclaude-api
Reference for the Claude API / Anthropic SDK — model ids, pricing, params, streaming, tool use, MCP, agents, caching, token counting, model migration. TRIGGER…
от Anthropicalgorithmic-art
Creating algorithmic art using p5.js with seeded randomness and interactive parameter exploration. Use this when users request creating art using code…
от Anthropicmcp-integration
This skill should be used when the user asks to "add MCP server", "integrate MCP", "configure MCP in plugin", "use .mcp.json", "set up Model Context…
от Anthropic