Skip to content

Port single-update proximal policy losses to OSS - #6465

Draft
vkuzo wants to merge 1 commit into
gh/vkuzo/16/headfrom
gh/vkuzo/17/head
Draft

vkuzo wants to merge 1 commit into
gh/vkuzo/16/headfrom
gh/vkuzo/17/head

Conversation

@vkuzo

@vkuzo vkuzo commented Dec 1, 2026

Copy link
Copy Markdown
Contributor

Summary:

  • Export SingleUpdateProximalLoss and SingleUpdateProximalTISLoss from the public RL losses package for existing plain-proximal and proximal+TIS consumers.
  • Preserve the frozen implementations executable AST, arithmetic, metric keys, config defaults and validation. Only public docstrings, licensing and formatting differ; no new policy parameter or scoring pass.
  • Document the one-update-per-fresh-batch contract, detached capped FP32 TIS weights and inherited token/sample reduction semantics.
  • Move exactly 19 numerical tests and their helpers; leave internal recipe tests under their existing ownership. Moved test/helper ASTs are unchanged.

Test Plan:

  • CPU unittest: 19 passed, no skips.
  • CPU pytest: 50 passed, no skips (19 proximal, 17 existing losses, 7 sample-mean loss including CPU/gloo CP, 7 sample-mean admission); 3 dependency warnings.
  • Frozen FB vs OSS full-call parity: 64 cases and 800 byte-exact tensor comparisons, identical metric keys. Both classes, FP32/BF16, token_mean/sample_mean, eager/aot_eager, mixed/empty masks, scalar/vector global counts; deterministic seed 42. Reset Dynamo cache between independent cases after the first matrix attempt hit its recompile limit.
  • Production executable AST and all 19 numerical test/helper ASTs match the frozen submitted source.
  • Cached pinned ufmt, flake8, pydoclint, license and basic pre-commit hooks passed on the intended files; codespell 2.4.1 passed.
  • Scoped production Pyrefly: 0 errors. Forcing the normally excluded tests into Pyrefly reports 8 Tensor.grad Optional diagnostics; preserve the original test semantics rather than adding narrowing assertions.
  • Full pre-commit run --all-files could not execute: runner not installed; Lychee is also unavailable. No package/native upgrades, GPU jobs, scheduler calls or GitHub writes.
  • Preserve the existing three-week-old public base and all prior commits for matched comparability.

[ghstack-poisoned]

This branch has not been deployed

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

Labels

ciflow/rl CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant