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

Fix torch import causing release build failure #4468

Merged
merged 1 commit into from
Oct 9, 2023

Conversation

mrwyattii
Copy link
Contributor

The torch import added in #4452 causes an ImportError when trying to build a release for DeepSpeed in environments without torch:

Traceback (most recent call last):
  File "setup.py", line 37, in <module>
    from op_builder import get_default_compute_capabilities, OpBuilder
  File "/home/runner/work/DeepSpeed/DeepSpeed/op_builder/__init__.py", line 48, in <module>
    module = importlib.import_module(f".{module_name}", package=op_builder_dir)
  File "/usr/lib/python3.8/importlib/__init__.py", line [12](https://github.com/microsoft/DeepSpeed/actions/runs/6436848308/job/17481015251#step:6:13)7, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "/home/runner/work/DeepSpeed/DeepSpeed/op_builder/async_io.py", line 8, in <module>
    import torch
ModuleNotFoundError: No module named 'torch'

@jeffra
@loadams

@tjruwase tjruwase added this pull request to the merge queue Oct 9, 2023
Merged via the queue into master with commit 6b634d0 Oct 9, 2023
15 checks passed
@mrwyattii mrwyattii deleted the mrwyattii/fix-asyncio-torch-import branch October 9, 2023 15:54
mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Oct 9, 2023
baodii pushed a commit to baodii/DeepSpeed that referenced this pull request Nov 7, 2023
@lynquantumman
Copy link

deepspeed-0.13.0 still has this problem

@loadams
Copy link
Contributor

loadams commented Jan 22, 2024

Hi @lynquantumman - thanks for letting us know, this is covered/tracked in more detail here, we are working to fix this, thanks!

mauryaavinash95 pushed a commit to mauryaavinash95/DeepSpeed that referenced this pull request Feb 17, 2024
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.

4 participants