Skip to content

release: v0.4.0 - public API, CLI, config, and reward improvements#37

Merged
sacredvoid merged 1 commit intomainfrom
claude/library-improvements-release-PYrJN
Apr 13, 2026
Merged

release: v0.4.0 - public API, CLI, config, and reward improvements#37
sacredvoid merged 1 commit intomainfrom
claude/library-improvements-release-PYrJN

Conversation

@sacredvoid
Copy link
Copy Markdown
Owner

  • Expand public API: lazily expose reward helpers (math_verify_reward,
    format_reward, extract_answer), eval helpers (compare_stages,
    parse_results, BENCHMARK_PRESETS), and the Trainer protocol. dir(alignrl)
    now reflects all lazy exports.
  • Add BaseTrainConfig.to_yaml() for round-tripping configs and writing
    them to disk.
  • Validate BaseTrainConfig numeric fields (learning_rate, lora_r,
    lora_dropout, batch sizes, etc.) and forbid unknown keys so YAML typos
    fail fast.
  • CLI: add 'alignrl version' subcommand and top-level -V/--version flag,
    expose --num-fewshot and --batch-size on 'eval', and --temperature /
    --max-tokens on 'serve' (forwarded to ModelServer via create_demo).
  • Rewards: _normalize_numeric now handles thousands separators,
    currency prefixes, and percent suffixes; extract_answer supports
    'final answer:' variants, strips trailing punctuation, and unwraps
    \text{...} inside \boxed{} groups; _answers_match is now case-
    insensitive for string comparisons.
  • Bump version to 0.4.0; add CHANGELOG.md. Test suite grows from 179 to
    209 tests, all passing.

- Expand public API: lazily expose reward helpers (math_verify_reward,
  format_reward, extract_answer), eval helpers (compare_stages,
  parse_results, BENCHMARK_PRESETS), and the Trainer protocol. dir(alignrl)
  now reflects all lazy exports.
- Add BaseTrainConfig.to_yaml() for round-tripping configs and writing
  them to disk.
- Validate BaseTrainConfig numeric fields (learning_rate, lora_r,
  lora_dropout, batch sizes, etc.) and forbid unknown keys so YAML typos
  fail fast.
- CLI: add 'alignrl version' subcommand and top-level -V/--version flag,
  expose --num-fewshot and --batch-size on 'eval', and --temperature /
  --max-tokens on 'serve' (forwarded to ModelServer via create_demo).
- Rewards: _normalize_numeric now handles thousands separators,
  currency prefixes, and percent suffixes; extract_answer supports
  'final answer:' variants, strips trailing punctuation, and unwraps
  \text{...} inside \boxed{} groups; _answers_match is now case-
  insensitive for string comparisons.
- Bump version to 0.4.0; add CHANGELOG.md. Test suite grows from 179 to
  209 tests, all passing.
@sacredvoid sacredvoid merged commit a74321b into main Apr 13, 2026
2 checks passed
@sacredvoid sacredvoid deleted the claude/library-improvements-release-PYrJN branch April 13, 2026 04:34
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.

2 participants