zezhishao / basicts Goto Github PK
View Code? Open in Web Editor NEWA Standard and Fair Time Series Forecasting Benchmark and Toolkit.
License: Apache License 2.0
A Standard and Fair Time Series Forecasting Benchmark and Toolkit.
License: Apache License 2.0
Hello, congrats for the great work! I was trying to do hyperparameter tuning of my model, using a sh file to pass the arguments into the py file (using argparse).
However, if I have a script, say "run.sh", it will run the "example/run.py", and then "example/run.py" will try to get the hyperparameters in "examples/Triformer/Triformer_ETTh1.py".
Now I want to pass the hyperparameters from "run.sh" to "examples/Triformer/Triformer_ETTh1.py". But it seems I can only pass arguments to the "example/run.py". Since the parameters are stored in "examples/Triformer/Triformer_ETTh1.py", which is the file I want to modify, could you kindly suggest on that? Thanks very much for your time!
We want to test with a trained model, but the code does not provide this functionality.
在tests文件下进行测试,最后跑出来的结果只有test+time.log里面什么都没有,想问下是什么原因呢?
我想对former模型,或者时空模型的图矩阵进行可视化,类似于热力图那种。请指点如何基于BasicTS实现?
General Time Series Forecasting:
Spatial-Temporal Forecasting:
Long Time Series Forecasting:
I want to ask you the reason that the acc of single-step prediction is not necessarily better than the acc of multi-step prediction at Horizon 1. And Why the acc of multi-step prediction at Horizon 1 does not decline with iteration.
Originally posted by @zhishiouo in #61 (comment)
你好,
我想问一下,我安装了easytorch,但是我运行的时候还是会显示:
from easytorch.easytorch import launch_training
ImportError: cannot import name 'launch_training' from 'easytorch.easytorch'
我尝试了好多,还是没有成功。想请教一下作者这到底是怎么回事。
BasicTS/basicts/runners/base_runner.py
Line 171 in 5639ebb
作者您好,BasicTS中时空预测12步的MAE,是每一步的MAE,还是多步MAE的平均值?比如说,第12步的MAE是,单纯12步的MAE,还是1步-12步MAE的平均值?
我目前将其他模型移植到BasicTS,但是面临问题是移植模型的loss部分需要多个损失项的相加,loss = loss1(data1)+loss2(data2)+....,但BasicTS框架中losses.py由于自定义损失函数被包装了,传参只有input_data, target_data两个,是否有解决方案?
您好!看到BasicTS的架构和代码,感觉到非常规范、清晰和优雅,因此想要fork您的库做二次开发,以适用于时间序列分类及其相关应用领域。
经过阅读BasicTS主页的介绍和部分代码,我总结了以下需要修改的点,不知道理解的对不对,冒昧打扰,希望能和您请教:
N
维,且N=1
。这样的话,是否可以不修改模型代码就适配已有的时序预测Baselines?感谢作者~ 辛苦了!
Thank you for providing an excellent easy-to-use library for spatial-temporal prediction.
But I found some running errors and now report them to you.
STGCN
KeyError: "No object named 'STGCN' found in 'Arch' registry!"
GraphWaveNet
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [64, 32, 307, 13]
STNorm
RuntimeError: Expected 2D (unbatched) or 3D (batched) input to conv1d, but got input of size: [64, 32, 307, 13]
The above errors can be reproduced using the PEMS04 dataset.
Looking forward to your reply.
Thanks for sharing your excellent work!
When I estimate the performance of my work with BasicTS, I found the overall MAPE of STNorm on PEMS07 is extremely low to 8.00%, which is almost the MAPE of third horizon(7.98%). Also, I cannot reproduce the performance but get overall 8.85% for MAPE.
Is it possible that it happened to be a little digital mistake here?
Thanks again for your nice work!
Great job! But I didn't find how to save the specific prediction results in config.
It used to be right. But after v0.2.0 change.
In base_tsf_runner.py #292 line the metric to calcuate loss should the forward_return[:2] which affected by CL setting.
But now it does not. And the model performance is worse than before because of this.
NEED TO FIX ASAP.
Add GTS model.
PEMS04 08 这类数据集原始数据是包括三个通道flow, speed, occupancy。在处理数据集的时候,只取了第一通道也就是flow,然后在脚本描述中出现了矛盾,所以我不是很清楚,在PEMS04 08这些数据集上,默认是预测速度还是流量
Hi, I'm using BasicTS to run some models. However, when I use multiple GPUs, if there exists some unused parameters such as some constant variable, I will get the error like RuntimeError: Expected to have finished reduction in the prior iteration before starting a new one. This error indicates that your module has parameters that were not used in producing loss. You can enable unused parameter detection by passing the keyword argument
find_unused_parameters=Trueto
torch.nn.parallel.DistributedDataParallel, and by making sure all
forwardfunction outputs participate in calculating loss. If you already have done the above, then the distributed data parallel module wasn't able to locate the output tensors in the return value of your module's
forwardfunction. Please include the loss function and the structure of the return value of
forwardof your module when reporting this issue (e.g. list, dict, iterable). Parameter indices which did not receive grad for rank 1: 48 49 50 51 52 53 In addition, you can set the environment variable TORCH_DISTRIBUTED_DEBUG to either INFO or DETAIL to print out information about which particular parameters did not receive gradient on this rank as part of this error
However, I can't find how to set the 'find_unused_parameters=True' in BasicTS. Could you do me a favor?
Thanks alot
I would like to ask the author how to proceed if I want to use wandb to record losses in the BASICTS framework, thanks
2022-11-02 11:05:17,415 - easytorch - INFO - Building model.
C:\Users\luo\anaconda3\envs\basicts\lib\site-packages\torch\cuda_init_.py:143: UserWarning:
NVIDIA GeForce RTX 3050 Ti Laptop GPU with CUDA capability sm_86 is not compatible with the current PyTorch installation.
The current PyTorch install supports CUDA capabilities sm_37 sm_50 sm_60 sm_61 sm_70 sm_75 compute_37.
If you want to use the NVIDIA GeForce RTX 3050 Ti Laptop GPU GPU with PyTorch, please check the instructions at https://pytorch.org/get-started/locally/
warnings.warn(incompatible_device_warn.format(device_name, capability, " ".join(arch_list), device_name))
2022-11-02 11:05:17,481 - easytorch-training - INFO - Initializing training.
2022-11-02 11:05:17,482 - easytorch-training - INFO - Set clip grad, param: {'max_norm': 5.0}
2022-11-02 11:05:17,482 - easytorch-training - INFO - Building training data loader.
train len: 23974
2022-11-02 11:05:17,583 - easytorch-training - INFO - Set optim: Adam (
Parameter Group 0
amsgrad: False
betas: (0.9, 0.999)
eps: 1e-08
lr: 0.002
weight_decay: 1e-05
)
2022-11-02 11:05:17,584 - easytorch-training - INFO - Set lr_scheduler: <torch.optim.lr_scheduler.MultiStepLR object at 0x000001F12B3E4908>
2022-11-02 11:05:17,590 - easytorch-training - INFO - Initializing validation.
2022-11-02 11:05:17,590 - easytorch-training - INFO - Building val data loader.
val len: 3425
test len: 6850
2022-11-02 11:05:17,866 - easytorch-training - INFO - Epoch 1 / 100
0%| | 0/750 [00:00<?, ?it/s]
Hi!
Thank you for this awesome work!
Could you help me navigate on how I can use this on my custom dataset?
Thanks!
BasicTS/examples/MLP/MLP_METR-LA.py
Line 11 in 5639ebb
Hello author, how can I export predicted values in BasicTS?I saw scripts/data_ Visualization/data_ Visualization.ipynb, but this program can only see real values, no predicted values。
作者你好,我如何导出预测值?在可视化程序中只能看到真实值的历史数据和未来数据,没有预测值的程序。感谢回答!
With CFG.NULL_VAL = 0.0
, three metrics (MAE, RMSE, MAPE) are defaulted as masked ones. Maybe you should use Masked XXX instead of XXX in experimental results?
终端指令:python examples/run.py -c examples/MTGNN/MTGNN_METR-LA.py
2023-08-20 11:17:39,599 - easytorch-training - INFO - Epoch 1 / 10
0%| | 0/192 [00:03<?, ?it/s]
2023-08-20 11:17:43,446 - easytorch-training - ERROR - Traceback (most recent call last):
File "D:\anaconda\envs\Basicts\lib\site-packages\easytorch\launcher\launcher.py", line 31, in training_func
File "D:\pycharmproject\BasicTS-master\basicts\runners\runner_zoo\mtgnn_runner.py", line 109, in train_iters
loss = super().train_iters(epoch, iter_index, data)
File "D:\pycharmproject\BasicTS-master\basicts\runners\base_tsf_runner.py", line 276, in train_iters
forward_return = list(self.forward(data=data, epoch=epoch, iter_num=iter_num, train=True))
loss = super().train_iters(epoch, iter_index, data)
File "D:\pycharmproject\BasicTS-master\basicts\runners\base_tsf_runner.py", line 276, in train_iters
forward_return = list(self.forward(data=data, epoch=epoch, iter_num=iter_num, train=True))
forward_return = list(self.forward(data=data, epoch=epoch, iter_num=iter_num, train=True))
prediction_data = self.model(
File "D:\anaconda\envs\Basicts\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
adp = self.gc(idx)
File "D:\anaconda\envs\Basicts\lib\site-packages\torch\nn\modules\module.py", line 1501, in _call_impl
return forward_call(*args, **kwargs)
File "D:\pycharmproject\BasicTS-master\basicts\archs\arch_zoo\mtgnn_arch\mtgnn_layers.py", line 192, in forward
s1, t1 = adj.topk(self.k, 1)
RuntimeError: selected index k out of range
这里k值报错,topk存在问题吗?没有研究明白,麻烦指点下,感谢!其他时空模型可以运行,唯独MTGNN报错。
air quaility数据中没有date这个字段了,想请教一下现在这个xlsx中每条数据和原始的时间戳之间的对应关系
I run this :python examples/run.py -c examples/GWNet/GWNet_METR-LA.py --gpus '0',
but it returned ' No module named '.home''
您好!十分感谢您的工作!关于模型测试结果有点疑问想请教下:
模型最终训练完成时如何显示最佳预测精度呢?即best model result的结果。目前BasicTS的log中是否是根据每个epoch找到val_mae最低的模型保存,然后用该checkpoint做多步预测计算平均test MAE呢?
如何在整个训练结束时打印出整个训练过程中val_mae最低模型的测试集预测精度指标呢?
例如下图所示,我发现在训练最后一轮时显示'Evaluate best model on test data'的结果并不是val_mae最低的模型的结果:
训练最后一轮时:
训练过程中间某一步:
请问在BasicTS中是如何确定当前的best model以及如何查看最终的评价结果呢?
期待您的回复!
Why is my single-step prediction accuracy low?
Hi, thanks for this repo! I am trying to run the MLP in example code, and in MLP_METR-LA.py the optimizer is adam. However when I run it the learning rate seems to be reduced to a half after every few epochs. Could you please help me with that? Where can I customize my learning rate? Thanks very much!
单纯在generate_training_data.py中选择False会报错
BasicTS/examples/MLP/MLP_METR-LA.py
Line 100 in 5639ebb
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.