-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem to run demo.py #7
Comments
This is because the directory change command run with error, you can delete this line
and try again |
I deleted that line and this is the error:
Without "conda activate GLAM" I obtain this:
(base) ***@***.***:~/projectA/GLAM/src_1gp$ python3
demo.py
Test for dataset.py and run.py!
Traceback (most recent call last):
File "./run.py", line 2, in <module>
from model import Model
File "/home/vito/projectA/GLAM/src_1gp/model.py", line 2, in <module>
from torch_geometric.nn import Set2Set
ModuleNotFoundError: No module named 'torch_geometric'
Demo running...
Please install rdkit for data processing
Traceback (most recent call last):
File "./glam.py", line 7, in <module>
from logger import config2cmd
File "/home/vito/projectA/GLAM/src_1gp/logger.py", line 3, in <module>
from metrics import auto_metrics
File "/home/vito/projectA/GLAM/src_1gp/metrics.py", line 5, in <module>
from dataset import dataset_names
File "/home/vito/projectA/GLAM/src_1gp/dataset.py", line 9, in <module>
from torch_scatter import scatter
ModuleNotFoundError: No module named 'torch_scatter'
With previous command:
conda activate GLAM
I obtain this:
(GLAM) ***@***.***:~/projectA/GLAM/src_1gp$ python3
demo.py
Test for dataset.py and run.py!
Traceback (most recent call last):
File "./run.py", line 2, in <module>
from model import Model
File "/home/vito/projectA/GLAM/src_1gp/model.py", line 2, in <module>
from torch_geometric.nn import Set2Set
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/__init__.py",
line 5, in <module>
import torch_geometric.data
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/data/__init__.py",
line 1, in <module>
from .data import Data
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/data/data.py",
line 8, in <module>
from torch_sparse import coalesce, SparseTensor
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/__init__.py",
line 40, in <module>
from .tensor import SparseTensor # noqa
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/tensor.py",
line 13, in <module>
class SparseTensor(object):
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch/jit/_script.py",
line 1128, in script
_compile_and_register_class(obj, _rcb, qualified_name)
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch/jit/_script.py",
line 138, in _compile_and_register_class
script_class = torch._C._jit_script_class_compile(qualified_name, ast,
defaults, rcb)
RuntimeError:
object has no attribute sparse_csr_tensor:
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/tensor.py",
line 511
value = torch.ones(self.nnz(), dtype=dtype,
device=self.device())
return torch.sparse_csr_tensor(rowptr, col, value, self.sizes())
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
Demo running...
Traceback (most recent call last):
File "./glam.py", line 7, in <module>
from logger import config2cmd
File "/home/vito/projectA/GLAM/src_1gp/logger.py", line 3, in <module>
from metrics import auto_metrics
File "/home/vito/projectA/GLAM/src_1gp/metrics.py", line 5, in <module>
from dataset import dataset_names
File "/home/vito/projectA/GLAM/src_1gp/dataset.py", line 10, in <module>
from torch_geometric.data import Data, InMemoryDataset
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/__init__.py",
line 5, in <module>
import torch_geometric.data
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/data/__init__.py",
line 1, in <module>
from .data import Data
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_geometric/data/data.py",
line 8, in <module>
from torch_sparse import coalesce, SparseTensor
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/__init__.py",
line 40, in <module>
from .tensor import SparseTensor # noqa
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/tensor.py",
line 13, in <module>
class SparseTensor(object):
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch/jit/_script.py",
line 1128, in script
_compile_and_register_class(obj, _rcb, qualified_name)
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch/jit/_script.py",
line 138, in _compile_and_register_class
script_class = torch._C._jit_script_class_compile(qualified_name, ast,
defaults, rcb)
RuntimeError:
object has no attribute sparse_csr_tensor:
File
"/home/vito/anaconda3/envs/GLAM/lib/python3.8/site-packages/torch_sparse/tensor.py",
line 511
value = torch.ones(self.nnz(), dtype=dtype,
device=self.device())
return torch.sparse_csr_tensor(rowptr, col, value, self.sizes())
~~~~~~~~~~~~~~~~~~~~~~~ <--- HERE
Il giorno mer 11 gen 2023 alle ore 07:09 leo ***@***.***> ha
scritto:
… Closed #7 <#7> as completed.
—
Reply to this email directly, view it on GitHub
<#7 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AUFIK5YKRFISPF74PXHRWODWRZFDNANCNFSM6AAAAAATVSI224>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
This is because your torch_sparse installed failed. |
We find a problem with the enviroment installation, this may because the problem of torch_sparse Anyway, we will give the new enviromental config later. |
Thank you for your issue up, all problems are solved! |
demo.py correctly run! (GLAM) user@user-HP-ENVY-15-Notebook-PC:~/GLAM/src_1gp$ python3 run.py --epochs 1 Is the file running correctly? |
Yes, it running correctly |
OK, I will write the dataset guide clearly, with more details |
Thank you so much for your work! |
This may be a bit tricky, but you can try this idea
|
After following all the command in the sction "Installation" I tried to run a demo with command:
"cd ./GLAM/src_1gp
python3 demo.py"
but there is this error:
(GLAM) vito@vito-HP-ENVY-15-Notebook-PC:~/project/GLAM/src_1gp$ python3 demo.py
Traceback (most recent call last):
File "demo.py", line 2, in
os.chdir(os.path.dirname(file))
FileNotFoundError: [Errno 2] No such file or directory: ''
I don't know what's wrong and how can I resolve this problem
The text was updated successfully, but these errors were encountered: