Code Monkey home page Code Monkey logo

Comments (2)

pilcru avatar pilcru commented on September 14, 2024

Hi @solub,

Thank you for trying the plugin! Numba is only half compatible with GHPythonRemote, you can import modules that use numba but cannot import numba and call jit on IronPyton code.

While it's possible to use numba on the CPython side of the connection, it's not possible to cross the interface and use it on functions defined on the IronPython side. The problem is that numba needs to access the bytecode of the function to be JITed, and GHPythonRemote does not know how to transfer that. I don't even know of a way to access that information on IronPython like on CPython (I initially tried to transfer the function to the CPython side with a utility from RPyC, but that's trying to access function properties that are not defined in the IronPython implementation).

So the best you can do is code everything that needs to use numba in a separate CPython module, and add this module to the list of modules to import through GHPythonRemote. The module needs to be importable by your CPython installation (rhinoremote virtual environment, probably), that is be in its python path. I find the easiest way to achieve that is to create a package with a simple setup.py file, and use an editable install: pip install -e . (run this from the folder containing the setup.py file, with rhinoremote activated).

There is an example project layout with a simple setup.py here.

from ghpythonremote.

co-ord avatar co-ord commented on September 14, 2024

Thank you so much for the kind reply and the comprehensive explanation. This is very helpful.

from ghpythonremote.

Related Issues (20)

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.