8000 Remove dependency from config to utils by lukemerrick · Pull Request #2034 · Lightning-AI/litgpt · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Remove dependency from config to utils #2034

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

Merged
merged 3 commits into from
May 15, 2025

Conversation

lukemerrick
Copy link
Contributor
@lukemerrick lukemerrick commented May 13, 2025

I have some code which constructs and writes out to YAML files configs which are used to queue up litgpt training jobs on remote machines. Unfortunately this code starts up really slowly because importing the litgpt.config submodule pulls in a ton of transitive dependencies due to its from litgpt.utils import find_multiple line (eventually torch, triton, etc. are imported). This causes as much as a 30+ second delay to any script I write that manipulates litgpt config objects.

I noticed that find_multiple is actually only ever used in litgpt.config anyhow, so I was wondering if it would be okay to scoot this function over and remove the dependency from config on utils. With this change, it is possible to write code which imports the config submodule alone and thus runs very quickly (not pulling in any of the heavy deps that current come into the Python interpreter).

Is this change something y'all might be amenable to?

@lukemerrick
Copy link
Contributor Author
lukemerrick commented May 14, 2025

@Borda It looks like the tests are trying to pull from Huggingface but are getting 401-unauthorized errors. Locally running the affected test, I see everything is passing in the config tests, so it seems the CI is flaky. Can you help get this re-run / skip the gate on these unrelated tests?

@Borda Borda enabled auto-merge (squash) May 15, 2025 09:34
@Borda Borda merged commit 9bd8707 into Lightning-AI:main May 15, 2025
15 of 16 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.

2 participants
0