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

Handle missing pricing info for user qual tool on Databricks platforms #1053

Merged
merged 1 commit into from
May 31, 2024

Conversation

cindyyuanjiang
Copy link
Collaborator

@cindyyuanjiang cindyyuanjiang commented May 31, 2024

Fixes #1051

Changes

  • Add try catch block to handle case when tool cannot find pricing info for instance types for Databricks platforms

Testing
Running the following command with cluster properties files which contain instance types that do not have pricing info in tools:

spark_rapids qualification--eventlogs <my_event_logs> --cluster <my_cluster_properties_file>

Databricks AWS

Before this PR
2024-05-30 16:02:55,269 ERROR root: Qualification. Raised an error in phase [Collecting-Results]
Traceback (most recent call last):
...
  File "~/spark-rapids-tools/user_tools/src/spark_rapids_pytools/pricing/databricks_pricing.py", line 88, in get_instance_price
    instance_dbu = instance_conf.get('DBU')
AttributeError: 'NoneType' object has no attribute 'get'
After this PR
2024-05-30 16:56:51,448 ERROR rapids.tools.qualification: Error computing cost savings. Reason - RuntimeError: Could not find pricing info for instance type 'm7gd.8xlarge'. Skipping!

Databricks Azure

Before this PR
2024-05-30 18:06:15,339 ERROR rapids.tools.price.Databricks-Azure: Could not find price for instance type 'Standard_D4s_v3': 'NoneType' object has no attribute 'get'
2024-05-30 18:06:15,339 ERROR root: Qualification. Raised an error in phase [Collecting-Results]
Traceback (most recent call last):
...
  File "~/spark-rapids-tools/user_tools/src/spark_rapids_pytools/pricing/databricks_azure_pricing.py", line 79, in get_instance_price
    rate_per_hour = instance_conf.get('TotalPricePerHour')
AttributeError: 'NoneType' object has no attribute 'get'
After this PR
2024-05-30 18:07:47,401 ERROR rapids.tools.qualification: Error computing cost savings. Reason - RuntimeError: Could not find pricing info for instance type 'Standard_D4s_v3'. Skipping!

Signed-off-by: cindyyuanjiang <cindyj@nvidia.com>
@cindyyuanjiang cindyyuanjiang added feature request New feature or request user_tools Scope the wrapper module running CSP, QualX, and reports (python) labels May 31, 2024
@cindyyuanjiang cindyyuanjiang self-assigned this May 31, 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.

Thanks @cindyyuanjiang. LGTM. This should also handle the case when our cached EMR/EC2 catalog does not have the instance type.

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 @cindyyuanjiang !
I have a couple of QQs:

  1. what happens when we have multiple apps?
  2. How does the final output look like? What I am asking about whether the user will see cost-savings columns with empty values, or they see the output formatted for speedup-only format.

@cindyyuanjiang
Copy link
Collaborator Author

  1. what happens when we have multiple apps?
  2. How does the final output look like? What I am asking about whether the user will see cost-savings columns with empty values, or they see the output formatted for speedup-only format.

Thanks @amahussein!

  1. Multiple apps has the same behavior as single app. They run successfully by skipping the cost savings computation.
  2. For the final output, users will only see output formatted for speedup-only and no cost-savings columns if there pricing info is missing.

Copy link
Collaborator

@nartal1 nartal1 left a comment

Choose a reason for hiding this comment

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

Thanks @cindyyuanjiang !

@amahussein amahussein merged commit 6d42817 into NVIDIA:dev May 31, 2024
16 checks passed
@cindyyuanjiang cindyyuanjiang deleted the spark-rapids-tools-1051 branch May 31, 2024 20:56
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.

Skip cost savings if pricing info is missing for Databricks qual tool
4 participants