You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{{
calling a python script with deepspeed eventually comes down to trying and failing to import psutil:
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.11/dist-packages/deepspeed/__init__.py", line 15, in <module>
from . import module_inject
File "/usr/local/lib/python3.11/dist-packages/deepspeed/module_inject/__init__.py", line 3, in <module>
from .replace_module import replace_transformer_layer, revert_transformer_layer, ReplaceWithTensorSlicing, GroupQuantizer, generic_injection
File "/usr/local/lib/python3.11/dist-packages/deepspeed/module_inject/replace_module.py", line 811, in <module>
from ..pipe import PipelineModule
File "/usr/local/lib/python3.11/dist-packages/deepspeed/pipe/__init__.py", line 3, in <module>
from ..runtime.pipe import PipelineModule, LayerSpec, TiedLayerSpec
File "/usr/local/lib/python3.11/dist-packages/deepspeed/runtime/pipe/__init__.py", line 3, in <module>
from .module import PipelineModule, LayerSpec, TiedLayerSpec
File "/usr/local/lib/python3.11/dist-packages/deepspeed/runtime/pipe/module.py", line 15, in <module>
from .. import utils as ds_utils
File "/usr/local/lib/python3.11/dist-packages/deepspeed/runtime/utils.py", line 12, in <module>
import psutil
File "/usr/lib/python3/dist-packages/psutil/__init__.py", line 95, in <module>
from . import _pslinux as _psplatform
File "/usr/lib/python3/dist-packages/psutil/_pslinux.py", line 26, in <module>
from . import _psutil_linux as cext
ImportError: cannot import name '_psutil_linux' from partially initialized module 'psutil' (most likely due to a circular import) (/usr/lib/python3/dist-packages/psutil/__init__.py)
}}}
The text was updated successfully, but these errors were encountered:
You most likely have a conflict with a previous psutil installation. If you download psutil source you can run make clean and make uninstall, then reinstall. Usually that fixes this sort of error.
I'm hitting the same problem trying to import psutil for use on my own project. My project is running on the Steam Deck using python and the version of psutil as shipped with the system, so I don't think it's possible that I've broken it in any way.
Summary
Description
{{{
calling a python script with deepspeed eventually comes down to trying and failing to import psutil:
}}}
The text was updated successfully, but these errors were encountered: