NVIDIA / spark-rapids-tools

User tools for Spark RAPIDS
Apache License 2.0
50 stars 37 forks source link

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

Closed cindyyuanjiang closed 4 months ago

cindyyuanjiang commented 4 months ago

Fixes https://github.com/NVIDIA/spark-rapids-tools/issues/1051

Changes

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!
cindyyuanjiang commented 4 months ago
  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.