-
Notifications
You must be signed in to change notification settings - Fork 234
Feature: Add platform integration. #1896
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 15 commits
Commits
Show all changes
25 commits
Select commit
Hold shift + click to select a range
fe3034d
Add platform integration.
d42me 5844504
Comments.
d42me 4951f73
Merge remote-tracking branch 'origin/main' into feature/add-platform-…
d42me b731caf
Address feedback.
d42me 2b6b5b3
Merge branch 'main' into feature/add-platform-integration
d42me ede47e9
Refactor orchestrator integration.
d42me ca4f10d
Update skill. Add on exit case.
d42me 0be0977
Refactor to use prime monitor.
d42me 9c7da8a
Remove log.
d42me 4ebc17e
Merge branch 'main' into feature/add-platform-integration
d42me 7b3a5e7
Update changelog.
d42me 4312b20
Update comment.
d42me 1f70b2e
Update docs.
d42me d743a53
Fix base url conflict and add try/catch for platform calls.
d42me a262003
Fix edge case.
d42me 5412162
Merge branch 'main' into feature/add-platform-integration
d42me 582b492
Fix PrimeMonitor registration auth reuse
d42me 8274a4f
Merge origin/main into feature/add-platform-integration
d42me 83b6686
Handle missing Prime CLI config in PrimeMonitor
d42me 8cf4a24
Remove PrimeMonitor fallback unit test
d42me 68c76a5
Guard PrimeMonitor finalization on close
d42me 72fa18e
Remove PrimeMonitor config fallback try blocks
d42me 9bd7519
Use frontend URL for PrimeMonitor dashboard links
d42me 1b00086
Handle missing PrimeMonitor frontend URL
d42me f3b0879
Document platform monitoring setup
d42me File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
d42me marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,54 @@ | ||
| # Prime Platform Local Run | ||
|
|
||
| Stream live training metrics/samples to the Prime Intellect platform from any machine, without hosted infrastructure. | ||
|
|
||
| ## Prerequisites | ||
|
|
||
| Your `PRIME_API_KEY` must have `rft:write` scope. Log in via the `prime` CLI: | ||
| ```bash | ||
| prime login | ||
| ``` | ||
|
|
||
| Or set the environment variable directly: | ||
| ```bash | ||
| export PRIME_API_KEY=pit_... | ||
| ``` | ||
|
|
||
| ## Usage | ||
|
|
||
| Add `[orchestrator.prime_monitor]` to your TOML config: | ||
|
|
||
| ```toml | ||
| [orchestrator.prime_monitor] | ||
| run_name = "my-experiment" # optional; defaults to W&B run name if set | ||
| ``` | ||
|
|
||
| Or as a CLI override: | ||
| ```bash | ||
| uv run rl @ config.toml --orchestrator.prime_monitor.run_name "my-experiment" | ||
| ``` | ||
|
|
||
| If `RUN_ID` is not already set in the environment, prime-rl will automatically: | ||
| 1. Resolve API key from `PRIME_API_KEY` env var or `~/.prime/config.json` (via `prime login`) | ||
| 2. Call `POST /api/v1/rft/external-runs` → extract `run.id`, print dashboard URL | ||
| 3. Set `RUN_ID` in the orchestrator process | ||
| 4. Stream metrics/samples/distributions to `api/internal/rft` during training | ||
| 5. On completion (or crash), call `PUT /api/v1/rft/external-runs/{run_id}/status` | ||
|
|
||
| If `RUN_ID` is already set (hosted K8s runs inject it directly), registration is skipped and monitoring proceeds normally. | ||
|
|
||
| ## Optional fields | ||
|
|
||
| ```toml | ||
| [orchestrator.prime_monitor] | ||
| run_name = "qwen3-reverse-text" | ||
| team_id = "clxxx..." # show run under a team | ||
d42me marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
| base_url = "https://api.primeintellect.ai/api/v1/rft" # default | ||
| ``` | ||
|
|
||
| ## Auth | ||
|
|
||
| `PRIME_API_KEY` (from env or `~/.prime/config.json`) is used for both creating the run and streaming data. | ||
| The key must have `rft:write` scope — granted by default when you `prime login`. | ||
|
|
||
| `team_id` is resolved from `prime_monitor.team_id` in config, then from `~/.prime/config.json`. | ||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.