Skip to content

Create RFT on Fireworks directly#277

Merged
benjibc merged 2 commits intomainfrom
fireworks_create_rft
Oct 27, 2025
Merged

Create RFT on Fireworks directly#277
benjibc merged 2 commits intomainfrom
fireworks_create_rft

Conversation

@benjibc
Copy link
Copy Markdown
Contributor

@benjibc benjibc commented Oct 13, 2025

FIREWORKS_API_KEY=$PYROWORKS_DEV_API_KEY FIREWORKS_ACCOUNT_ID=pyroworks-dev FIREWORKS_API_BASE="https://dev.api.fireworks.ai" eval-protocol create rft --base-model accounts/fireworks/models/qwen3-0p6b --dataset-id svgbench-small --output-model svgbench-agent-small-bchen-2 --evaluator accounts/pyroworks-dev/evaluators/test-livesvgbench-test-svg-combined-evaluation1 --max-context-length 65536 --skip-validations --response-candidates-count 4 --batch-size 128000 --chunk-size 50 --epochs 4 --use-temporal-workflow --use-eval-v3 --max-output-tokens 32768 --max-inference-replica-count 4 --learning-rate 0.00003 --lora-rank 16


Note

Adds a create rft CLI to launch Reinforcement Fine-tuning jobs on Fireworks with dataset upload/materialization, training/inference/W&B options, and persists evaluator traces for smoother workflows.

  • CLI:
    • New command group create with subcommand rft to create Reinforcement Fine-tuning jobs.
    • Supports dataset sources (--dataset-id, --dataset-jsonl, --dataset-builder, --dataset-display-name), training config (--base-model, --warm-start-from, --epochs, --batch-size, --learning-rate, --max-context-length, --lora-rank, --accelerator-count, --region, --output-model, --evaluation-dataset, --[no-]eval-auto-carveout), inference params (--temperature, --top-p, --top-k, --max-tokens, --n, --inference-extra-body), W&B (--wandb-*), and misc (--rft-job-id, --yes, --dry-run).
    • Auto-resolves evaluator id from local traces or single discovered test; prints dashboard links.
  • Core helpers (eval_protocol/fireworks_rft.py):
    • Add utilities to detect dataset builders, materialize datasets to JSONL, create/upload datasets, create RFT jobs, manage evaluator traces, build default IDs, and map API host to app host.
  • Upload flow:
    • After evaluator creation, persist a local evaluator trace (incl. detected dataset builder) for downstream create rft usage.

Written by Cursor Bugbot for commit d6c76c1. This will update automatically on new commits. Configure here.

Copy link
Copy Markdown

@chatgpt-codex-connector chatgpt-codex-connector bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting

@benjibc benjibc force-pushed the fireworks_create_rft branch from 97b5dc5 to 4d4db1f Compare October 27, 2025 06:16
cursor[bot]

This comment was marked as outdated.

@benjibc benjibc force-pushed the fireworks_create_rft branch from 4d4db1f to d6c76c1 Compare October 27, 2025 06:20
body.setdefault("trainingConfig", {})["outputModel"] = build_default_output_model(evaluator_id)

# Clean None fields to avoid noisy payloads
body = {k: v for k, v in body.items() if v is not None}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Bug: Debug Print Shows Incomplete Request Body

The debug print of the request body (lines 224-225) occurs before the body is fully constructed. After printing, the code adds evaluationDataset and outputModel fields (lines 226-231) and filters out None values (line 234). This means the printed body shows an incomplete/incorrect preview that doesn't match what will actually be sent to the API. The print statement should be moved after line 234 to show the final request body.

Fix in Cursor Fix in Web

@benjibc benjibc merged commit 87a99e0 into main Oct 27, 2025
9 checks passed
@benjibc benjibc deleted the fireworks_create_rft branch October 27, 2025 06:29
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant