Skip to content

Give inference states independent tensor defaults - #159

Open
keshtib07-ghost wants to merge 1 commit into
normal-computing-oss:mainfrom
keshtib07-ghost:fix/independent-state-defaults
Open

keshtib07-ghost wants to merge 1 commit into
normal-computing-oss:mainfrom
keshtib07-ghost:fix/independent-state-defaults

Conversation

@keshtib07-ghost

Copy link
Copy Markdown
Contributor

Fixes #158.

In-place updates currently change tensor defaults shared by separate state instances. Updating one SGLD chain advances another untouched chain’s counter and causes later initializations to start at that counter. Learning-rate and temperature schedules can therefore use the wrong step.

Use per-instance default factories for the 25 affected counter and diagnostic fields. Add regressions for each field and an SGLD update test that checks two chains use their own schedule steps.

Validation on Python 3.12.14, PyTorch 2.15.0+cpu and TensorDict 0.15.6:

  • All 26 new regression cases fail on the baseline 1143aa79f572cd21cbc7f2879c9bd43ec194fe1b.
  • Full suite on the branch: 107 passed, 100% coverage.
  • Ruff 0.13.1 lint and formatting checks passed.
  • git diff --check passed.

Use per-instance factories so in-place updates cannot modify other
chains or the defaults used by subsequent initializations.
Add regressions for all state defaults and independent SGLD schedules.

Signed-off-by: Keshav Tibrewal <keshav.tibrewal@iitgn.ac.in>

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

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

In-place updates share counters and diagnostics across independent inference states

1 participant