Encounter & Fixing Bugs
记录遇到的典型的Bugs和解决方法
SUFEHeisenberg
在读PhD,研究兴趣为NLP方向。
展开
-
【Bugs】openai.error.ServiceUnavailableError The server is overloaded or not ready yet
【代码】【Bugs】openai.error.ServiceUnavailableError The server is overloaded or not ready yet。原创 2023-07-21 15:57:40 · 1288 阅读 · 0 评论 -
【Bugs】JSONDecodeError Extra data line 2 column 1
Json Debugs原创 2022-12-15 17:09:58 · 1344 阅读 · 0 评论 -
【Bugs】RuntimeError CUDA out of memory
【Bugs】RuntimeError: CUDA out of memory.报错如下:Traceback (most recent call last): File "xxx.py", line 110, in <module> loss.backward() File "/nfsshare/apps/anaconda3/lib/python3.7/site-packages/torch/tensor.py", line 185, in backward torch原创 2021-12-26 20:19:42 · 1037 阅读 · 1 评论 -
【Bugs】ValueError not enough values to unpack (expected 2, got 1)
【Bugs】ValueError: not enough values to unpack (expected 2, got 1)1. Bug 场景Pytorch环境下用Huggingface获取bert.outputs代码output = model(**input)[0]的时候出现bug>>>model(**input)Traceback (most recent call last): File "<input>", line 1, in <module原创 2021-11-13 16:29:04 · 2152 阅读 · 0 评论 -
【Bugs】pyarrow.lib.ArrowInvalid Column 2 named label expected length 1004 but got length 1000
【Bugs】pyarrow.lib.ArrowInvalid: Column 2 named label expected length 1004 but got length 1000又是一年双十一,又累又困惨戚戚。——2021.11.11bugs描述在pytorch huggingface环境中想更改tokenizer编码的input_ids的index,本想通过赋值的方式发现报错:tokenized_datasets_test = agnews_dataset['test'].map(tok原创 2021-11-11 20:49:37 · 2292 阅读 · 0 评论 -
【Bugs】解决报错CondaValueError- prefix already exists
【Bugs】CondaValueError: prefix already exists1. 问题情景在conda create -n ur_env_name python=3.7的时候报错WARNING: A directory already exists at the target location '/Users/usr/anaconda3/envs/ur_env_name 'but it is not a conda environment.Continue creating envir原创 2021-10-11 18:49:20 · 13242 阅读 · 0 评论 -
【Bugs】解决报错RemoveError- ‘setuptools‘ is a dependency of conda
【Bugs】解决报错RemoveError: ‘setuptools’ is a dependency of cond1. 报错场景在整理conda的虚拟环境是想移除某个虚拟环境conda remove -n ur_env_name --all遇到errors:RemoveError: 'setuptools' is a dependency of conda and cannot be removed from conda's operating environment后参考RemoveErro原创 2021-10-11 17:11:59 · 896 阅读 · 0 评论 -
【Bugs】解决报错[nltk_data] Error loading stopwords urlopen error [Errno -3]
【Bugs】解决报错[nltk_data] Error loading stopwords: <urlopen error [Errno -3]一、报错场景在公共服务器上复现论文代码时报错,代码如下from nltk.corpus import stopwordsstop_words = stopwords.words('english')报错:[nltk_data] Error loading stopwords: <urlopen error [Errno -3][nltk_原创 2021-01-23 11:25:27 · 932 阅读 · 0 评论 -
【Bugs 】解决collections.OrderedDict‘ object has no attribute ‘eval‘
【Bugs 】解决????collections.OrderedDict’ object has no attribute ‘eval’pytorch==1.6.0的框架下保存模型时,若想让模型在整个训练过程之后的预测过程中加载模型,不能使用torch.save(model.state_dict(),model_path),该语句只保存了模型的权重参数未保存整个模型,torch.load()时候会报错'collections.OrderedDict' object has no attribute 'e原创 2020-12-08 19:41:43 · 18272 阅读 · 0 评论 -
【Bugs】解决报错:tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm
发生这个错误的原因是我开了2个tensorflow,他们都要使用GPU。把另外一个程序关了就可以了。注意:cuda 和cuDNN 的不同版本兼容性可能导致这个问题,显卡驱动太旧也可能导致这个问题转载 2020-11-18 12:19:52 · 268 阅读 · 0 评论 -
【Bugs】ValueError Negative dimension size caused by subtracting 20 from 2
【Bugs】ValueError: Negative dimension size caused by subtracting 20 from 2 for '{{node model_1/conv1d_3/conv1d}}一、报错问题from tensorflow.keras.models import load_modelmodel = load_model('model.h5')model.predict([np.array(input1),np.array(input2)])Output原创 2020-11-10 13:09:48 · 397 阅读 · 1 评论 -
【Bugs】解决CondaHTTPError: HTTP 000 CONNECTION FAILED
【Bugs】解决CondaHTTPError: HTTP 000 CONNECTION FAILED报错代码CondaHTTPError: HTTP 000 CONNECTION FAILED for url <https://repo.anaconda.com/pkgs/main/linux-64/sympy-1.6.2-py37_0.conda>解决方法conda config --add channels http://mirrors.tuna.tsinghua.edu.cn/a原创 2020-11-08 12:39:38 · 215 阅读 · 0 评论 -
【Bugs】Unknown Failed to get convolution algorithm
【Bugs】Unknown: Failed to get convolution algorithm. This is probably because cuDNN failed to initialize问题说明报错如下:tensorflow.python.framework.errors_impl.UnknownError: Failed to get convolution algorithm. This is probably because cuDNN failed to initializ原创 2020-11-06 16:25:02 · 418 阅读 · 2 评论 -
【Bugs】Keras AttributeError ‘NoneType‘ object has no attribute ‘_inbound_nodes‘报错
【Bugs】Keras AttributeError: ‘NoneType’ object has no attribute '_inbound_nodes’报错问题说明很多原因可能会出现这种问题。出错代码如下:from keras.backend as Kdef CNN_clf(): title_input = Input(shape=(title_maxlen,), name='title_input') content_input = Input(shape=(content原创 2020-11-06 16:17:17 · 672 阅读 · 0 评论 -
【Bug报错】解决Could not load dynamic library cudart64_101.dll报错问题
【Bug报错】解决Could not load dynamic library cudart64_101.dll报错问题一、环境Quadro P2000(驱动452.39)python 3.7.3tensorflow 1.15.0CUDA 10.1cudnn v7.6.5二、报错信息Could not load dynamic library ‘cudart64_101.dll‘Could not load dynamic library ‘cublas64_10.原创 2020-10-23 21:43:10 · 1381 阅读 · 1 评论