Skip to content

Deferring import of torch in config to allow faster import #2079

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 2 commits into from
Jun 18, 2025

Conversation

JackUrb
Copy link
Contributor

@JackUrb JackUrb commented Jun 17, 2025

As titled, right now importing Config for the purpose of just using the config (as discussed in #2073) requires pulling in torch. This isn't desirable if you're only trying to pull litgpt configuration classes (via an approach as in this comment) for use in setup or configuration scripts.

@JackUrb JackUrb requested review from lantiga, t-vi and Borda as code owners June 17, 2025 15:54
@t-vi
Copy link
Collaborator

t-vi commented Jun 18, 2025

Thank you @JackUrb @Borda

@t-vi t-vi merged commit 1f4325f into Lightning-AI:main Jun 18, 2025
19 of 21 checks passed
mseeger pushed a commit to mseeger/litgpt that referenced this pull request Jul 4, 2025
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.

3 participants