Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Avoid circular import in hf checkpointer #1304

Merged
merged 2 commits into from
Jun 26, 2024
Merged

Conversation

dakinggg
Copy link
Collaborator

@dakinggg dakinggg commented Jun 26, 2024

If you extend LLM Foundry modeling/config code, the hf checkpointer may create a circular import in its attempt to automatically add all the missing imports to the files for hf. This PR simply excludes the dangerous circular import by preventing either of the entrypoint files (the modeling file or the config file), from including an import to the modeling file. The modeling file is expected to include a legitimate import of the config file, but the config file should not import the modeling file as this would be circular.

@dakinggg dakinggg requested a review from irenedea June 26, 2024 00:11
@dakinggg dakinggg marked this pull request as ready for review June 26, 2024 00:11
@dakinggg dakinggg requested a review from a team as a code owner June 26, 2024 00:11
Copy link
Contributor

@snarayan21 snarayan21 left a comment

Choose a reason for hiding this comment

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

noice

@dakinggg dakinggg enabled auto-merge (squash) June 26, 2024 00:26
@dakinggg dakinggg merged commit 2412b59 into mosaicml:main Jun 26, 2024
11 checks passed
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.

None yet

3 participants