Git Product home page Git Product logo

Comments (12)

HuangXingBo avatar HuangXingBo commented on June 19, 2024 1

Hi @ljeub-pometry , do you plan to take use of pemja in Raphtory?

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

@ljeub-pometry Thanks for your usage. We don't have step 3 such use cases before, I will try your case to see where the problem is.

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

@ljeub-pometry I have figured out the cause of the error. The reason is that the PythonInterperter you use in the main thread will hold the GIL of Python during the calling process. When the calling process has not finished, you try to call to create a new PythonInterperter. During the creation process, will go to lock GIL, which leads to deadlock.

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

I'll do some experimenting and see how to meet this need

from pemja.

ljeub-pometry avatar ljeub-pometry commented on June 19, 2024

Thank you for looking into it. Ideally, this situation shouldn't require more than one python thread at all, i.e., when calling a jvm method, it probably should release the GIL while python is waiting for the result, such that the interpreter is free to execute the step 3 callback above.

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

@ljeub-pometry Yes. You are right. Before calling Java Function, we need to release GIL just like numpy do. I will fix this issue asap.

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

I have created PR #15 to fix it

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

I have merged the fix into master branch and release-0.2 branch

from pemja.

ljeub-pometry avatar ljeub-pometry commented on June 19, 2024

Thank you for the quick fix! I just tested it and this does indeed fixes the deadlock!

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

@ljeub-pometry Thanks for your verification.

from pemja.

ljeub-pometry avatar ljeub-pometry commented on June 19, 2024

We are still in the early stages of adding python support to Raphtory but it does look like pemja is the most viable option for executing python code in the backend in terms of performance.

from pemja.

HuangXingBo avatar HuangXingBo commented on June 19, 2024

Ok. If you have any needs and ideas for pemja, welcome to exchange. According to the plan, in the next version, pemja will provide support on numpy and windows

from pemja.

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.