Skip to content

[BUG] AttributeError: module 'deepspeed' has no attribute 'utils' when installing DeepSpeed from source #2020

@KMFODA

Description

@KMFODA

Describe the bug
When installing deepspeed from Github rather than using pip install deepspeed I get the below error. I've traced this back to commit 6ad3119d5420c6b25b456626a40f4ded8c05a81. Before this commit running these instructions works whereas from this commit onwards I get the below error:

Traceback (most recent call last):
  File "/usr/local/bin/deepspeed", line 3, in <module>
    from deepspeed.launcher.runner import main
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/__init__.py", line 13, in <module>
    from . import ops
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/ops/__init__.py", line 1, in <module>
    from . import adam
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/ops/adam/__init__.py", line 1, in <module>
    from .cpu_adam import DeepSpeedCPUAdam
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/ops/adam/cpu_adam.py", line 10, in <module>
    from deepspeed.utils.logging import should_log_le
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/utils/__init__.py", line 1, in <module>
    from .logging import logger, log_dist
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/utils/logging.py", line 5, in <module>
    import deepspeed.comm as dist
  File "/usr/local/lib/python3.6/dist-packages/deepspeed/comm/__init__.py", line 3, in <module>
    import deepspeed.utils as utils
AttributeError: module 'deepspeed' has no attribute 'utils'

To Reproduce
Steps to reproduce the behavior:

  1. git clone https://github.com/microsoft/DeepSpeed/2.
  2. cd DeepSpeed
  3. pip install .
  4. ds_report

Expected behavior
ds_report should run and print out a DeepSpeed environment report

ds_report output
N/A

Screenshots
N/A

System info (please complete the following information):

  • OS = Linux 5.15.38
  • GPU count = 4 TeslaV100S
  • Python = Python 3.6.9

Launcher context
deepspeed launcher

Docker context
Are you using a specific docker image that you can share?

Additional context
Add any other context about the problem here.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions