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
{{ message }}
Repository navigation
[BUG]No module named 'colossalai._C.cpu_adam': #3395
when I run examples/train_sft.sh, the ERROR occurs
Traceback (most recent call last):
File "/root/alpaca_test/ColossalAI/colossalai/kernel/op_builder/builder.py", line 159, in load
op_module = self.import_op()
File "/root/alpaca_test/ColossalAI/colossalai/kernel/op_builder/builder.py", line 110, in import_op
return importlib.import_module(self.prebuilt_import_path)
File "/usr/lib/python3.8/importlib/__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
File "<frozen importlib._bootstrap>", line 991, in _find_and_load
File "<frozen importlib._bootstrap>", line 973, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'colossalai._C.cpu_adam'
need the g++ version 5, the centos7.5 default g++ is 4.8.5 .after install apex, the error is gone, but it appears this error: ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
from apex import amp
File "/home/elven/.local/lib/python3.9/site-packages/apex/init.py", line 13, in
from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
need the g++ version 5, the centos7.5 default g++ is 4.8.5 .after install apex, the error is gone, but it appears this error: ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location) from apex import amp File "/home/elven/.local/lib/python3.9/site-packages/apex/init.py", line 13, in from pyramid.session import UnencryptedCookieSessionFactoryConfig ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
Oh, no! you cannot install apex by pip install apex, but by
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir ./
need the g++ version 5, the centos7.5 default g++ is 4.8.5 .after install apex, the error is gone, but it appears this error: ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location) from apex import amp File "/home/elven/.local/lib/python3.9/site-packages/apex/init.py", line 13, in from pyramid.session import UnencryptedCookieSessionFactoryConfig ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
Oh, no! you cannot install apex by pip install apex, but by
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir ./
the same error,did this method need to install apex before colossai? when i instrall colossai by soure " CUDA_EXT=1 pip install . " it tolds "Your compiler (c++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 5.0 and above" only "pip install . "works ,but can not train, after install apex in source , the same error appears
need the g++ version 5, the centos7.5 default g++ is 4.8.5 .after install apex, the error is gone, but it appears this error: ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location) from apex import amp File "/home/elven/.local/lib/python3.9/site-packages/apex/init.py", line 13, in from pyramid.session import UnencryptedCookieSessionFactoryConfig ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
Oh, no! you cannot install apex by pip install apex, but by
git clone https://github.com/NVIDIA/apex
cd apex
pip install -v --no-cache-dir ./
the same error,did this method need to install apex before colossai? when i instrall colossai by soure " CUDA_EXT=1 pip install . " it tolds "Your compiler (c++ 4.8.5) may be ABI-incompatible with PyTorch! Please use a compiler that is ABI-compatible with GCC 5.0 and above" only "pip install . "works ,but can not train, after install apex in source , the same error appears
I have solved this problem,I install scl and install the gcc7 , now it can run ,thanks !
Have you tried installing from source? Or try the command CUDA_EXT=1 pip install colossalai to install the lib?
If you have solved the issue, kindly share your approach for new comers!
Exception: [extension] Failed to build PyTorch extension because the detected CUDA version (12.0) mismatches the version that was used to compile PyTorch (11.3).Please make sure you have set the CUDA_HOME correctly and installed the correct PyTorch in https://pytorch.org/get-started/locally/ .
Have you tried installing from source? Or try the command CUDA_EXT=1 pip install colossalai to install the lib?
If you have solved the issue, kindly share your approach for new comers!
Exception: [extension] Failed to build PyTorch extension because the detected CUDA version (12.0) mismatches the version that was used to compile PyTorch (11.3).Please make sure you have set the CUDA_HOME correctly and installed the correct PyTorch in https://pytorch.org/get-started/locally/ .
Hi, @yifanhunter It looks like that there is something wrong with you CUDA_HOME, can you try export CUDA_HOME=/usr/local/cuda ?
Hi, thanks for reporting this, and sorry it went unanswered for so long. We're going through older issues and closing the ones that no longer apply to the current codebase. The code this issue refers to (colossalai/kernel/op_builder/builder.py) has since been refactored or moved to colossalai/legacy, so the problem as described no longer applies to the current main branch. We're marking it as stale and will close it in 14 days. If you still see this problem with the latest ColossalAI on PyTorch 2.x, please comment here (or open a new issue) with your environment and a minimal reproduction, and we'll take a look.
Closing this issue since there has been no response in the 14 days after it was marked as stale. If you still run into this problem with the latest ColossalAI on PyTorch 2.x, please open a new issue using the bug report template, with your environment and a minimal reproduction.
Activity
Issues-translate-bot commentedon Apr 1, 2023
Title: [BUG]No module named 'colossalai._C.cpu_adam':
ifromeast commentedon Apr 1, 2023
only
colossalai_geminiandcolossalai_zero2strategies have this BUG.emigmo commentedon Apr 3, 2023
too
JThh commentedon Apr 5, 2023
Have you tried installing from source? Or try the command
CUDA_EXT=1 pip install colossalaito install the lib?If you have solved the issue, kindly share your approach for new comers!
janglichao commentedon Apr 8, 2023
same problem, can anyone help!!!
janglichao commentedon Apr 8, 2023
same problem, can anyone help!!!
ifromeast commentedon Apr 11, 2023
install
apexfirstly, it workselven2016 commentedon Apr 18, 2023
how to solve this issue,I also have this problem,help,thanks
ifromeast commentedon Apr 18, 2023
just install
apexfirstlyelven2016 commentedon Apr 18, 2023
need the g++ version 5, the centos7.5 default g++ is 4.8.5 .after install apex, the error is gone, but it appears this error: ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
from apex import amp
File "/home/elven/.local/lib/python3.9/site-packages/apex/init.py", line 13, in
from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)
ifromeast commentedon Apr 18, 2023
Oh, no! you cannot install apex by
pip install apex, but byelven2016 commentedon Apr 18, 2023
the same error,did this method need to install apex before colossai? when i instrall colossai by soure " CUDA_EXT=1 pip install . " it tolds "Your compiler (c++ 4.8.5) may be ABI-incompatible with PyTorch!
Please use a compiler that is ABI-compatible with GCC 5.0 and above" only "pip install . "works ,but can not train, after install apex in source , the same error appears
elven2016 commentedon Apr 18, 2023
I have solved this problem,I install scl and install the gcc7 , now it can run ,thanks !
yifanhunter commentedon May 30, 2023
Exception: [extension] Failed to build PyTorch extension because the detected CUDA version (12.0) mismatches the version that was used to compile PyTorch (11.3).Please make sure you have set the CUDA_HOME correctly and installed the correct PyTorch in https://pytorch.org/get-started/locally/ .
ifromeast commentedon May 31, 2023
Hi, @yifanhunter It looks like that there is something wrong with you CUDA_HOME, can you try
export CUDA_HOME=/usr/local/cuda?JazyJiang commentedon Oct 22, 2026
Hi, thanks for reporting this, and sorry it went unanswered for so long. We're going through older issues and closing the ones that no longer apply to the current codebase. The code this issue refers to (
colossalai/kernel/op_builder/builder.py) has since been refactored or moved tocolossalai/legacy, so the problem as described no longer applies to the current main branch. We're marking it as stale and will close it in 14 days. If you still see this problem with the latest ColossalAI on PyTorch 2.x, please comment here (or open a new issue) with your environment and a minimal reproduction, and we'll take a look.JazyJiang commentedon Nov 5, 2026
Closing this issue since there has been no response in the 14 days after it was marked as stale. If you still run into this problem with the latest ColossalAI on PyTorch 2.x, please open a new issue using the bug report template, with your environment and a minimal reproduction.