d-ailin / GDN

Implementation code for the paper "Graph Neural Network-Based Anomaly Detection in Multivariate Time Series" (AAAI 2021)
MIT License
467 stars 140 forks source link

Operational problems #10

Closed zulihit closed 2 years ago

zulihit commented 2 years ago

Hello, thank you for your creative paper, which is very helpful to me. I had some problems running your codes,may I ask for some advice?

  1. Do I need to run in exactly the same environment? I use Windows, torch1.9.1, and cuda11.1
  2. When I run main.py in the environment above, I get [Errno 2] No such file or directory:'. /data/wadi/train.csv', and when this error occurs I rename the msl folder under the data folder to wadi and try to run main.py again, which causes another problem: RuntimeError: softmax() Expected a value of type 'Optional[Tensor]' for argument 'ptr' but instead found type 'int'. Position: 2 Value: 3456 Declaration: softmax(Tensor src, Tensor? index=None, Tensor? ptr=None, int? num_nodes=None, int dim=0) -> (Tensor) Cast error details: Unable to cast Python instance to C++ type (compile in debug mode for details) Is this because of my environmental problems or for other reasons? Thanks
d-ailin commented 2 years ago

Hi, yes, this is caused by the mismatched environment setting. So It should be best to use the same environment. You could create the environment with conda/venv.

zulihit commented 2 years ago

Thank you for your response, I have now created the same environment. I also want to ask if I want to run on Windows 10, do I need to run main.py? How can I get the results, thank you again.

d-ailin commented 2 years ago

Sure, you need to run the script no matter which OS you are using. Just follow the instruction to put in your custom data and run the script.

Scienceseb commented 2 years ago

Hello I get the same error:

RuntimeError: softmax() Expected a value of type 'Optional[Tensor]' for argument 'ptr' but instead found type 'int'.
Position: 2
Value: 48
Declaration: softmax(Tensor src, Tensor? index=None, Tensor? ptr=None, int? num_nodes=None, int dim=0) -> (Tensor)
Cast error details: Unable to cast Python instance to C++ type (compile in debug mode for details)

Why the code cannot work with my environment ? It is the first time I ever encounter that type of error... I have CUDA 11.3 and PyTorch 1.10.2.

Thanks for your help !