Skip to content
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

[FEA] Profiler autotuner should only specify standard Spark versions for shuffle manager setting #662

Merged
merged 5 commits into from
Dec 28, 2023

Conversation

kuhushukla
Copy link
Collaborator

Fixes #599
Draft : needs test which is WIP. I also wonder if it is ok to have the platform check as I have here at the moment. I know it is yet another thing user must pass correctly so I am testing a version which does not need it and we infer that we are not on Databricks.

@kuhushukla kuhushukla added the feature request New feature or request label Nov 16, 2023
@kuhushukla kuhushukla self-assigned this Nov 16, 2023
@parthosa parthosa added the core_tools Scope the core module (scala) label Nov 17, 2023
…for shuffle manager setting

Signed-off-by: Kuhu Shukla <[email protected]>
@kuhushukla kuhushukla marked this pull request as ready for review December 26, 2023 20:33
@kuhushukla
Copy link
Collaborator Author

Added test, addressed comment and taking it out of draft. Will tag reviewers when build is green.

@kuhushukla kuhushukla requested review from parthosa and amahussein and removed request for parthosa and amahussein December 26, 2023 21:30
Signed-off-by: Kuhu Shukla <[email protected]>
Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @kuhushukla for the changes. I have some few questions

Comment on lines 607 to 611
val finalShuffleVersion : String = if (platform.getName == PlatformNames.DATABRICKS_AWS
|| platform.getName == PlatformNames.DATABRICKS_AZURE) {
val dbVersion = appInfoProvider.getProperty(
"spark.databricks.clusterUsageTags.sparkVersion").getOrElse("")
dbVersion match {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For the if-condition, I would think that we should not rely on the platform input.
Instead we look for a property that distinguished eventlogs generated on Databricks.
For example,

  • if this configuration spark.databricks.clusterUsageTags.sparkVersion is always set for all Databricks executions, then all we need to do is to check that this config entry is not emptyt
  • If the above is not always true, then we can use pattern match of SparkVersion pulled from the app configuration indicates it is a databricks-spark

Deciding the platform from the configuration is going to be a good step toward improving the analysis. We are going to need that anyway.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, I sort of alluded to that when I first put the PR up. I like trying out option#1 above. Will update.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Addressed

dbVersion match {
case ver if ver.contains("10.4") => "321db"
case ver if ver.contains("11.3") => "330db"
case _ => "332db"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is a good start. We can have this list hardcoded for this PR.
However moving forward, it is going to maintain the code everytime a new DB class is added.

Perhaps later we can create a static properties file to map between db and plugin versions? At least we won't need to change scala code for that. Also, we can automate a script whenever a new class is added in the plugin repo. WDYT?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Completely agree. This needs to be maintained some place. Do we have examples of static properties files elsewhere at the moment? If not, we can start with this property. Automating is more interesting as adding a new class may not be a complete indicator that we need a new config key, DB in particular might fit that use case.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I started the seed to this infrastructure in the existing PR #705 (loadPropertiesFile)
My plan is to build on that by adding trait configurable that will load the the properties file from a static file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should I address the change here as part of this PR or are we good with this for now?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for this PR.

case ver if ver.contains("11.3") => "330db"
case _ => "332db"
}
} else shuffleManagerVersion
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

it would be more readable

} else {
  shuffleManagerVersion
}

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

addressed

@kuhushukla
Copy link
Collaborator Author

@amahussein I have revised the PR to address all but one (the properties file) change. Please take another look. Thank u!

Copy link
Collaborator

@amahussein amahussein left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM!
Thanks @kuhushukla for making the changes!

dbVersion match {
case ver if ver.contains("10.4") => "321db"
case ver if ver.contains("11.3") => "330db"
case _ => "332db"
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is good for this PR.

@kuhushukla kuhushukla merged commit 42a0fa5 into NVIDIA:dev Dec 28, 2023
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
core_tools Scope the core module (scala) feature request New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Profiler autotuner should only specify standard Spark versions for shuffle manager setting
3 participants