WenjieDu / SAITS

The official PyTorch implementation of the paper "SAITS: Self-Attention-based Imputation for Time Series". A fast and state-of-the-art (SOTA) deep-learning neural network model for efficient time-series imputation (impute multivariate incomplete time series containing NaN missing data/values with machine learning). https://arxiv.org/abs/2202.08516
https://doi.org/10.1016/j.eswa.2023.119619
MIT License
292 stars 48 forks source link

How to comprehend the NNI finetunning? #30

Closed levisocool closed 7 months ago

levisocool commented 7 months ago

First, the file SAITS_basic_config.ini under NNI_tuning folder miss 2 args: "MIT" & "ORT", which influence the script python ../../run_models.py --config_path SAITS_basic_config.ini --param_searching_mode running. You may add this two args in the .ini file and also check for other .ini files if you have time. Second, i am wondering how to check the help of nni for tuning the parameters. To be more specific, which parameters did nni change? When and how much did the parameters change? Only parameters listed in SAITS_searching_space.json file will be changed?

Thanks for your attention.

WenjieDu commented 7 months ago

Hi there,

Thank you so much for your attention to SAITS! If you find SAITS is helpful to your work, please star⭐️ this repository. Your star is your recognition, which can let others notice SAITS. It matters and is definitely a kind of contribution.

I have received your message and will respond ASAP. Thank you again for your patience! 😃

Best,
Wenjie

WenjieDu commented 7 months ago

I don't understand why you want to tune the model with/without "MIT" & "ORT". First, they are not hyperparameters but are learning objectives. Second, if you want to explore the model's performance with/without "MIT" & "ORT", you can simply turn the learning tasks on or off in the configuration file.

Regarding your second question, you're not familiar with NNI. I suggest you check their official docs first and try to run their demo.

Let me know if you have further questions. Please star this repo if it is useful to you. Thanks.

levisocool commented 7 months ago

For the first comment, i just downloaded your project, built up environment and run code python ../../run_models.py --config_path SAITS_basic_config.ini --param_searching_mode command, but it returns NoOptionError: No option 'mit' in section: 'training'. So i add MIT = Trueand ORT = True in traning section of SAITS_basic_config.ini. Then the code works. So i raise the issue to feedback. And there are exactly "MIT" and "ORT" args in run_models.py but no "MIT" and "ORT" parameters in *.ini file.

I need to apology that my two quetions are not connected if i mislead you. And i don't want to tune the model with/without "MIT" & "ORT" because they are necessary for the missing values imputation as described in your paper. I literally just want to run through your code.

For the second comment: Okay, i will learn the nni first, thanks.

WenjieDu commented 7 months ago

Sorry, I still don't understand your description below So i add MIT = True and ORT = True in traning section of SAITS_basic_config.ini. Then the code works. So i raise the issue to feedback. And there are exactly "MIT" and "ORT" args in run_models.py but no "MIT" and "ORT" parameters in *.ini file.

What do you mean by "there are exactly "MIT" and "ORT" args in run_models.py but no "MIT" and "ORT" parameters in *.ini file"?

不好意思,我还是看不懂你的描述。我看到你star了一些中文开源项目,所以我推断你应该也会中文,所以我们下面用中文沟通。

  1. 所有的.ini后缀的配置文件中在[training]部分都有MIT和ORT的配置选项,你遇到NoOptionError是因为在你自己写的配置文件中,你没有加上;
  2. 你的描述中有地方是逻辑混乱且相悖的,一般这样的提问都是因为提问者没有理解代码逻辑,而这个issue的发起是因为你想要使用NNI的功能进行超参调优,但是在不了解NNI框架的情况下运行了代码,所以导致了这后面的一系列疑问;
  3. 一个阅读建议:提问的智慧

如果在你读懂了本项目代码、学会了使用NNI之后还有问题的话,请继续回复。谢谢。

levisocool commented 7 months ago

好的,中文比较好沟通,英文不太行。 没错,标题是与NNI相关的,正文中也只有第二问是和标题相关的,结论是我后续会先学习NNI再提问。 第一个问题是指你的源码里的SAITS_basic_config.ini文件中[training]部分缺少MIT和ORT的配置选项,导致了运行出错,路径是SAITS/NNI_tuning/SAITS/SAITS_basic_config.ini。你可以检查一下。

WenjieDu commented 7 months ago

非常感谢你能指出来!是的,我刚检查了一下,这应该是在代码正式放出来之前做了一些重构,但是当时只调整了config文件夹下配置文件中的变量名称,但是忽略了调参文件夹NNI_tuning下的配置文件。我会发起一个PR修正该问题,同时关联本issue邀请你做代码审查。谢谢。

levisocool commented 7 months ago

好的。 刚刚看了下,NNI_tuning下面其他几个算法的ini文件也缺少MIT和ORT的配置选项。

WenjieDu commented 7 months ago

我全部检查了一遍,已经发起PR #31,麻烦你看一下,谢谢。

WenjieDu commented 7 months ago

从v0.2开始,PyPOTS也支持使用NNI调参了

如果你的工作研究内容与POTS数据相关,欢迎加入PyPOTS社区https://github.com/WenjieDu/PyPOTS/#-community 👍