fix(neuraltrain): declare tqdm as a runtime dependency#168
Open
bkowshik wants to merge 1 commit into
Open
Conversation
neuraltrain imports tqdm unconditionally at package-import time: __init__.py loads models/__init__.py, which eagerly imports diffusion_prior, which does `from tqdm import tqdm`. But tqdm is not in [project.dependencies] — only the `types-tqdm` stubs are declared, under dev. So a standalone `pip install neuraltrain` followed by `import neuraltrain` fails with `ModuleNotFoundError: No module named 'tqdm'`. Why CI didn't catch it: the monorepo's shared-venv install pulls tqdm in transitively via neuralset (which declares tqdm>=4.65.0), masking the broken standalone install — the same mechanism as the exca fix (facebookresearch#156). Pin matches neuralset's tqdm>=4.65.0. Verified that, with tqdm added, a clean editable install of neuraltrain imports the full package (every submodule) with no errors. No unit test added: this is packaging metadata; the regression guard is a fresh-venv install-isolation check, out of scope for a one-line fix (same rationale as facebookresearch#156).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
neuraltrain imports tqdm unconditionally at package-import time: init.py loads models/init.py, which eagerly imports diffusion_prior, which does
from tqdm import tqdm. But tqdm is not in [project.dependencies] — only thetypes-tqdmstubs are declared, under dev. So a standalonepip install neuraltrainfollowed byimport neuraltrainfails withModuleNotFoundError: No module named 'tqdm'.Why CI didn't catch it: the monorepo's shared-venv install pulls tqdm in transitively via neuralset (which declares tqdm>=4.65.0), masking the broken standalone install — the same mechanism as the exca fix (#156).
Pin matches neuralset's tqdm>=4.65.0. Verified that, with tqdm added, a clean editable install of neuraltrain imports the full package (every submodule) with no errors.