HyunWookL / TESTAM

Official Code of TESTAM: A Time-Enhanced Spatio-Temporal Attention Model with Mixture of Experts
MIT License
18 stars 1 forks source link

Some questions in reproducting codes #2

Open Andy-HuY opened 2 months ago

Andy-HuY commented 2 months ago

Thanks for your open source and the enlightening paper. During reproducting your codes, I met some bugs about 'args.xx'.

e.g. : NameError: name 'args' is not defined and NameError: name 'i' is not defined, when I tried to run 'main.py'.

I sovled the former one, how about the name 'i' ? Can you help me out ?

HyunWookL commented 2 months ago

Thank you for finding out the issue!

I've fix typo, errors, and the issue you mentioned. I think it works well now, however, please check it again and let me know if there are another problems.

I'll just keep this comment open until May 1st for further question.

Andy-HuY commented 2 months ago

Thank you for finding out the issue!

I've fix typo, errors, and the issue you mentioned. I think it works well now, however, please check it again and let me know if there are another problems.

I'll just keep this comment open until May 1st for further question

Thank you so much for your reply. Right now, the main.py can work. Also, I've generated test/train/val data. But how can I load the datasets' adj_mx.pkl?

FileNotFoundError: [Errno 2] No such file or directory: 'data/METR-LA/adj_mx.pkl'

HyunWookL commented 2 months ago

Thank you for your question.

Actually, TESTAM do not requires adjacency matrix. It only used to automatically find the total number of nodes.

If you want to use custom dataset, it is better to directly use train.py instead of run.py. Please check the README.md file.

You may run the code with custom dataset like this: 1) Run "run.py" file and copy printed command 2) From the printed comment, remove --adjdata ./data/{}/adj_mx.pkl 3) Replace the arguments accordingly. Please note that you need to specify --num_nodes when you do not provide adjdata.

Andy-HuY commented 2 months ago

Thank you for your question.

Actually, TESTAM do not requires adjacency matrix. It only used to automatically find the total number of nodes.

If you want to use custom dataset, it is better to directly use train.py instead of run.py. Please check the README.md file.

You may run the code with custom dataset like this:

  1. Run "run.py" file and copy printed command
  2. From the printed comment, remove --adjdata ./data/{}/adj_mx.pkl
  3. Replace the arguments accordingly. Please note that you need to specify --num_nodes when you do not provide adjdata.

Thanks for your detailed reply. It works on METR-LA!!! Thank you again. I'm going to dig into your thoughts and other datasets.

Another question. I noticed that the dataset EXPYTKY contains a lot of files, which is quite different from the other two with only one h5 file. Do you know why and what's the difference. Is it not convenient for users?

Andy-HuY commented 2 months ago

Thank you for finding out the issue!

I've fix typo, errors, and the issue you mentioned. I think it works well now, however, please check it again and let me know if there are another problems.

I'll just keep this comment open until May 1st for further question.

What a pity that you are going to close this comment. Could you please leave me an email address? There is only another author's email on your online paper.