-
Notifications
You must be signed in to change notification settings - Fork 37
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
Fix core tool doc links and user qualification tool default argument values #931
Fix core tool doc links and user qualification tool default argument values #931
Conversation
Signed-off-by: cindyyuanjiang <[email protected]>
Signed-off-by: cindyyuanjiang <[email protected]>
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.
Thanks @cindyyuanjiang
I am not sure we need to set the default value in every wrapper class. The code internally process the arguments because we might need to reset the default argument depending on the status of the execution.
That's why all the default values for estimation_model was set to None.
P.S: The spark_rapids_user_tools
is going to be deprecated.
filter_apps: str = QualFilterApp.tostring(QualFilterApp.get_default()), | ||
estimation_model: str = QualEstimationModel.tostring(QualEstimationModel.get_default()), |
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.
Handling the default is done in the ArgProcessor class because there is some logic that is required to calculate the default.
That's why it is set to None in the CLI to be able to distinguish between whether the user left the argument empty or did he actually set the value intentionally.
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.
Thanks @amahussein! I will update this.
Signed-off-by: cindyyuanjiang <[email protected]>
Signed-off-by: cindyyuanjiang <[email protected]>
Thanks @amahussein! I removed the default values for The original thought for adding the default values is that when users run |
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.
Thanks @cindyyuanjiang !
The filter_apps better stay None
so that we handle the default value in one place .
@@ -40,7 +40,7 @@ def qualification(self, | |||
platform: str = None, | |||
target_platform: str = None, | |||
output_folder: str = None, | |||
filter_apps: str = None, | |||
filter_apps: str = QualFilterApp.tostring(QualFilterApp.get_default()), |
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.
Same issue with filter_apps
argument.
The filter_apps aregument has some complicated logic to get the default. It depends on the value of other arguments.
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.
Thanks @amahussein! Updated this.
Signed-off-by: cindyyuanjiang <[email protected]>
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.
Thanks @cindyyuanjiang. LGTM
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.
Thanks @cindyyuanjiang
LGTME
Fixes #929
Changes