Skip to content

Sync 3 diffs to facebookresearch/optimizers (#276) - #276

Closed
wz337 wants to merge 1 commit into
facebookresearch:mainfrom
wz337:export-D116726514
Closed

Sync 3 diffs to facebookresearch/optimizers (#276)#276
wz337 wants to merge 1 commit into
facebookresearch:mainfrom
wz337:export-D116726514

Conversation

@wz337

@wz337 wz337 commented Aug 21, 2026

Copy link
Copy Markdown
Contributor

Summary:

Syncs the internal dev tree to the OSS mirror (fbcode/ai_codesign/optimizers) via
scripts/oss_sync.sh. Changes included since the last sync marker:

  • [shampoo] Newton-Schulz inverse root (D115751122)
  • [shampoo][dev] Fix OSS mypy on ShampooPT2CompileConfig's synthesized base class
    (D116658375, below this diff in the stack)
  • [pyre][automated] Remove unused type error suppressions - hpc (D116361970)

Most of this diff is machine output; two files are not. The mirrored .py files under
distributed_shampoo/ and gpa/ are regenerated by the script. CHANGELOG.md and
distributed_shampoo/__init__.py were edited by hand — details below.

Every bullet in the new ## 2026-08-19 entry was hand-written. The generator emits
<commit title> — <first line of the Summary: section>, which for these commits produced a
link preamble, internal tooling narration, and a sentence truncated mid-clause.

The generator produced four bullets; one is not in the current entry. The
cast(torch.Tensor, param) mypy fix (D113741320) already shipped to the mirror in
D113741175 and reappeared in this range only because that sync left the marker short.
Verified against the diff rather than the title: the distributed_shampoo_test.py hunks
here are all additions for the new Newton-Schulz coverage, with no cast lines.

That commit turned out to be documented nowhere — it shipped publicly and no entry mentioned
it. So instead of dropping it, this diff backfills a bullet into ## 2026-07-24, the
entry for the release that actually shipped it (dd8c84ce4356). That is the second
CHANGELOG.md hand edit here and the only change outside the current entry.

The [pyre][automated] sweep does get a bullet, despite the internal-looking title. It
is not internal-only in the mirror: the transform stage rewrites internal # pyre-ignore
into # type: ignore, so the sweep removes 13 # type: ignore comments plus a net 2
# pyrefly: ignore comments from the public tree. A reader diffing two releases would
otherwise find unexplained changes. The bullet keeps the fact and drops the internal
framing.

distributed_shampoo/__init__.py is the one mirror .py file oss_sync.sh does not
regenerate (it is manually maintained, by design). NewtonSchulzRootInvConfig was missing
from it while the release note advertises the feature, so it is added to the imports and
__all__ alongside its sibling RootInvConfig subclasses. No sync stage catches this
class of omission — mypy and all four CPU suites pass either way, because nothing in the
mirror imports from the package root.

The non-exported last-sync marker at scripts/.last_oss_sync_rev is set to efefb9b4
(D115751122), the newest landed commit in the synced range.

The script had advanced it to the dev fix stacked below (D116658375), which is the newest
commit whose change is in this mirror and would be the right answer — except that commit is
a draft, so its hash is rewritten by every amend and again at land. It was already off the
tip's ancestry, which makes the next sync abort with error: base rev ... was not found
rather than merely re-listing something.

Falling back to the last landed commit trades a hard failure for a soft one: the next sync
re-lists D116658375 and generates a duplicate bullet, which the oss-sync skill drops on the
"already shipped in an earlier sync" rule. No post-land follow-up is required, and there is
nothing to remember. (--summary-only --since is not an alternative — that mode copies no
code, so advance_marker deliberately refuses to move the marker at all.)

Reviewed By: anana10c

Differential Revision: D116726514

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 21, 2026
@meta-codesync

meta-codesync Bot commented Aug 21, 2026

Copy link
Copy Markdown

@wz337 has exported this pull request. If you are a Meta employee, you can view the originating Diff in D116726514.

@meta-codesync meta-codesync Bot changed the title Sync 3 diffs to facebookresearch/optimizers Sync 3 diffs to facebookresearch/optimizers (#276) Aug 24, 2026
wz337 added a commit to wz337/optimizers that referenced this pull request Aug 24, 2026
Summary:

Syncs the internal dev tree to the OSS mirror (`fbcode/ai_codesign/optimizers`) via
`scripts/oss_sync.sh`. Changes included since the last sync marker:

- [shampoo] Newton-Schulz inverse root (D115751122)
- [shampoo][dev] Fix OSS mypy on `ShampooPT2CompileConfig`'s synthesized base class
  (D116658375, below this diff in the stack)
- [pyre][automated] Remove unused type error suppressions - hpc (D116361970)

**Most of this diff is machine output; two files are not.** The mirrored `.py` files under
`distributed_shampoo/` and `gpa/` are regenerated by the script. `CHANGELOG.md` and
`distributed_shampoo/__init__.py` were edited by hand — details below.

Every bullet in the new `## 2026-08-19` entry was hand-written. The generator emits
`<commit title> — <first line of the Summary: section>`, which for these commits produced a
link preamble, internal tooling narration, and a sentence truncated mid-clause.

The generator produced four bullets; one is not in the current entry. The
`cast(torch.Tensor, param)` mypy fix (D113741320) already shipped to the mirror in
D113741175 and reappeared in this range only because that sync left the marker short.
Verified against the diff rather than the title: the `distributed_shampoo_test.py` hunks
here are all additions for the new Newton-Schulz coverage, with no `cast` lines.

That commit turned out to be documented nowhere — it shipped publicly and no entry mentioned
it. So instead of dropping it, this diff **backfills** a bullet into `## 2026-07-24`, the
entry for the release that actually shipped it (`dd8c84ce4356`). That is the second
`CHANGELOG.md` hand edit here and the only change outside the current entry.

The `[pyre][automated]` sweep **does** get a bullet, despite the internal-looking title. It
is not internal-only in the mirror: the transform stage rewrites internal `# pyre-ignore`
into `# type: ignore`, so the sweep removes 13 `# type: ignore` comments plus a net 2
`# pyrefly: ignore` comments from the public tree. A reader diffing two releases would
otherwise find unexplained changes. The bullet keeps the fact and drops the internal
framing.

`distributed_shampoo/__init__.py` is the one mirror `.py` file `oss_sync.sh` does not
regenerate (it is manually maintained, by design). `NewtonSchulzRootInvConfig` was missing
from it while the release note advertises the feature, so it is added to the imports and
`__all__` alongside its sibling `RootInvConfig` subclasses. No sync stage catches this
class of omission — mypy and all four CPU suites pass either way, because nothing in the
mirror imports from the package root.

The non-exported last-sync marker at `scripts/.last_oss_sync_rev` is set to `efefb9b4`
(D115751122), the newest **landed** commit in the synced range.

The script had advanced it to the dev fix stacked below (D116658375), which is the newest
commit whose change is in this mirror and would be the right answer — except that commit is
a draft, so its hash is rewritten by every amend and again at land. It was already off the
tip's ancestry, which makes the next sync abort with `error: base rev ... was not found`
rather than merely re-listing something.

Falling back to the last landed commit trades a hard failure for a soft one: the next sync
re-lists D116658375 and generates a duplicate bullet, which the oss-sync skill drops on the
"already shipped in an earlier sync" rule. No post-land follow-up is required, and there is
nothing to remember. (`--summary-only --since` is not an alternative — that mode copies no
code, so `advance_marker` deliberately refuses to move the marker at all.)

Differential Revision: D116726514
@wz337
wz337 force-pushed the export-D116726514 branch from cee1527 to 2a2a7ea Compare August 24, 2026 21:59
wz337 added a commit to wz337/optimizers that referenced this pull request Aug 24, 2026
Summary:

Syncs the internal dev tree to the OSS mirror (`fbcode/ai_codesign/optimizers`) via
`scripts/oss_sync.sh`. Changes included since the last sync marker:

- [shampoo] Newton-Schulz inverse root (D115751122)
- [shampoo][dev] Fix OSS mypy on `ShampooPT2CompileConfig`'s synthesized base class
  (D116658375, below this diff in the stack)
- [pyre][automated] Remove unused type error suppressions - hpc (D116361970)

**Most of this diff is machine output; two files are not.** The mirrored `.py` files under
`distributed_shampoo/` and `gpa/` are regenerated by the script. `CHANGELOG.md` and
`distributed_shampoo/__init__.py` were edited by hand — details below.

Every bullet in the new `## 2026-08-19` entry was hand-written. The generator emits
`<commit title> — <first line of the Summary: section>`, which for these commits produced a
link preamble, internal tooling narration, and a sentence truncated mid-clause.

The generator produced four bullets; one is not in the current entry. The
`cast(torch.Tensor, param)` mypy fix (D113741320) already shipped to the mirror in
D113741175 and reappeared in this range only because that sync left the marker short.
Verified against the diff rather than the title: the `distributed_shampoo_test.py` hunks
here are all additions for the new Newton-Schulz coverage, with no `cast` lines.

That commit turned out to be documented nowhere — it shipped publicly and no entry mentioned
it. So instead of dropping it, this diff **backfills** a bullet into `## 2026-07-24`, the
entry for the release that actually shipped it (`dd8c84ce4356`). That is the second
`CHANGELOG.md` hand edit here and the only change outside the current entry.

The `[pyre][automated]` sweep **does** get a bullet, despite the internal-looking title. It
is not internal-only in the mirror: the transform stage rewrites internal `# pyre-ignore`
into `# type: ignore`, so the sweep removes 13 `# type: ignore` comments plus a net 2
`# pyrefly: ignore` comments from the public tree. A reader diffing two releases would
otherwise find unexplained changes. The bullet keeps the fact and drops the internal
framing.

`distributed_shampoo/__init__.py` is the one mirror `.py` file `oss_sync.sh` does not
regenerate (it is manually maintained, by design). `NewtonSchulzRootInvConfig` was missing
from it while the release note advertises the feature, so it is added to the imports and
`__all__` alongside its sibling `RootInvConfig` subclasses. No sync stage catches this
class of omission — mypy and all four CPU suites pass either way, because nothing in the
mirror imports from the package root.

The non-exported last-sync marker at `scripts/.last_oss_sync_rev` is set to `efefb9b4`
(D115751122), the newest **landed** commit in the synced range.

The script had advanced it to the dev fix stacked below (D116658375), which is the newest
commit whose change is in this mirror and would be the right answer — except that commit is
a draft, so its hash is rewritten by every amend and again at land. It was already off the
tip's ancestry, which makes the next sync abort with `error: base rev ... was not found`
rather than merely re-listing something.

Falling back to the last landed commit trades a hard failure for a soft one: the next sync
re-lists D116658375 and generates a duplicate bullet, which the oss-sync skill drops on the
"already shipped in an earlier sync" rule. No post-land follow-up is required, and there is
nothing to remember. (`--summary-only --since` is not an alternative — that mode copies no
code, so `advance_marker` deliberately refuses to move the marker at all.)

Reviewed By: anana10c

Differential Revision: D116726514
@wz337
wz337 force-pushed the export-D116726514 branch from 2a2a7ea to ab46efc Compare August 24, 2026 22:55
Summary:

Syncs the internal dev tree to the OSS mirror (`fbcode/ai_codesign/optimizers`) via
`scripts/oss_sync.sh`. Changes included since the last sync marker:

- [shampoo] Newton-Schulz inverse root (D115751122)
- [shampoo][dev] Fix OSS mypy on `ShampooPT2CompileConfig`'s synthesized base class
  (D116658375, below this diff in the stack)
- [pyre][automated] Remove unused type error suppressions - hpc (D116361970)

**Most of this diff is machine output; two files are not.** The mirrored `.py` files under
`distributed_shampoo/` and `gpa/` are regenerated by the script. `CHANGELOG.md` and
`distributed_shampoo/__init__.py` were edited by hand — details below.

Every bullet in the new `## 2026-08-19` entry was hand-written. The generator emits
`<commit title> — <first line of the Summary: section>`, which for these commits produced a
link preamble, internal tooling narration, and a sentence truncated mid-clause.

The generator produced four bullets; one is not in the current entry. The
`cast(torch.Tensor, param)` mypy fix (D113741320) already shipped to the mirror in
D113741175 and reappeared in this range only because that sync left the marker short.
Verified against the diff rather than the title: the `distributed_shampoo_test.py` hunks
here are all additions for the new Newton-Schulz coverage, with no `cast` lines.

That commit turned out to be documented nowhere — it shipped publicly and no entry mentioned
it. So instead of dropping it, this diff **backfills** a bullet into `## 2026-07-24`, the
entry for the release that actually shipped it (`dd8c84ce4356`). That is the second
`CHANGELOG.md` hand edit here and the only change outside the current entry.

The `[pyre][automated]` sweep **does** get a bullet, despite the internal-looking title. It
is not internal-only in the mirror: the transform stage rewrites internal `# pyre-ignore`
into `# type: ignore`, so the sweep removes 13 `# type: ignore` comments plus a net 2
`# pyrefly: ignore` comments from the public tree. A reader diffing two releases would
otherwise find unexplained changes. The bullet keeps the fact and drops the internal
framing.

`distributed_shampoo/__init__.py` is the one mirror `.py` file `oss_sync.sh` does not
regenerate (it is manually maintained, by design). `NewtonSchulzRootInvConfig` was missing
from it while the release note advertises the feature, so it is added to the imports and
`__all__` alongside its sibling `RootInvConfig` subclasses. No sync stage catches this
class of omission — mypy and all four CPU suites pass either way, because nothing in the
mirror imports from the package root.

The non-exported last-sync marker at `scripts/.last_oss_sync_rev` is set to `efefb9b4`
(D115751122), the newest **landed** commit in the synced range.

The script had advanced it to the dev fix stacked below (D116658375), which is the newest
commit whose change is in this mirror and would be the right answer — except that commit is
a draft, so its hash is rewritten by every amend and again at land. It was already off the
tip's ancestry, which makes the next sync abort with `error: base rev ... was not found`
rather than merely re-listing something.

Falling back to the last landed commit trades a hard failure for a soft one: the next sync
re-lists D116658375 and generates a duplicate bullet, which the oss-sync skill drops on the
"already shipped in an earlier sync" rule. No post-land follow-up is required, and there is
nothing to remember. (`--summary-only --since` is not an alternative — that mode copies no
code, so `advance_marker` deliberately refuses to move the marker at all.)

Reviewed By: anana10c

Differential Revision: D116726514
@wz337
wz337 force-pushed the export-D116726514 branch from ab46efc to ba05cb9 Compare August 24, 2026 23:09
@meta-codesync meta-codesync Bot closed this in 9c84056 Aug 25, 2026
@meta-codesync meta-codesync Bot added the Merged label Aug 25, 2026
@meta-codesync

meta-codesync Bot commented Aug 25, 2026

Copy link
Copy Markdown

This pull request has been merged in 9c84056.

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

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Merged meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant