zhouhaoyi / Informer2020

The GitHub repository for the paper "Informer" accepted by AAAI 2021.
Apache License 2.0
5.27k stars 1.1k forks source link

问什么会报错:this version of pandas is incompatible with numpy < 1.20.3 #572

Open xuhai1 opened 11 months ago

xuhai1 commented 11 months ago

我做了一个bat执行,结果requirements.txt中的numpy和pandas版本不兼容, 我是python小白,有点不明白了。 D:\2022_AI\Informer2020-main>python -u main_informer.py --model 'informer' --data 'ETTh1' --root_path './ETDataset-main/ETT-small/' --data_path 'ETTh1.csv' --features 'M' --target 'OT' --freq 'h' --checkpoints './checkpoints/' --seq_len 96 --label_len 48 --pred_len 24 --enc_in 7 --dec_in 7 --c_out 7 --d_model 512 --n_heads 8 --e_layers 2 --d_layers 1 --s_layers [3, 2, 1] --d_ff 2048 --factor 5 --padding 0 --distil --dropout 0.05 --attn 'prob' --embed 'timeF' --activation 'gelu' --output_attention --do_predict --mix --cols None --itr 2 --num_workers 0 --train_epochs 6 --batch_size 32 --patience 3 --des 'test' --learning_rate 0.0001 --loss 'mse' --lradj 'type1' --use_amp --inverse --use_gpu --gpu 0 --use_multi_gpu --devices '0,1,2,3' Traceback (most recent call last): File "main_informer.py", line 5, in from exp.exp_informer import Exp_Informer File "D:\2022_AI\Informer2020-main\exp\exp_informer.py", line 1, in from data.data_loader import Dataset_ETT_hour, Dataset_ETT_minute, Dataset_Custom, Dataset_Pred File "D:\2022_AI\Informer2020-main\data\data_loader.py", line 3, in import pandas as pd File "D:\2022_NewTech\QLib\qlib-0.8.6\venv\lib\site-packages\pandas__init.py", line 22, in from pandas.compat import is_numpy_dev as _is_numpy_dev # pyright: ignore # noqa:F401 File "D:\2022_NewTech\QLib\qlib-0.8.6\venv\lib\site-packages\pandas\compat__init__.py", line 18, in from pandas.compat.numpy import ( File "D:\2022_NewTech\QLib\qlib-0.8.6\venv\lib\site-packages\pandas\compat\numpy\init__.py", line 22, in raise ImportError( ImportError: this version of pandas is incompatible with numpy < 1.20.3 your numpy version is 1.19.4. Please upgrade numpy to >= 1.20.3 to use this pandas version

进程已结束,退出代码1

xuhai1 commented 11 months ago

我试图加载高版本的numpy, 结果告诉我没有这个版本,最高版本才1.19.5 pip install numpy==1.20.3 ERROR: Could not find a version that satisfies the requirement numpy==1.20.3 (from versions: 1.3.0, 1.4.1, 1.5.0, 1.5.1, 1.6.0, 1.6.1, 1.6.2, 1.7.0, 1.7.1, 1.7.2, 1.8.0, 1.8.1, 1.8.2, 1.9.0, 1.9.1, 1.9.2, 1.9.3, 1.10.0.post2, 1.10.1, 1.10.2, 1.10.4, 1.11.0, 1.11.1, 1.11.2, 1.11.3, 1.12.0, 1.12.1, 1.13.0, 1.13.1 , 1.13.3, 1.14.0, 1.14.1, 1.14.2, 1.14.3, 1.14.4, 1.14.5, 1.14.6, 1.15.0, 1.15.1, 1.15.2, 1.15.3, 1.15.4, 1.16.0, 1.16.1, 1.16.2, 1.16.3, 1.16.4, 1.16.5, 1.16.6, 1.17.0, 1.17.1, 1.17.2, 1.17.3, 1.17.4, 1.17.5, 1.18.0, 1.18.1, 1.18.2, 1.18.3, 1.18.4, 1.18.5, 1.19.0, 1.19.1, 1.19.2, 1.19.3, 1.19.4, 1.19.5)
ERROR: No matching distribution found for numpy==1.20.3

xuhai1 commented 11 months ago

我查看了一下pandas版本,输出: pandas版本: 0.25.1 完全符合Requirements.txt

xuhai1 commented 11 months ago

自己改好了,环境变量指向了另一个python, bat中给python.exe加上路径就可以了 %cd%/venv/Scripts/python -u main_informer.py --model 'informer' --data 'ETTh1' ^ --root_path './ETDataset-main/ETT-small/' --data_path 'ETTh1.csv' --features 'M' ^ --target 'OT' --freq 'h' --checkpoints './checkpoints/' ^ --seq_len 96 --label_len 48 --pred_len 24 ^ --enc_in 7 --dec_in 7 --c_out 7 --d_model 512 ^ --n_heads 8 --e_layers 2 --d_layers 1 ^ --s_layers 3,2,1 --d_ff 2048 --factor 5 --padding 0 ^ --distil --dropout 0.05 --attn 'prob' --embed 'timeF' --activation 'gelu' ^ --output_attention --do_predict --mix --cols None --itr 2 ^ --num_workers 0 --train_epochs 6 ^ --batch_size 32 --patience 3 --des 'test' ^ --learning_rate 0.0001 --loss 'mse' --lradj 'type1' ^ --use_amp --inverse --use_gpu True --gpu 0 --use_multi_gpu --devices '0,1,2,3'

xuhai1 commented 11 months ago

不好意思,不用加单引号,后来可以执行了 %cd%/venv/Scripts/python -u main_informer.py --model informer --data ETTh1 ^ --root_path ./ETDataset-main/ETT-small/ --data_path ETTh1.csv --features M ^ --target OT --freq h --checkpoints ./checkpoints/ ^ --seq_len 96 --label_len 48 --pred_len 24 ^ --enc_in 7 --dec_in 7 --c_out 7 --d_model 512 ^ --n_heads 8 --e_layers 2 --d_layers 1 ^ --s_layers 3,2,1 --d_ff 2048 --factor 5 --padding 0 ^ --distil --dropout 0.05 --attn prob --embed timeF --activation gelu ^ --output_attention --do_predict --mix --cols None --itr 2 ^ --num_workers 0 --train_epochs 6 ^ --batch_size 32 --patience 3 --des test ^ --learning_rate 0.0001 --loss mse --lradj type1 ^ --use_amp --inverse --use_gpu True --gpu 0 --use_multi_gpu --devices 0,1,2,3

xuhai1 commented 11 months ago
image

不明白为什么网络占用这么高?