-
Notifications
You must be signed in to change notification settings - Fork 228
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Overhaul RMG-RMS Python-Julia dependencies & Add tests for many testless Arkane network algorithms #2640
Conversation
36734da
to
56640a9
Compare
It doesn't seem that this can be removed by this PR. From here, it sees that is used to avoid compilation overhead |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #2640 +/- ##
==========================================
+ Coverage 54.88% 55.45% +0.57%
==========================================
Files 125 125
Lines 37025 37057 +32
==========================================
+ Hits 20321 20551 +230
+ Misses 16704 16506 -198 ☔ View full report in Codecov by Sentry. |
All tests have passed 🥳🥳🥳 @mjohnson541 Could you review before I clean up the commits? @JacksonBurns Let's work out a plan on the merge sequence with your other PRs |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Heroic effort!
Sorry, about the missing pdep algorithm tests, that's my bad.
I have a few questions about how these changes work, but it looks pretty good.
path_rms = dirname(dirname(dirname(abspath(__file__)))) | ||
from julia.api import Julia | ||
|
||
jl = Julia(sysimage=join(path_rms, "rms.so")) if exists(join(path_rms, "rms.so")) else Julia(compiled_modules=False) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Are we breaking workflows for people that use system images to avoid compilation?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Also curious about this
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do you mean by using a (global) Julia binary instead of the one come with the conda environment?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like this tool: https://github.com/MichaelHatherly/SystemImageLoader.jl allows adding of system images to juliaup.
This implies we could imagine later using some of these new tools like: https://julialang.github.io/PackageCompiler.jl/dev/index.html to generate a system image with RMS already precompiled and use the other tool to add it to juliaup during installation. The caveat being if you ever want to modify RMS you have to remove that image. However, the process doesn't look particularly difficult anymore. PackageCompiler looks pretty straightforward. Not as sure about the other package.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think any of us is using this function, and I have also never used this. I don't think we should get ahead of ourselves to provide a service that maybe no one will use. I prefer to wait till someone complains about not having this option anymore, or just let them figure it out rather than doing their work for them.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
+1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're a wizard! Thanks for taking this on. A number of small-ish comments throughout.
Overall comment - I did a quick search all for python-jl
and found nothing, so I think you totally caught them all (thanks!).
95ad95c
to
a8b42d1
Compare
@JacksonBurns @mjohnson541 I've addressed most of the comments and have a couple of clarifying questions |
Co-authored-by: Jackson Burns <33505528+JacksonBurns@users.noreply.github.com>
@mjohnson541 @JacksonBurns I have addressed all the comments. Please review/approve. Thanks. |
@hwpang I'm revisiting this following some of the discussion in #2684 - I realize now that using the conda binary for juliaup might not be the best idea and that we would be better off using their official installation instructions. I say this because there are already reports on the juliaup conda feedstock that it is installing packages in the incorrect conda environment: conda-forge/juliaup-feedstock#62 The official juliaup installation instructions say to use a shell script (https://github.com/JuliaLang/juliaup?tab=readme-ov-file#mac-and-linux) and provide a GitHub actions step for our CI (https://github.com/JuliaLang/juliaup?tab=readme-ov-file#continuous-integration-ci) - your thoughts? |
I just tested setting JULIAUP_DEPOT_PATH to a path inside the env before telling juliaup to install julia, without setting it it installs .julia etc in the default location for julia (not ideal for conda), with it defined it installs it where I told it to, so we probably need to set that to a path we choose inside the conda environment. |
no longer needed thanks to ReactionMechanismGenerator/RMG-Py#2640
Development moved to #2687 |
Motivation or Problem
PythonCall.jl
,CondaPkg.jl
, andPythonPlot.jl
supersedePyCall.jl
,Conda.jl
, andPyPlot.jl
packages. The latter have caused many troubles during RMS installation.Some key differences between
PythonCall
andPyCall
PythonCall
has a compatibleJuliaCall
package that provide symmetric interface going from Julia to Python and Python to JuliaPythonCall
by default never copies mutable objects when converting, but instead directly wraps the mutable object. This means that modifying the converted object modifies the original, and conversion is faster" (See here)I put together a RMG-RMS twin PR at ReactionMechanismGenerator/ReactionMechanismSimulator.jl#256 to switch to use
PythonCall.jl
,CondaPkg.jl
, andPythonPlot.jl
from their old versionsPyCall.jl
,Conda.jl
, andPyPlot.jl
.This PR makes necessary changes on the RMG end to keep the RMG-RMS compatibility.
Moreover, during working on this, I found that many new network algorithms in Arkane are not tested. I have added additional tests for them.
Description of Changes
Some major changes include
pyjuliacall
instead ofpyjulia
to call Julia modules from Python.juliaup
to install Julia instead of using thejulia
binary from conda-forge. I have found that user the latter can cause many issues on the RMG end as it doesn't check package depedencies appropriately.juliaup
is Julia's official version manager.pyrms
anddiffeqpy
. We usediffeqpy
to getCVODE_BDF
andsolve
but that is unnecessary. Now we getCVODE_BDF
from Sundials andsolve
fromSciMLBase
. This helps RMG to reduce package dependencies even more.Testing
A clear and concise description of testing that you've done or plan to do.
Reviewer Tips
Suggestions for verifying that this PR works or other notes for the reviewer.