Skip to content

Conversation

@mesakhcienet
Copy link
Contributor

@mesakhcienet mesakhcienet commented Dec 24, 2025

Description

Adds a missing init.py file to the utils/ckpt_scripts directory and updates the documentation.

  • Added __init__.py:
    A missing __init__.py under src/MaxText/utils/ckpt_scripts/ causes ModuleNotFoundError when trying to import from this package.
    This issue is present in the current MaxText pip wheel. Adding the init.py makes the directory a package, resolving the import error.

  • Documentation Updates:
    The documentation has been updated to include missing explanations and command-line examples for the checkpoint conversion scripts.

Tests

To verify the fix, we performed the following tests:

  1. Testing with the current pip wheel (reproduces the error):
    Installed MaxText using uv pip install maxtext
    The import fails:
((myenv) ) mesakh_google_com@t1v-n-bb13ec2e-w-0:~/maxtext-project/maxtext-cienet$ python -c \ 
"from MaxText.utils.ckpt_scripts import convert_deepseek_family_ckpt as ds_ckpt"
Traceback (most recent call last):
File "<string>", line 1, in <module>
ModuleNotFoundError: No module named 'MaxText.utils.ckpt_scripts'
  1. Testing with a local build from this updated version:
  • Navigated to the MaxText source folder.
  • Built and installed the library manually using uv pip install . .

The import now succeeds without error:

((myenv) ) mesakh_google_com@t1v-n-bb13ec2e-w-0:~/maxtext-project/maxtext-cienet$ python -c "from MaxText.utils.ckpt_scripts import convert_deepseek_family_ckpt as ds_ckpt"
((myenv) ) mesakh_google_com@t1v-n-bb13ec2e-w-0:~/maxtext-project/maxtext-cienet$

These tests confirm that adding the __init__.py file resolves the ModuleNotFoundError.

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.

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.

1 participant