NVIDIA / apex

A PyTorch Extension: Tools for easy mixed precision and distributed training in Pytorch
BSD 3-Clause "New" or "Revised" License
8.42k stars 1.4k forks source link

Cannot import name 'UnencryptedCookieSessionFactoryConfig' #1804

Closed mahmoodn closed 5 months ago

mahmoodn commented 5 months ago

Hi, Is there any thought about the following error message?

Traceback (most recent call last):
  File "./pretrain_gpt.py", line 20, in <module>
    from megatron import get_args
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/__init__.py", line 27, in <module>
    from .initialize  import initialize_megatron
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/initialize.py", line 32, in <module>
    from megatron.checkpointing import load_args_from_checkpoint
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/checkpointing.py", line 28, in <module>
    from .utils import (unwrap_model,
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/utils.py", line 23, in <module>
    from apex.multi_tensor_apply import multi_tensor_applier
  File "/home/mahmood/.local/lib/python3.8/site-packages/apex/__init__.py", line 13, in <module>
    from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)

Apparently, there is a problem with APEX library. However, I can not figure it out. I think all requirements are met.

$ pip3 list | grep -i "cxxfilt\|numpy\|apex\|tqdm\|pyyaml\|pytest\|packaging"
WARNING: Ignoring invalid distribution -umpy (/home/mnaderan/.local/lib/python3.8/site-packages)
apex                              0.9.10.dev0
cxxfilt                           0.3.0
numpy                             1.23.5
numpydoc                          0.7.0
packaging                         20.9
pytest                            8.2.2
PyYAML                            5.4.1
tqdm                              4.66.2
vandesa003 commented 5 months ago

got same issue, any ideas how to resolve this?

Wei-JL commented 4 months ago

遇到了同样的问题,有什么解决办法吗? pip install pyramid==1.5

Wei-JL commented 4 months ago

Hi, Is there any thought about the following error message?

Traceback (most recent call last):
  File "./pretrain_gpt.py", line 20, in <module>
    from megatron import get_args
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/__init__.py", line 27, in <module>
    from .initialize  import initialize_megatron
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/initialize.py", line 32, in <module>
    from megatron.checkpointing import load_args_from_checkpoint
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/checkpointing.py", line 28, in <module>
    from .utils import (unwrap_model,
  File "/disk1/mahmood/training/large_language_model/megatron-lm/megatron/utils.py", line 23, in <module>
    from apex.multi_tensor_apply import multi_tensor_applier
  File "/home/mahmood/.local/lib/python3.8/site-packages/apex/__init__.py", line 13, in <module>
    from pyramid.session import UnencryptedCookieSessionFactoryConfig
ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)

Apparently, there is a problem with APEX library. However, I can not figure it out. I think all requirements are met.

$ pip3 list | grep -i "cxxfilt\|numpy\|apex\|tqdm\|pyyaml\|pytest\|packaging"
WARNING: Ignoring invalid distribution -umpy (/home/mnaderan/.local/lib/python3.8/site-packages)
apex                              0.9.10.dev0
cxxfilt                           0.3.0
numpy                             1.23.5
numpydoc                          0.7.0
packaging                         20.9
pytest                            8.2.2
PyYAML                            5.4.1
tqdm                              4.66.2

pip install pyramid==1.5