Skip to content
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

Environments (versions of packages) to run GEARS #70

Open
wcanisay-y opened this issue May 20, 2024 · 0 comments
Open

Environments (versions of packages) to run GEARS #70

wcanisay-y opened this issue May 20, 2024 · 0 comments

Comments

@wcanisay-y
Copy link

wcanisay-y commented May 20, 2024

Would you please specify the versions of the listed packages in the requirements.txt file?
I have a problem with the training function in model_tutorial.ipynb, and it seems to be a problem with the torch_geometrics package.

Start Training...

Unexpected exception formatting exception. Falling back to standard exception
Traceback (most recent call last):
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/IPython/core/interactiveshell.py", line 3553, in run_code
    exec(code_obj, self.user_global_ns, self.user_ns)
  File "/tmp/ipykernel_7637/2402802242.py", line 1, in <module>
    gears_model.train(epochs = 20, lr = 1e-3)
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/gears/gears.py", line 525, in train
    pred = self.model(batch)
           ^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1532, in _wrapped_call_impl
    return self._call_impl(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/torch/nn/modules/module.py", line 1541, in _call_impl
    return forward_call(*args, **kwargs)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/gears/model.py", line 124, in forward
    x, pert_idx = data.x, data.pert_idx
                          ^^^^^^^^^^^^^
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/torch_geometric/data/data.py", line 559, in __getattr__
    f"'edge_index' contains negative indices in "
    ^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/anaconda3/envs/scrna/lib/python3.12/site-packages/torch_geometric/data/storage.py", line 96, in __getattr__
    if key[:1] == '_':
        ^^^^^^^^^^^^^^
AttributeError: 'GlobalStorage' object has no attribute 'pert_idx'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant