Git Product home page Git Product logo

lmtool-fwp's Issues

cannot run example with python 3.10 and pytorch1.11 in a virtual environment

I cannot run the provided example. The code depends on a very old version of pytorch (1.4), I had to install 1.11, and tried to run it inside a python virtual environment. This however seems to be preventing the import of the jit compiled module, and I get instead these errors:

     Loading extension module fast_weight_forward... 
Traceback (most recent call last):
  File "<...redacted>/lmtool-fwp/src/train.py", line 18, in <module>
    from model_main import MemTransformerLM
  File "<...redacted>/lmtool-fwp/src/model_main.py", line 19, in <module>
    from utils.cuda_fast_weight_layer import CudaFastWeightLinearTransformerLayer
  File "<...redacted>/lmtool-fwp/src/utils/cuda_fast_weight_layer.py", line 9, in <module>
    from utils.fast_fast_weight import fast_weight_delta
  File "<...redacted>/lmtool-fwp/src/utils/fast_fast_weight/__init__.py", line 17, in <module>
    mod_causal_dot_product_cuda = load(
  File "<...redacted>/lmtool-fwp/env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1144, in load
    return _jit_compile(
  File "<...redacted>/lmtool-fwp/env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1382, in _jit_compile
    return _import_module_from_library(name, build_directory, is_python_module)
  File "<...redacted>/lmtool-fwp/env/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1776, in _import_module_from_library
    assert isinstance(spec.loader, importlib.abc.Loader)
AttributeError: module 'importlib' has no attribute 'abc'. Did you mean: '_abc'?

Do you have any insight on how to proceed?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.