Skip to content

added pip install mpmath==1.3.0 to fix issue with quantized modules #9

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

Merged
merged 2 commits into from
Feb 26, 2024

Conversation

bakhtiarZ
Copy link
Contributor

The traceback started from importing the quantized modules. I don't think its an issue with Mase but one with other libraries.

Here is a github issue I found about it, NVIDIA/TensorRT-LLM#1145 --> YanWenKun/ComfyUI-Docker#20

@bakhtiarZ bakhtiarZ changed the title added pip install mpmath==1.3.0 to fix issue of attribute rational mi… added pip install mpmath==1.3.0 to fix issue with quantized modules Feb 26, 2024
Co-authored-by: Jianyi Cheng <[email protected]>
@bakhtiarZ
Copy link
Contributor Author

An example traceback with mpmath version 1.4.0 is below:

Traceback (most recent call last):
  File "/workspace/machop/mase_components/resblock/test/timing_test_resblock.py", line 21, in <module>
    from chop.passes.graph.transforms.quantize.quantized_modules import Conv2dInteger, LinearInteger, ReLUInteger
  File "/workspace/machop/chop/__init__.py", line 1, in <module>
    from .tools.logger import root_logger
  File "/workspace/machop/chop/tools/__init__.py", line 11, in <module>
    from .get_input import get_cf_args, get_dummy_input
  File "/workspace/machop/chop/tools/get_input.py", line 3, in <module>
    from ..models.utils import ModelSource
  File "/workspace/machop/chop/models/__init__.py", line 6, in <module>
    from .patched import (
  File "/workspace/machop/chop/models/patched/__init__.py", line 2, in <module>
    from .opt_patched import (
  File "/workspace/machop/chop/models/patched/opt_patched/__init__.py", line 3, in <module>
    from .modeling_opt_patched import (
  File "/workspace/machop/chop/models/patched/opt_patched/modeling_opt_patched.py", line 19, in <module>
    import torch.utils.checkpoint
  File "/usr/local/lib/python3.11/dist-packages/torch/utils/checkpoint.py", line 23, in <module>
    from torch._functorch._aot_autograd.functional_utils import is_fun
  File "/usr/local/lib/python3.11/dist-packages/torch/_functorch/_aot_autograd/functional_utils.py", line 13, in <module>
    from torch.fx.experimental.symbolic_shapes import definitely_true, sym_eq
  File "/usr/local/lib/python3.11/dist-packages/torch/fx/experimental/symbolic_shapes.py", line 52, in <module>
    from torch.utils._sympy.functions import FloorDiv, Mod, IsNonOverlappingAndDenseIndicator
  File "/usr/local/lib/python3.11/dist-packages/torch/utils/_sympy/functions.py", line 1, in <module>
    import sympy
  File "/usr/local/lib/python3.11/dist-packages/sympy/__init__.py", line 30, in <module>
    from sympy.core.cache import lazy_function
  File "/usr/local/lib/python3.11/dist-packages/sympy/core/__init__.py", line 9, in <module>
    from .expr import Expr, AtomicExpr, UnevaluatedExpr
  File "/usr/local/lib/python3.11/dist-packages/sympy/core/expr.py", line 4159, in <module>
    from .mul import Mul
  File "/usr/local/lib/python3.11/dist-packages/sympy/core/mul.py", line 2193, in <module>
    from .numbers import Rational
  File "/usr/local/lib/python3.11/dist-packages/sympy/core/numbers.py", line 4567, in <module>
    _sympy_converter[type(mpmath.rational.mpq(1, 2))] = sympify_mpmath_mpq
                          ^^^^^^^^^^^^^^^
AttributeError: module 'mpmath' has no attribute 'rational'

@jianyicheng jianyicheng merged commit 6010bb8 into DeepWok:main Feb 26, 2024
q10 added a commit to q10/FBGEMM that referenced this pull request Feb 26, 2024
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095
q10 added a commit to q10/FBGEMM that referenced this pull request Feb 26, 2024
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095
q10 added a commit to q10/FBGEMM that referenced this pull request Feb 26, 2024
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095
q10 added a commit to q10/FBGEMM that referenced this pull request Feb 26, 2024
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095
q10 added a commit to q10/FBGEMM that referenced this pull request Feb 26, 2024
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095
facebook-github-bot pushed a commit to pytorch/FBGEMM that referenced this pull request Feb 26, 2024
Summary:
- Fix mpmath dependency to allow tests to pass again; see

DeepWok/mase-docker#9
nod-ai/SHARK-Studio#2095

Pull Request resolved: #2356

Reviewed By: spcyppt

Differential Revision: D54212358

Pulled By: q10

fbshipit-source-id: dfdf842069462a34514f78aee00cdb4a300392ce
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

Successfully merging this pull request may close these issues.

2 participants