问题记录:
在使用tsai库运行rocket算法时,系统报错
Traceback (most recent call last):
File "D:/JetBrains/timeseries/test.py", line 29, in
X_train, y_train = create_rocket_features(dls.train, model)
File "D:\JetBrains\timeseries\venv\lib\site-packages\tsai\models\ROCKET.py", line 140, in create_rocket_features
for i,(xb,yb) in enumerate(progress_bar(dl, display=verbose, leave=False, comment='batch/batches')):
TypeError: init() got an unexpected keyword argument 'comment'
尝试解决方法
1、更新包
重新加载progress_bar()
所需要的fastprogress包,还是报错
import fastprogress
2、在github上搜索discussion,有人遇到同样问题,并向作者提问,但作者并为给出解答,因为作者代码可以正常运行
作者给出了自己的运行环境
os : Linux-5.4.144+-x86_64-with-Ubuntu-18.04-bionic
python : 3.7.12
tsai : 0.3.1
fastai : 2.5.3
fastcore : 1.3.29
fastprogress : 1.0.2
torch : 1.10.0+cu111
device : 1 cuda (['Tesla P100-PCIE-16GB'])
n_cpus : 2
RAM : 12.69 GB
GPU memory : [15.9] GB
根据作者给出的方法,看查看自己的环境
from tsai.all import *
import fastprogress
my_setup(fastprogress)
经过查看,博主当时环境与作者略有不同,但经过重新下载包后,环境如下,但依旧报相同的错
os : Windows-10-10.0.19041-SP0
python : 3.7.13
tsai : 0.3.1
fastai : 2.5.3
fastcore : 1.3.29
fastprogress : 1.0.2
torch : 1.10.2+cpu
device : cpu
cpu cores : 8
RAM : 15.79 GB
GPU memory : [2.0] GB
3、重新创建一个环境,并安装包
博主找了另外一个torch版本为3.8.1的环境重新安装tsai库,成功运行,成功运行的环境为
os : Windows-10-10.0.19044-SP0
python : 3.8.13
tsai : 0.3.4
fastai : 2.7.10
fastcore : 1.5.27
fastprogress : 1.0.3
torch : 1.8.1
device : 1 gpu (['NVIDIA GeForce MX450'])
cpu cores : 4
threads per cpu : 2
RAM : 15.79 GB
GPU memory : [2.0] GB