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] Make top candidates view as the default view in user-tools #879

Merged
merged 3 commits into from
Mar 27, 2024

Conversation

amahussein
Copy link
Collaborator

Signed-off-by: Ahmed Hussein (amahussein) a@ahussein.me

Fixes #868

  • Use Top-candidate view as default for user-tools qualification
  • Revisit the spark_rapids CLI to verify that resetting the filter based on user-input does not override the default flag argument
  • Fix unit-tests

Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>

Fixes NVIDIA#868

- Use Top-candidate view as default for user-tools qualification
- Revisit the spark_rapids CLI to verify that resetting the filter based
  on user-input does not override the default flag argument
- Fix unit-tests
@amahussein amahussein added feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python) labels Mar 26, 2024
@amahussein amahussein self-assigned this Mar 26, 2024
Copy link
Collaborator

@parthosa parthosa left a comment

Choose a reason for hiding this comment

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

Currently the qualification.yaml also contains an entry for default value of filter apps as SAVINGS. It seems to be used at a single place only. Probably we should remove it or it can cause consistency issues.

Additionally, this seems more of a general bug, in method __process_filter_args() we validate the selected filter as

try:
selected_filter = QualFilterApp.fromstring(arg_val)
except:

However, fromstring() does not throw an Exception. It will return None if the key does not exist. This can cause the weird selection of filter app and we do not display the warning message as well.

Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>
Signed-off-by: Ahmed Hussein (amahussein) <a@ahussein.me>
@amahussein
Copy link
Collaborator Author

Currently the qualification.yaml also contains an entry for default value of filter apps as SAVINGS. It seems to be used at a single place only. Probably we should remove it or it can cause consistency issues.

Additionally, this seems more of a general bug, in method __process_filter_args() we validate the selected filter as

try:
selected_filter = QualFilterApp.fromstring(arg_val)
except:

However, fromstring() does not throw an Exception. It will return None if the key does not exist. This can cause the weird selection of filter app and we do not display the warning message as well.

Good catch.
I saw that when I did the estimation_model but apparently I forgot about it. Thanks for the reminder.

Copy link
Collaborator

@parthosa parthosa left a comment

Choose a reason for hiding this comment

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

Thanks @amahussein. Created a tracking issue #887 to handle fromstring() for invalid enums

@@ -102,7 +105,7 @@ def qualification(cpu_cluster: str = None,
if cpu_cluster is None:
raise RuntimeError('OnPrem\'s cluster property file required to calculate'
'savings for ' + target_platform + ' platform')
filter_apps: str = QualFilterApp.tostring(QualFilterApp.SAVINGS)
# filter_apps: str = QualFilterApp.tostring(QualFilterApp.SAVINGS)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Nit: remove commented code.

Copy link
Collaborator

@cindyyuanjiang cindyyuanjiang left a comment

Choose a reason for hiding this comment

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

Thanks @amahussein!

@amahussein amahussein merged commit 76eace4 into NVIDIA:dev Mar 27, 2024
15 checks passed
@amahussein amahussein deleted the spark-rapids-tools-868 branch March 27, 2024 13:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python)
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEA] Make top candidates view as the default view in user tools
4 participants