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

setuptools 70.0.0 results in ImportError: cannot import name 'packaging' from 'pkg_resources' #9284

Closed
noralutz opened this issue May 22, 2024 · 5 comments
Labels
bug Something isn't working stale

Comments

@noralutz
Copy link

noralutz commented May 22, 2024

Describe the bug

NeMo uses the deprecated pkg_resources component of setuptools in the Megatron GPT model. As of yesterday's v70.0.0 release of Setuptools, this change
removes packaging from being imported by pkg_resouces and results in the above ImportError

Steps/Code to reproduce bug

  1. install setuptools v70.0.0
  2. install NeMo 1.23
  3. Attempt to import nemo.collections.nlp.models.language_modeling import MegatronGPTPromptLearningModel

Expected behavior

Model to import with no ImportError

Environment overview (please complete the following information)

  • Environment location: Cloud (GCP Vertex Workbench instance)
  • Method of NeMo install: pip install nemo-toolkit[all]==1.23

Environment details

If NVIDIA docker image is used you don't need to specify these.
Otherwise, please provide:

  • OS version: Debian 11
  • PyTorch version: 2.0.1
  • Python version: 3.10.9
@noralutz noralutz added the bug Something isn't working label May 22, 2024
@yonas-g
Copy link

yonas-g commented Jun 4, 2024

Did you find a solution for this error

@tfogal
Copy link

tfogal commented Jun 4, 2024

Did you find a solution for this error

Just pin the setuptools version, e.g. python3 -m pip install setuptools==69.5.1

@crcrpar
Copy link
Contributor

crcrpar commented Jun 5, 2024

why not switching to packaging?

Copy link
Contributor

github-actions bot commented Jul 6, 2024

This issue is stale because it has been open for 30 days with no activity. Remove stale label or comment or this will be closed in 7 days.

@github-actions github-actions bot added the stale label Jul 6, 2024
Copy link
Contributor

This issue was closed because it has been inactive for 7 days since being marked as stale.

@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jul 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale
Projects
None yet
Development

No branches or pull requests

4 participants