Comments (12)
Hi @ljeub-pometry , do you plan to take use of pemja
in Raphtory
?
from pemja.
@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.
@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.
I'll do some experimenting and see how to meet this need
from pemja.
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.
@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.
I have created PR #15 to fix it
from pemja.
I have merged the fix into master
branch and release-0.2
branch
from pemja.
Thank you for the quick fix! I just tested it and this does indeed fixes the deadlock!
from pemja.
@ljeub-pometry Thanks for your verification.
from pemja.
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.
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)
- Please create an offiical Conda install package HOT 5
- Comparison vs DL4J / java-cpp HOT 3
- Incompatible with Official Python Docker Images: Failed to find libpython HOT 1
- Unknown Number class int. HOT 3
- Generic invokeMethod HOT 1
- Issue with Thread mode in Flink 1.16 and M1 HOT 1
- MainInterpreter implements Serializable but has non-serializable fields
- Can not import 'findClass' HOT 3
- Failed to find the function after exec HOT 1
- Can't install with python 3.10 HOT 3
- How to return a python numpy array to the Java side? The return type is java.util.List HOT 2
- Will you try to integrate Codon? HOT 1
- Is there a way to trigger a call from Python? HOT 1
- Failed to use pemja in Flink DataStream API
- Support Python 3.11 HOT 2
- 0.4.0 release has missing pom from maven central HOT 1
- Can pemja support JVM scheduling through PVM?
- Build pemja for arm64
- For developers, what tools can be used to develop multi-language projects like "pemja" on Mac?
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from pemja.