-
Notifications
You must be signed in to change notification settings - Fork 840
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
use conf to get num cores per executor #404
Conversation
Pass! — The build has succeeded. (ff4244df) MMLSpark 0.14.dev10+1.gff4244dfThis is a build for Github PR #404, changes:
|
ff4244d
to
bb2e606
Compare
@imatiach-msft I think we also need to include "spark.task.cpus" which is the number of cores to allocate for each task. "spark.executor.cores"/"spark.task.cpus" is the number of tasks in one executor. |
bb2e606
to
3d05363
Compare
@ywskycn done! I used spark.executer.cores/spark.task.cpus. It looks like task cpus is usually default to 1 anyway (or not defined, as on my databricks cluster). Hopefully this will handle all cluster scenarios (other than possibly the spark standalone cluster with different # of cores per executor, which I haven't encountered yet from users). |
LGTM |
Pass! — The build has succeeded. (3d053637) MMLSpark 0.14.dev13+1.gbb2e6065This is a build for Github PR #404, changes:
|
ed8d13e
to
58a2027
Compare
Pass! — The build has succeeded. (58a2027c) MMLSpark 0.14.dev13+1.g3d053637This is a build for Github PR #404, changes:
|
Pass! — The build has succeeded. (58a2027c) MMLSpark 0.14.dev13+1.g58a2027cThis is a build for Github PR #404, changes:
|
We should use a combination of spark conf and number of cores per machine via java.lang.Runtime.getRuntime.availableProcessors to figure out the number of cores per executor.
Fixed based on discussion here: #379
Thank to @humbinal for figuring out how to fix the issue.
Also should resolve the issue brought by @ywskycn here: #346
Note: This may be eventually resolved in a better way with spark's barrier execution mode when it is implemented aka project hydrogen (without needing to compute num cores):
https://jira.apache.org/jira/browse/SPARK-24374