Skip to content

fix(skills): match cortex-training-rl to the current Arctic Platform recipes - #874

Merged
neubig merged 6 commits into
OpenHands:mainfrom
sfc-gh-kganesan:fix/cortex-training-rl-current-recipes
Nov 1, 2026
Merged

neubig merged 6 commits into
OpenHands:mainfrom
sfc-gh-kganesan:fix/cortex-training-rl-current-recipes

Conversation

@sfc-gh-kganesan

@sfc-gh-kganesan sfc-gh-kganesan commented Oct 31, 2026 •

Copy link
Copy Markdown
Contributor

HUMAN:
I tested this skill end to end on Cortex Training against current Arctic Platform, on two paths: Harbor with Snowflake sandboxes, and Harbor with HARBOR_ENV=host. The direct code localization recipe was also run. Every command in it was run as written. Paths we didn't run are marked untested rather than left out.

The Snowflake sandbox path needs Snowflake-AI-Research/Arctic-Platform#404. Please merge this after it lands. The host and code localization paths already work on Arctic Platform main.


AGENT:

Why

Following cortex-training-rl against current Arctic Platform main fails before training starts:

  • The skill runs only cortex-training login. The Arctic Platform launchers read the Cortex connection only from ARCTIC_CORTEX_*, so their preflight stops with "no Cortex connection".
  • It lists openhands-sdk and openhands as HARBOR_AGENT values. The Harbor launcher now refuses agents that Harbor installs inside the environment, because task code there could read the rollout's API key.
  • It says the default HARBOR_ENV is HostEnvironment. The default is now the Snowflake sandbox, and the Harbor launch sets no HARBOR_ENV_KWARGS, so the launcher's preflight stops before provisioning GPUs.

Summary

  • Preflight exports ARCTIC_CORTEX_* from the login config JSON.
  • The Harbor launch sets HARBOR_ENV_KWARGS (base_image: sandbox-base, which needs no image repository), and the HARBOR_AGENT / HARBOR_ENV / HARBOR_ENV_KWARGS descriptions match the launcher.
  • Troubleshooting covers the two preflight refusals, a Snowflake run where every rollout errors because the registry rejects image pushes, and rollouts failing on the 100-sandbox quota or an expired session, with a cleanup snippet.
  • Only commands and paths that were run end to end:
  • From an OpenHands agent following the skill from a fresh home directory: step 2 clones SkyRL and exports SKYRL_HOME, rule 4 says how to check login configs without printing them, and step 4 says when a step is done and that a run ends by itself. Launch and monitoring cover evaluation during training (eval/all/avg_score).

Issue Number

None.

How to Test

Follow the skill on a fresh clone of Arctic Platform main:

  1. Preflight, then export the four ARCTIC_CORTEX_* variables as shown.
  2. Run the direct code-localization launch from step 3 with trainer.max_training_steps=3. With ARCTIC_CORTEX_* exported, the launcher gets past its credential check, provisions Cortex, and trains.
  3. Run the Harbor launch from step 3 with its HARBOR_ENV_KWARGS and trainer.max_training_steps=3.

Results so far, from a fresh clone of Arctic Platform main:

Video/Screenshots

N/A (CLI).

Notes

The base_image option, the Snowflake sandbox reliability fixes and the pre-GPU check all ship in Snowflake-AI-Research/Arctic-Platform#404, which is merged. Training on Harbor tasks other than SWE-smith localization, and the skill's evaluation flags on such tasks, need Snowflake-AI-Research/Arctic-Platform#405. Merge this after it.

…recipes

The launchers read Cortex credentials only from ARCTIC_CORTEX_*, Harbor's
installed agents are refused, the Harbor default environment is the Snowflake
sandbox, and it needs base_image, image_repo, or a sandbox-path prebuilt_image.

Co-authored-by: Cursor <cursoragent@cursor.com>
@github-actions github-actions Bot added the type: fix A bug fix label Oct 31, 2026
sfc-gh-kganesan and others added 3 commits October 31, 2026 08:01
…and sandbox quota

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
- Find a run's job by its comment; nothing writes $CKPT_DIR/cortex_job_id.
- cortex-training capacity takes no --hardware flag.
- Harbor has no file_editor; document snowflake and host as the tested environments.
- Describe the launcher's first-task check and the errors it reports.
- Update the Harbor reference numbers to the 25-step Snowflake sandbox run.

Co-authored-by: Cursor <cursoragent@cursor.com>
@sfc-gh-kganesan
sfc-gh-kganesan marked this pull request as ready for review November 1, 2026 03:05
@sfc-gh-kganesan

Copy link
Copy Markdown
Contributor Author

@neubig could you review this? It updates cortex-training-rl for the latest Arctic Platform Harbor recipe, which was released today:

  1. Secure sandboxes by default. Each training rollout now runs in its own Snowflake sandbox. The skill sets this up, so model-generated commands never run on the user's machine.
  2. No image push needed. Tasks run on Snowflake's ready-made sandbox image, so users can train on their Harbor tasks without building or uploading container images.
  3. Problems caught before GPUs start. The launcher now tries one task first, and the skill explains its messages, so a setup mistake costs seconds instead of GPU time.
  4. Simpler setup and cleanup. The skill now connects the user's Cortex credentials for them, checks GPU availability, and confirms the GPUs are released when the run ends.
  5. New reference results. A 25-step run on Snowflake sandboxes reached a mean reward of 2.39 out of 3.0 over its last 5 steps.

Every command in the skill was run end to end on Cortex Training.

…hen a step is done

From an OpenHands agent following this skill end to end from a fresh home
directory.

Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
@neubig
neubig merged commit 21c88f5 into OpenHands:main Nov 1, 2026
9 of 10 checks passed
@openhands-release-bot openhands-release-bot Bot added the released: v0.39.0 Shipped in v0.39.0 label Nov 4, 2026
@openhands-release-bot

Copy link
Copy Markdown
Contributor

🚀 Released in v0.39.0.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released: v0.39.0 Shipped in v0.39.0 type: fix A bug fix

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants