Skip to content

fix(neuraltrain): declare tqdm as a runtime dependency#168

Open
bkowshik wants to merge 1 commit into
facebookresearch:mainfrom
bkowshik:fix/neuraltrain-declare-tqdm-dep
Open

fix(neuraltrain): declare tqdm as a runtime dependency#168
bkowshik wants to merge 1 commit into
facebookresearch:mainfrom
bkowshik:fix/neuraltrain-declare-tqdm-dep

Conversation

@bkowshik

Copy link
Copy Markdown
Contributor

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 (#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.

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).
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Jun 22, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant