Skip to content

feat: add dry-run mode to offline generators and improve docs#411

Open
aydnOktay wants to merge 4 commits intoNousResearch:mainfrom
aydnOktay:feat/offline-dry-run
Open

feat: add dry-run mode to offline generators and improve docs#411
aydnOktay wants to merge 4 commits intoNousResearch:mainfrom
aydnOktay:feat/offline-dry-run

Conversation

@aydnOktay
Copy link

This PR adds a --dry-run mode to both atropos-sft-gen and atropos-dpo-gen and updates the docs to make offline data generation and Windows setup easier.

What’s included

  • New --dry-run mode for offline generators

    • atropos-sft-gen gains an sft_dry_run helper that:
      • loads the configured tokenizer, and
      • checks connectivity to the rollout server via GET /batch,
      • without registering a run or writing any output files.
    • atropos-dpo-gen gains a symmetric dpo_dry_run helper with the same behavior.
    • Both CLIs accept a --dry-run flag to trigger these checks:
      • atropos-sft-gen ... --dry-run
      • atropos-dpo-gen ... --dry-run
  • More actionable error messages

    • Clear guidance when:
      • the tokenizer cannot be loaded (wrong model name / missing HF access),
      • the rollout server is unreachable,
      • or it returns an unexpected HTTP status code for GET /batch.
  • Unit tests for the new behavior

    • atroposlib/tests/test_offline_cli_dry_run.py verifies:
      • sft_dry_run / dpo_dry_run call AutoTokenizer.from_pretrained and hit the API,
      • the CLI entrypoints call the dry-run helpers when --dry-run is passed instead of running a full data grab.
  • Documentation improvements

    • README.md:
      • Extends the Offline Data Generation Quick Start section with an optional --dry-run step before collecting SFT data.
      • Adds a Windows Quickstart subsection with PowerShell examples for:
        • creating & activating a virtualenv,
        • starting run-api and an example environment,
        • running atropos-sft-gen with --dry-run and then generating data.
      • Clarifies the Windows virtualenv activation command in the troubleshooting section.

Why

  • Offline SFT/DPO runs can be expensive; users typically want to confirm that:
    • the tokenizer name is valid, and
    • the rollout server is reachable and correctly configured
      before writing large datasets.
  • A dedicated --dry-run mode shortens this feedback loop and avoids accidental mutations to the rollout server state.
  • Windows users previously had to mentally translate POSIX shell examples; providing copy‑pasteable PowerShell snippets reduces friction for new contributors.

How to use

SFT dry-run

atropos-sft-gen path/to/output.jsonl
--tokenizer Qwen/Qwen2.5-1.5B-Instruct
--dry-run

DPO dry-run

atropos-dpo-gen path/to/output.jsonl
--tokenizer Qwen/Qwen2.5-1.5B-Instruct
--dry-run

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