8000 Fixed packaging import to occur after install_requires by tgaddair · Pull Request #3741 · horovod/horovod · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Fixed packaging import to occur after install_requires #3741

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
Oct 14, 2022
Merged

Conversation

tgaddair
Copy link
Collaborator
@tgaddair tgaddair commented Oct 13, 2022

Previous import was occurring in setup.py before install_requires had a chance to run, resulting in import failures if packaging wasn't already installed:

Collecting horovod[pytorch]>=0.24.0
  Downloading horovod-0.26.0.tar.gz (3.5 MB)
     ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 3.5/3.5 MB 78.7 MB/s eta 0:00:00
  Preparing metadata (setup.py): started
  Preparing metadata (setup.py): finished with status 'error'
  error: subprocess-exited-with-error
  
  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [6 lines of output]
      Traceback (most recent call last):
        File "<string>", line 36, in <module>
        File "<pip-setuptools-caller>", line 34, in <module>
        File "/tmp/pip-install-lthh9g2p/horovod_ef63b9a15f0346eeadef7d18c3901759/setup.py", line 30, in <module>
          from packaging import version
      ModuleNotFoundError: No module named 'packaging'
      [end of output]

With this change, the import occurs in a function that is called after the requirements are installed.

Signed-off-by: Travis Addair <tgaddair@gmail.com>
@tgaddair tgaddair requested a review from maxhgerlach October 13, 2022 17:11
Signed-off-by: Travis Addair <tgaddair@gmail.com>
Copy link
Collaborator
@EnricoMi EnricoMi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Works for me, thanks!

This reverts commit 4281bd7.

Signed-off-by: Enrico Minack <github@enrico.minack.dev>
@github-actions
Copy link

Unit Test Results

  1 193 files  +     625    1 193 suites  +625   12h 45m 21s ⏱️ + 5h 3m 21s
     840 tests ±         0       787 ✔️ +   123       53 💤  -    123  0 ±0 
24 639 runs  +12 829  17 525 ✔️ +9 436  7 114 💤 +3 393  0 ±0 

Results for commit 596012e. ± Comparison against base commit 4281bd7.

@github-actions
Copy link

Unit Test Results (with flaky tests)

  1 319 files  +     751    1 319 suites  +751   13h 19m 46s ⏱️ + 5h 37m 46s
     840 tests ±         0       787 ✔️ +     123       53 💤  -    123  0 ±0 
27 301 runs  +15 491  19 023 ✔️ +10 934  8 278 💤 +4 557  0 ±0 

Results for commit 596012e. ± Comparison against base commit 4281bd7.

@tgaddair tgaddair merged commit b601ec9 into master Oct 14, 2022
@tgaddair tgaddair deleted the packaging-dep branch October 14, 2022 02:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0