Missing ``class_resolver`` dependency
See original GitHub issuešµ Describe the installation problem
Recently Iām receiving the following error caused by loading a GNN layer object from PyG due to a missing dependency on class_resolver
.
File "/opt/hostedtoolcache/Python/3.8.12/x64/lib/python3.8/site-packages/torch_geometric/nn/models/basic_gnn.py", line 60, in __init__
from class_resolver.contrib.torch import activation_resolver
ModuleNotFoundError: No module named 'class_resolver'
The issue is resolved by simply installing this (pip install class_resolver
). I also notice that this requirement is included in the āfullā install requirements and will be installed automatically if I do pip install torch-geometric [full]
. However, Iām using the latest PyG on github in my github actions pip install git+https://github.com/pyg-team/pytorch_geometric.git
. Iām wondering would it be possible to pass the [full]
option to pip
in this case? I tried pip install git+https://github.com/pyg-team/pytorch_geometric.git [full]
and it did not work:
ERROR: Invalid requirement: '[full]'
Environment
- PyG version: latest (
pip install git+https://github.com/pyg-team/pytorch_geometric
) - PyTorch version: 1.9.0
- OS: ubuntu-latest
- Python version: 3.8
- CUDA/cuDNN version: CPU
- How you installed PyTorch and PyG (
conda
,pip
, source): pip - Any other relevant information (e.g., version of
torch-scatter
):
Issue Analytics
- State:
- Created 2 years ago
- Comments:5 (5 by maintainers)
Top Results From Across the Web
If a class dependency is missing, how can I determine which ...
From this answer, I learned that the class can likely be found, but not loaded, due to missing dependencies. Aside from manually decompilingĀ ......
Read more >ClassResolver (archunit 0.9.1 API) - javadoc.io
Dependency , the ClassResolver will decide how this dependency should be treated, ... ArchUnit will call this method, to resolve any missing JavaClassesĀ ......
Read more >Dependency Injection Syntax - Drupal Answers
I'm trying to build a simple module (to learn DI) to return the current user ID, and and apparently I'm missing something in...
Read more >Unable to enable Upgrade_Status even though installed via ...
... I click to enable, I get an error that it is missing dependencies. ... does not exist. in Drupal\Core\DependencyInjection\ClassResolver-Ā ...
Read more >ArchUnit User Guide
That is, ArchUnit can check dependencies between packages and classes, ... if ArchUnit fails to determine the location of a missing class from...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
Currently,
class_resolver
is used insideMLP
and basicGNN
models for resolving activation functions from PyTorch. We could consider integrating this functionality directly inside PyG to avoid the extra dependency. Otherwise, falling back topip install class-resolver
is the only workaround I am aware of.Pinging @cthoyt here as well.
This should work:
Alternatively, you can just install
class-resolver
after installing PyG: