GLM icon indicating copy to clipboard operation
GLM copied to clipboard

Google Colab error

Open MultiTrickFox opened this issue 2 years ago • 1 comments

Basic code:

!git clone https://github.com/THUDM/GLM %cd GLM !pip install -r requirements.txt !pip install apex

modify model_path inside generate_block.sh here ; I'm using glm-1.5-generation.tar.bz2

!chmod 755 scripts/generate_block.sh !scripts/generate_block.sh config_tasks/model_blocklm_10B_chinese.sh

Error Log:

Traceback (most recent call last): File "generate_samples.py", line 23, in from arguments import get_args File "/content/GLM/arguments.py", line 23, in from utils import get_hostname File "/content/GLM/utils.py", line 26, in from fp16 import FP16_Optimizer File "/content/GLM/fp16/init.py", line 15, in from .fp16util import ( File "/content/GLM/fp16/fp16util.py", line 21, in import mpu File "/content/GLM/mpu/init.py", line 35, in from .layers import ColumnParallelLinear File "/content/GLM/mpu/layers.py", line 28, in from apex.normalization.fused_layer_norm import FusedLayerNorm as LayerNorm File "/usr/local/lib/python3.7/dist-packages/apex/init.py", line 13, in from pyramid.session import UnencryptedCookieSessionFactoryConfig ImportError: cannot import name 'UnencryptedCookieSessionFactoryConfig' from 'pyramid.session' (unknown location)

MultiTrickFox avatar Oct 01 '22 02:10 MultiTrickFox

You cannot install apex with pip install apex because there is another package apex that has nothing to do with deep learning in PyPI, which is why we didn't list apex in requirements.txt. You must manually install apex following https://github.com/NVIDIA/apex#from-source, after running pip uninstall apex.

duzx16 avatar Oct 02 '22 09:10 duzx16