Repository navigation
Enable conda runtime creation in workers on windows - #23613
Conversation
There was a problem hiding this comment.
moving the logging to before the command so that the message will be emitted even if the command fails.
There was a problem hiding this comment.
Thanks for catching this! I think the command wasn't being printed at all before, right? Because it was after the exec?
As I saw when manually running the test, it's kind of spammy now unfortunately since it's printed once for each worker. On the other hand, this info is really useful for debugging. @rkooo567 do you know how to make this log appear in the log files, but not be streamed to the driver? We could change it to log.debug, but then the user has to set RAY_BACKEND_LOG_LEVEL=debug before starting the cluster for the logs to appear in the file, right?
There was a problem hiding this comment.
Maybe this should be in a separate PR if it is causing unsolvable problems.
|
This looks reasonable, I'm not super familiar how the site mechanism works in Python so I think it would be helpful to have a review from @simon-mo. @simon-mo would you mind taking a look? Also @mattip, do you know if the Windows tests are currently being run with the ray/python/ray/_private/runtime_env/conda.py Lines 119 to 125 in 77c4c1e |
|
@architkulkarni or @mattip would you mind testing manually on linux/macos for this flag? If it works then this change LGTM |
|
I will check that The windows run of the enabled test is getting an error |
Sounds good, I'll check locally that the flag works on Mac and reply here if it works or not. |
|
On windows, the |
|
Hmm. Stuck between a rock and a hard place. Enabling |
I see... so the options are
You said 1 isn't working because the second build fails. I think 2 should work though. I think the reason it isn't working is because we have I think we just need to edit one of the parts linked above so that |
On master, But on this PR, I get the following traceback: traceback
After this, if I try to do |
This is confusing. The PR (and the tests) should only be modifying the runtime environment in |
e998727 to
757120f
Compare
Reverting the |
Fixed for me as well! |
|
The linkcheck failure is fixed on HEAD. It seems the CI does not merge with master before running. |
03b93ec to
2cbd04c
Compare
|
rebased and unset RAY_RUNTIME_ENV_LOCAL_DEV_MODE where required to pass tests |
|
Did I break all those non-windows test runs? |
Looks like it's unrelated: https://flaky-tests.ray.io/ |
6efe0e5 to
c111c1e
Compare
|
When I run the tests via bazel [0] the 01Edit: this belongs to PR #23867 |
c111c1e to
b201e52
Compare
|
Apparently the use of RAY_RUNTIME_ENV_LOCAL_DEV_MODE=1 causes many tests to fail on windows. |
|
@architkulkarni using RAY_RUNTIME_ENV_LOCAL_DEV_MODE=1 is causing problems in many places:
The problem is that mode turns on Lines 390 to 391 in 52eaf02 |
@mattip Interesting that things work after Would it be simpler to try option 1 from #23613 (comment)? As long as the wheel is present in the right place on the CI machine, the tests should work just as they do for Mac/Linux. |
|
I'm not sure what happened: it looks like CI ran again and now everything is passing? |
|
Note that this has a fix for the agent ID, but the fix in #24968 is deeper and better. It would be nice to get that merged, then rebase this on top of it. |
9b5bf49 to
57bf108
Compare
| --test_env=RAY_CI_POST_WHEEL_TESTS="1" \ | ||
| --test_env=USERPROFILE="${USERPROFILE}" \ | ||
| --test_env=CI=1 \ | ||
| --test_env=RAY_CI_POST_WHEEL_TESTS=1 \ |
There was a problem hiding this comment.
This seems to have solved a problem where the quoted USERPROFILE value somehow blocked setting CI=1 and RAY_CI_POST_WHEEL_TESTS=1
There was a problem hiding this comment.
Interesting, not sure what's going on there but glad it worked!
|
Rebased on top of #24968, CI on windows is passing and I do not think the other failures are related. |
| # For runtime_env tests, wheels are needed | ||
| cd "${WORKSPACE_DIR}" | ||
| keep_alive pip wheel -e python -w .whl | ||
| ) |
There was a problem hiding this comment.
Out of curiosity, how does this affect the CI running time? Will it just add some minutes at the beginning of the 6/6 buildkite Windows jobs, or something else?
There was a problem hiding this comment.
Ah thanks a lot for the link! That sounds fine to me, since the full job is ~120 minutes.
| if time.monotonic() - start > 30: | ||
| raise RuntimeError("Failed to terminate Ray") | ||
| # Allow windows to close processes before moving on | ||
| time.sleep(3) |
There was a problem hiding this comment.
Nit: Should this be wrapped in an if statement so that it only happens on Windows? Also, I wondered if this would slow things down excessively, but it looks like there are already some sleep statements above this line to account for Ray taking a few seconds to terminate. Since this is just adding a few seconds more I think it's fine.
architkulkarni
left a comment
There was a problem hiding this comment.
This looks good! Let me check the failures against the flaky test tracker.
|
|
The only outstanding failure is "C++, Java and Libraries", still confirming that this is flaky on master. It seems unrelated |
|
Confirmed that "C++, Java and Libraries" failure is unrelated (it was broken on master), @simon-mo could you please merge this when you get a chance? |
|
No, this PR should wait until a replacement for #24968 is merged. |
|
@architkulkarni the revert was reverted, this PR should be OK now. |
|
Great! In that case @simon-mo could you please merge this when you get a chance? Sorry for the back and forth |
Why are these changes needed?
Continuation of #22449
Fix the way a conda environment is created for a local worker to reuse the ray installation. The base problem was that
site.getsitepackages()[0]did not return the site-packages library on windows. So I changed the call to use the more acceptedsysconfig.get_paths()['purelib'].Along the way, I also made the test pass when using a
pip install -e .which does not actually install ray into the site-packages directory, but uses a shim.Related issue number
Checks
scripts/format.shto lint the changes in this PR.