-
Notifications
You must be signed in to change notification settings - Fork 5.9k
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
[spark] Fix DefaultDatabricksRayOnSparkStartHook.on_spark_job_created #42178
[spark] Fix DefaultDatabricksRayOnSparkStartHook.on_spark_job_created #42178
Conversation
@@ -1615,11 +1615,11 @@ def ray_cluster_job_mapper(_): | |||
) | |||
job_rdd = job_rdd.withResources(resource_profile) | |||
|
|||
job_rdd.mapPartitions(ray_cluster_job_mapper).collect() | |||
|
|||
hook_entry = _create_hook_entry(is_global=(ray_temp_dir is None)) | |||
hook_entry.on_spark_job_created(spark_job_group_id) |
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.
Move this line to front of job_rdd.mapPartitions(ray_cluster_job_mapper).collect()
because this function runs inside background thread and job_rdd.mapPartitions(ray_cluster_job_mapper).collect()
will block forever until cluster or the Ray worker node is terminated.
CC @jjyao |
|
There are conflicts. |
…ray-project#42178) Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Why are these changes needed?
Fix DefaultDatabricksRayOnSparkStartHook.on_spark_job_created
Related issue number
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.