fbpic
PyCall.jl
fbpic | PyCall.jl | |
---|---|---|
2 | 28 | |
165 | 1,438 | |
-0.6% | 0.3% | |
8.1 | 6.1 | |
8 days ago | about 2 months ago | |
Python | Julia | |
GNU General Public License v3.0 or later | MIT License |
Stars - the number of stars that a project has on GitHub. Growth - month over month growth in stars.
Activity is a relative number indicating how actively a project is being developed. Recent commits have higher weight than older ones.
For example, an activity of 9.0 indicates that a project is amongst the top 10% of the most actively developed projects that we are tracking.
fbpic
-
Numba: A High Performance Python Compiler
When I wrote my bachelor thesis years back I worked on a particle-in-cell code [1] that makes heavy use of numba for GPU kernels. At the time it was the most convenient way to do that from python. I remember spending weeks to optimizing these kernels to eek out every last bit of performance I could (which interestingly enough did eventually involve using atomic operations and introducing a lot of variables[2] instead of using arrays everywhere to keep things in registers instead of slower caches).
I remember the team being really responsive to feature requests back then and I had a lot of fun working with it. IIRC compared to using numpy we managed to get speedups of up to 60x for the most critical pieces of code.
[1]: https://github.com/fbpic/fbpic
-
Faster Python calculations with Numba: 2 lines of code, 13× speed-up
We used numba to accelerate the code and most importantly write GPU kernels for the heavy parts. I remember spending hours optimising my code to eek out the most performance possible (which eventually meant using atomics and manually unrolling many loops because somehow this was giving us the best performance) but honestly I was really happy that I didn't need to write cuda kernels in C and generally it was pretty easy to work with. I remember back then the documentation was sometimes a little rough around the edges but the numba team was incredibly helpful and responsive. Overall I had a great time.
[0] https://github.com/fbpic/fbpic
PyCall.jl
-
I just started into Julia for ML
For point 3 you can use https://github.com/cjdoris/PythonCall.jl or https://github.com/JuliaPy/PyCall.jl (and their respective Python sister packages).
- The Mojo Programming Language: A Python Superset Drawing from Rust's Strengths
-
Calling Chapel, Carbon, and zig code in Julia
PyCall.jl is really handy. Are there any similar projects for calling Chapel code, or Carbon/zig?
-
Am I dumb in thinking I can use Rust as a Fast Python and leave it at that?
Julia and Python interop should not be a problem at all. Actually Julia has one of the best interops I’ve ever seen, so much that swift copied it. https://github.com/JuliaPy/PyCall.jl
- Which tools do you use for python + Data Science?
-
I don't want to abandon Rust for Julia
One small note, julia also has great python interop via PyCall.jl
- Faster Python calculations with Numba: 2 lines of code, 13× speed-up
-
Interoperability in Julia
It is possible to call Python from Julia using PyCall. Then to install PyCall, run the command in the Julia REPL.
-
Why is Python so used in the machine learning?
That said, you can run python modules in Julia. So you can just export your code as a module and then use it in Julia via the PyCall package. short description here github here <— you’d just add the pacakge via the really nice package manager built into julia, but for link for more detailed documentation
- Use rust code in Python with pyo3
What are some alternatives?
WarpX - WarpX is an advanced, time-based electromagnetic & electrostatic Particle-In-Cell code.
py2many - Transpiler of Python to many other languages
simsopt - Simons Stellarator Optimizer Code
Revise.jl - Automatically update function definitions in a running Julia session
pure_numba_alias_sampling - Pure numba version of Alias sampling algorithm from L. Devroye's, "Non-Uniform Random Random Variate Generation"
julia - The Julia Programming Language
autograd - Efficiently computes derivatives of numpy code.
Genie.jl - 🧞The highly productive Julia web framework
ndarray_comparison - Benchmark of toy calculation on an n-dimensional array using python, numba, cython, pythran and rust
are-we-fast-yet - Are We Fast Yet? Comparing Language Implementations with Objects, Closures, and Arrays
rust-numpy - PyO3-based Rust bindings of the NumPy C-API
fast-ruby - :dash: Writing Fast Ruby :heart_eyes: -- Collect Common Ruby idioms.