Skip to content

Comments

fix: remove unused import of maxtext_google from train.py#3200

Closed
kryvokhyzha wants to merge 1 commit intoAI-Hypercomputer:mainfrom
kryvokhyzha:fix/maxtext-google-import
Closed

fix: remove unused import of maxtext_google from train.py#3200
kryvokhyzha wants to merge 1 commit intoAI-Hypercomputer:mainfrom
kryvokhyzha:fix/maxtext-google-import

Conversation

@kryvokhyzha
Copy link
Contributor

@kryvokhyzha kryvokhyzha commented Feb 20, 2026

Description

Remove import from maxtext import maxtext_google that was introduced in commit 4ef205efe3c4f31a700ff7621e7f1502575bd72c (merge of PR #3189).

  • Problem: Running python3 -m maxtext.trainers.pre_train.train fails immediately with ImportError: cannot import name 'maxtext_google' from 'maxtext'. No maxtext_google module exists in the open-source repo - it is a Google-internal side-effect import.
  • Fix: Remove the two lines (# pylint: disable-next=unused-import and from maxtext import maxtext_google). The import was unused (pylint disable confirms this) and served only as an internal instrumentation hook.

Error in commit 4ef205efe3c4f31a700ff7621e7f1502575bd72c:

Traceback (most recent call last):
  File "<frozen runpy>", line 198, in _run_module_as_main
  File "<frozen runpy>", line 88, in _run_code
  File "/deps/src/maxtext/trainers/pre_train/train.py", line 46, in <module>
    from maxtext import maxtext_google
ImportError: cannot import name 'maxtext_google' from 'maxtext' (unknown location)

Tests

# Verify the import error is gone
python3 -c "import maxtext.trainers.pre_train.train"

Checklist

Before submitting this PR, please make sure (put X in square brackets):

  • I have performed a self-review of my code. For an optional AI review, add the gemini-review label.
  • I have necessary comments in my code, particularly in hard-to-understand areas.
  • I have run end-to-end tests tests and provided workload links above if applicable.
  • I have made or will make corresponding changes to the doc if needed, including adding new documentation pages to the relevant Table of Contents (toctree directive) as explained in our documentation.

Copy link
Collaborator

@bvandermoon bvandermoon left a comment

Choose a reason for hiding this comment

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

Thank you @kryvokhyzha for sending out this PR! We also have a fix going here: #3202

@kryvokhyzha
Copy link
Contributor Author

Thank you @kryvokhyzha for sending out this PR! We also have a fix going here: #3202

Thanks, I'll close this PR

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