MilesCranmer / symbolic_deep_learning

Code for "Discovering Symbolic Models from Deep Learning with Inductive Biases"

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

PyTorch and torch_sparse versions do not match.

subditosdeChantal opened this issue · comments

Hello again Miles,

Running your demo as it is has the following issues,

First it takes a lot of time in building wheels for torch-sparse, torch-scatter and torch geometric. I don't know if this is normal, but at the end it finishes, most of the times.

The problem is then when the code imports models.py, this is the error:

---------------------------------------------------------------------------

RuntimeError                              Traceback (most recent call last)

<ipython-input-11-406efe1c43e4> in <module>()
      1 import simulate
----> 2 import models

4 frames

/content/models.py in <module>()
      4 from torch.functional import F
      5 from torch.optim import Adam
----> 6 from torch_geometric.nn import MetaLayer, MessagePassing
      7 from torch.nn import Sequential as Seq, Linear as Lin, ReLU, Softplus
      8 from torch.autograd import Variable, grad

/usr/local/lib/python3.7/dist-packages/torch_geometric/__init__.py in <module>()
      3 
      4 from .debug import is_debug_enabled, debug, set_debug
----> 5 import torch_geometric.data
      6 import torch_geometric.transforms
      7 import torch_geometric.utils

/usr/local/lib/python3.7/dist-packages/torch_geometric/data/__init__.py in <module>()
----> 1 from .data import Data
      2 from .temporal import TemporalData
      3 from .batch import Batch
      4 from .dataset import Dataset
      5 from .in_memory_dataset import InMemoryDataset

/usr/local/lib/python3.7/dist-packages/torch_geometric/data/data.py in <module>()
      6 import torch
      7 import torch_geometric
----> 8 from torch_sparse import coalesce, SparseTensor
      9 from torch_geometric.utils import (contains_isolated_nodes,
     10                                    contains_self_loops, is_undirected)

/usr/local/lib/python3.7/dist-packages/torch_sparse/__init__.py in <module>()
     28     if t_major != major:
     29         raise RuntimeError(
---> 30             f'Detected that PyTorch and torch_sparse were compiled with '
     31             f'different CUDA versions. PyTorch has CUDA version '
     32             f'{t_major}.{t_minor} and torch_sparse has CUDA version '

RuntimeError: Detected that PyTorch and torch_sparse were compiled with different CUDA versions. PyTorch has CUDA version 10.1 and torch_sparse has CUDA version 11.0. Please reinstall the torch_sparse that matches your PyTorch install.

I've tried playing with the versions to see if I could fix it but no luck.

Thanks,

Thanks for catching this, I probably would not have noticed. colab periodically updates their CUDA and torch versions; I'll try to change the notebook so it detects the CUDA and downloads the right version.

Cheers,
Miles

Should be fixed now on master branch.