Skip to content

Remove stale preconditioner config names from __init__.py#256

Open
runame wants to merge 1 commit intofacebookresearch:mainfrom
runame:fix/init-stale-rename-imports
Open

Remove stale preconditioner config names from __init__.py#256
runame wants to merge 1 commit intofacebookresearch:mainfrom
runame:fix/init-stale-rename-imports

Conversation

@runame
Copy link
Copy Markdown
Contributor

@runame runame commented Apr 11, 2026

Summary

  • shampoo_types.py renamed AmortizedPreconditionerConfigBaseShampooPreconditionerConfig and ShampooPreconditionerConfigClassicShampooPreconditionerConfig (cb150a9), but
    distributed_shampoo/__init__.py still imported and re-exported the old names, so import distributed_shampoo fails at HEAD with ImportError.
  • Replace the stale names in the imports and __all__ entries.

Test plan

  • python -c "import distributed_shampoo" succeeds
  • distributed_shampoo.BaseShampooPreconditionerConfig and distributed_shampoo.ClassicShampooPreconditionerConfig are accessible
  • Every entry in __all__ resolves to an actual module attribute
  • Inheritance chain intact (Classic→Base, RootInv→Classic, Eigendecomposed→Classic, EigenvalueCorrected→Base)

`AmortizedPreconditionerConfig` was renamed to
`BaseShampooPreconditionerConfig` and `ShampooPreconditionerConfig` to
`ClassicShampooPreconditionerConfig` in `shampoo_types.py`, but
`__init__.py` still imported and re-exported the old names. Replace
them with the new names in the imports and `__all__`.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@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 Apr 11, 2026
Copy link
Copy Markdown
Contributor

@wz337 wz337 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for fixing this!

@meta-codesync
Copy link
Copy Markdown

meta-codesync bot commented Apr 17, 2026

@hjmshi has imported this pull request. If you are a Meta employee, you can view this in D101275252.

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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants