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

sympy error #29

Open
gg4u opened this issue Jun 24, 2023 · 0 comments
Open

sympy error #29

gg4u opened this issue Jun 24, 2023 · 0 comments

Comments

@gg4u
Copy link

gg4u commented Jun 24, 2023

Hi Maghoumi!
I report this issue, not sure if due to pytorch cuda version.
I installed it via pip, I could not get conda to find pytorch-cuda from nvidia channel, using conda version 23+.

pip install torch==2.0.0+cu118 torchvision==0.15.1+cu118 torchaudio==2.0.1 --index-url https://download.pytorch.org/whl/cu118

I import correctly the library, but:

AttributeError                            Traceback (most recent call last)
Cell In[19], line 4
      1 import sys
      2 sys.path.insert(0, "../../pytorch-softdtw-cuda")
----> 4 from soft_dtw_cuda import SoftDTW
      5 import torch

File /data0/home/h21/luas6629/Thesis/classifiers_bat_231/../../pytorch-softdtw-cuda/soft_dtw_cuda.py:25
      1 # MIT License
      2 #
      3 # Copyright (c) 2020 Mehran Maghoumi
   (...)
     21 # SOFTWARE.
     22 # ----------------------------------------------------------------------------------------------------------------------
     24 import numpy as np
---> 25 import torch
     26 import torch.cuda
     27 from numba import jit, prange

File ~/miniconda3/lib/python3.10/site-packages/torch/__init__.py:1465
   1463 from . import library
   1464 if not TYPE_CHECKING:
-> 1465     from . import _meta_registrations
   1467 # Enable CUDA Sanitizer
   1468 if 'TORCH_CUDA_SANITIZER' in os.environ:

File ~/miniconda3/lib/python3.10/site-packages/torch/_meta_registrations.py:7
      5 import torch._prims_common as utils
      6 from torch import Tensor
----> 7 from torch._decomp import _add_op_to_registry, global_decomposition_table, meta_table
      8 from torch._ops import OpOverload
      9 from torch._prims import _elementwise_meta, ELEMENTWISE_PRIM_TYPE_PROMOTION_KIND

File ~/miniconda3/lib/python3.10/site-packages/torch/_decomp/__init__.py:169
    165     return decompositions
    168 # populate the table
--> 169 import torch._decomp.decompositions
    170 import torch._refs
    172 # This list was copied from torch/_inductor/decomposition.py
    173 # excluding decompositions that results in prim ops
    174 # Resulting opset of decomposition is core aten ops

File ~/miniconda3/lib/python3.10/site-packages/torch/_decomp/decompositions.py:10
      7 from typing import Callable, cast, Iterable, List, Optional, Tuple, Union
      9 import torch
---> 10 import torch._prims as prims
     11 import torch._prims_common as utils
     12 import torch.nn.functional as F

File ~/miniconda3/lib/python3.10/site-packages/torch/_prims/__init__.py:33
     17 from torch._prims_common import (
     18     check,
     19     Dim,
   (...)
     30     type_to_dtype,
     31 )
     32 from torch._prims_common.wrappers import backwards_not_supported
---> 33 from torch._subclasses.fake_tensor import FakeTensor, FakeTensorMode
     34 from torch.overrides import handle_torch_function, has_torch_function
     35 from torch.utils._pytree import tree_flatten, tree_map, tree_unflatten

File ~/miniconda3/lib/python3.10/site-packages/torch/_subclasses/__init__.py:3
      1 import torch
----> 3 from torch._subclasses.fake_tensor import (
      4     DynamicOutputShapeException,
      5     FakeTensor,
      6     FakeTensorMode,
      7     UnsupportedFakeTensorException,
      8 )
     10 from torch._subclasses.fake_utils import CrossRefFakeMode
     12 __all__ = [
     13     "FakeTensor",
     14     "FakeTensorMode",
   (...)
     17     "CrossRefFakeMode",
     18 ]

File ~/miniconda3/lib/python3.10/site-packages/torch/_subclasses/fake_tensor.py:13
     10 from weakref import ReferenceType
     12 import torch
---> 13 from torch._guards import Source
     14 from torch._ops import OpOverload
     15 from torch._prims_common import (
     16     elementwise_dtypes,
     17     ELEMENTWISE_TYPE_PROMOTION_KIND,
     18     is_float_dtype,
     19     is_integer_dtype,
     20 )

File ~/miniconda3/lib/python3.10/site-packages/torch/_guards.py:78
     74 class GuardBuilderBase:
     75     pass
---> 78 class ShapeGuard(NamedTuple):
     79     expr: sympy.Expr
     80     stack: str

File ~/miniconda3/lib/python3.10/site-packages/torch/_guards.py:79, in ShapeGuard()
     78 class ShapeGuard(NamedTuple):
---> 79     expr: sympy.Expr
     80     stack: str

AttributeError: module 'sympy' has no attribute 'Expr'

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