twitter-research / graph-neural-pde

Graph Neural PDEs
Apache License 2.0
317 stars 52 forks source link

python run_GNN.py --dataset Cora #5

Closed aboudjelal closed 3 years ago

aboudjelal commented 3 years ago

Hello when I run python run_GNN.py --dataset Cora I have this error File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 294, in main(opt) File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 161, in main tmp_train_acc, tmp_val_acc, tmp_test_acc = this_test(model, data, opt) File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(*args, kwargs) File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 94, in test logits, accs = model(feat), [] File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/GNN/graph-neural-pde/src/GNN_early.py", line 70, in forward z = self.odeblock(x) File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/GNN/graph-neural-pde/src/block_transformer_attention.py", line 59, in forward state_dt = integrator( File "/home/GNN/graph-neural-pde/src/early_stop_solver.py", line 277, in call shapes, func, y0, t, rtol, atol, method, options = _check_inputs(func, y0, self.t, rtol, atol, method, options, SOLVERS) NameError: name 'SOLVERS' is not defined

JRowbottomGit commented 3 years ago

Hi @larbisoft,

very good timing. This is because of the change in signature for the most recent version of torchdiffeq.

I just pushed a small fix to handle the different versions.

Please let me know if it has fixed your problem.

Best wishes

James

From: larbisoft @.> Sent: 01 July 2021 17:01 To: twitter-research/graph-neural-pde @.> Cc: Subscribed @.***> Subject: [twitter-research/graph-neural-pde] python run_GNN.py --dataset Cora (#5)

Hello when I run python run_GNN.py --dataset Cora I have this error File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 294, in main(opt) File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 161, in main tmp_train_acc, tmp_val_acc, tmp_test_acc = this_test(model, data, opt) File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/autograd/grad_mode.py", line 28, in decorate_context return func(*args, kwargs) File "/home/GNN/graph-neural-pde/src/run_GNN.py", line 94, in test logits, accs = model(feat), [] File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(*input, *kwargs) File "/home/GNN/graph-neural-pde/src/GNN_early.py", line 70, in forward z = self.odeblock(x) File "/home/anaconda3/envs/myenv/lib/python3.9/site-packages/torch/nn/modules/module.py", line 1051, in _call_impl return forward_call(input, kwargs) File "/home/GNN/graph-neural-pde/src/block_transformer_attention.py", line 59, in forward state_dt = integrator( File "/home/GNN/graph-neural-pde/src/early_stop_solver.py", line 277, in call shapes, func, y0, t, rtol, atol, method, options = _check_inputs(func, y0, self.t, rtol, atol, method, options, SOLVERS) NameError: name 'SOLVERS' is not defined

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/twitter-research/graph-neural-pde/issues/5 , or unsubscribe https://github.com/notifications/unsubscribe-auth/APWNPYJFZ7H2VGBMBPJ36DTTVSGKDANCNFSM47VAODOA . https://github.com/notifications/beacon/APWNPYNNZYAAZTYEQCRS7WDTVSGKDA5CNFSM47VAODOKYY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4N524EUA.gif

aboudjelal commented 3 years ago

It's work Thank you very much Epoch: 001, Runtime 3.402973, Loss 1.945167, forward nfe 166, backward nfe 0, Train: 0.1571, Val: 0.1191, Test: 0.1046, Best time: 54.8843 Epoch: 002, Runtime 3.239350, Loss 1.778977, forward nfe 350, backward nfe 0, Train: 0.3929, Val: 0.2162, Test: 0.2051, Best time: 54.8843 Epoch: 003, Runtime 3.620812, Loss 1.478241, forward nfe 540, backward nfe 0, Train: 0.9000, Val: 0.7794, Test: 0.7797, Best time: 54.8843 Epoch: 004, Runtime 3.381886, Loss 1.134374, forward nfe 718, backward nfe 0, Train: 0.9143, Val: 0.8088, Test: 0.8061, Best time: 54.8843