-
Notifications
You must be signed in to change notification settings - Fork 7
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
Make workers inherit package environment by default, fix tests #17
Conversation
I think in principle this should also include compatibility changes for Julia > 1.9? |
Could you split this up into two separate PRs? One PR to fix tests and CI, and a second PR for the Pkg environments? |
Hmmm, also, I did some testing, and for me, the package environment is already getting propagated to the workers by default. Do you have a MWE that demonstrates otherwise? |
Thanks for checking in on this -- I do not know how to fix the CI issues (seemed to have failed instantly). I will see if I can construct a smaller MWE but as written, the test suite in this PR should fail without the code changes in the rest of the PR as the It should also print out just If you have a script
and call it with something like
It should fail on the assertion in |
Okay, so I don't think all of the changes in this PR are strictly necessary. Julia is already propagating all environment variables from the "manager process" to So we only need to propagate Can you try #19 and see if it fixes your MWE? On a separate note, we should probably avoid ever calling |
Extracted from kleinhenz#17. Co-authored-by: jbphyswx <jbenjami@caltech.edu>
Ok I will check later this evening (though a quick check seemed to work right now!). I originally just copied those 3 ( The warning at Distributed.jl/src/managers.jl Line484 reads:
But I don't have a test for changing If I understand correctly what you're saying:
But would we still not need this logic in case |
Ah, I see, so upstream Distributed.jl wants to handle the case where a user has mutated Hmmm. I'm not sure how common that use case is, but it is probably fine for us to propagate the mutated depot and load paths to the workers. I do wonder what the use case here is. For the project, it makes sense that we need to pass along the correct
Both of those cases seem pretty common, and thus we have to cover them. The depot and load paths case seem less common - I would expect that users would probably just set the relevant environment variables before they start Julia. It might be fine for us to still cover those use cases though. I'll think a little bit more about it. |
CI is now green on |
Extracted from kleinhenz#17. Co-authored-by: jbphyswx <jbenjami@caltech.edu>
Awesome thanks so much for pushing this forward! One of the test changes I made was changing Everything else was around testing inheritance on the workers -- it might still be good to do some form of that, though I admit what I'd constructed may be overkill. |
In an ideal world, I think we would have the tests work correctly on both CI and when running locally. How about we keep the hostname-specific tests on CI, but skip them when running locally? I've implemented that here: #29 |
I'm working on breaking your PR up into smaller pieces. There are also some workarounds that need to be add I've added you as The first piece is here: #20 It just adds the support for Hopefully that should make it easier to review the smaller individual PRs. |
Sounds good! Thanks for adding me to the commits but no worries about credit -- I'm just happy the package is moving forward. The PRs look good to me! Thanks for working out the compatibility requirements too -- I've been pretty busy so I hadn't yet tracked down exactly what the constraints should be. |
Extracted from kleinhenz#17. Co-authored-by: jbphyswx <jbenjami@caltech.edu>
Fixes #16.
Solution adapted from https://github.com/JuliaLang/julia/pull/43270/files
There may be things I left out or other enhancements I should have included but this seems like a good first step.
Also the tests weren't working correctly for me, so I updated them -- I'm not sure if all the problems I encountered were on my machine or generally true across slurm. See the new tests.
I also added some tests of the inheritance framework in
test/test_inheritance
(SlurmClusterManagers
is a dependency there since we don't usewithenv
for that test).