workbench 0.8.231__py3-none-any.whl → 0.8.234__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,5 +1,7 @@
1
1
  """Markdown Utility/helper methods"""
2
2
 
3
+ import math
4
+
3
5
  from workbench.utils.symbols import health_icons
4
6
 
5
7
 
@@ -229,7 +231,9 @@ def df_to_html_table(df, round_digits: int = 2, margin_bottom: int = 30) -> str:
229
231
  for val in row:
230
232
  # Format value: integers without decimal, floats rounded
231
233
  if isinstance(val, float):
232
- if val == int(val):
234
+ if math.isnan(val):
235
+ formatted_val = "NaN"
236
+ elif val == int(val):
233
237
  formatted_val = int(val)
234
238
  else:
235
239
  formatted_val = round(val, round_digits)
@@ -3,7 +3,7 @@
3
3
  from typing import Union
4
4
 
5
5
  # Dash Imports
6
- from dash import html, callback, dcc, Input, Output, State
6
+ from dash import html, callback, dcc, no_update, Input, Output, State
7
7
 
8
8
  # Workbench Imports
9
9
  from workbench.api import ModelType, ParameterStore
@@ -71,7 +71,9 @@ class ModelDetails(PluginInterface):
71
71
 
72
72
  Args:
73
73
  model (CachedModel): An instantiated CachedModel object
74
- **kwargs: Additional keyword arguments (unused)
74
+ **kwargs: Additional keyword arguments
75
+ - inference_run: Current inference run selection (to preserve user's choice)
76
+ - previous_model_name: Name of the previously selected model
75
77
 
76
78
  Returns:
77
79
  list: A list of the updated property values for the plugin
@@ -85,10 +87,21 @@ class ModelDetails(PluginInterface):
85
87
 
86
88
  # Populate the inference runs dropdown
87
89
  inference_runs, default_run = self.get_inference_runs()
88
- metrics = self.inference_metrics(default_run)
89
90
 
90
- # Return the updated property values for the plugin
91
- return [header, details, inference_runs, default_run, metrics]
91
+ # Check if the model changed
92
+ previous_model_name = kwargs.get("previous_model_name")
93
+ current_inference_run = kwargs.get("inference_run")
94
+ model_changed = previous_model_name != model.name
95
+
96
+ # Only preserve the inference run if the model hasn't changed AND the selection is valid
97
+ if not model_changed and current_inference_run and current_inference_run in inference_runs:
98
+ # Same model, preserve the user's selection - use no_update for dropdown value
99
+ metrics = self.inference_metrics(current_inference_run)
100
+ return [header, details, inference_runs, no_update, metrics]
101
+ else:
102
+ # New model or invalid selection - use default
103
+ metrics = self.inference_metrics(default_run)
104
+ return [header, details, inference_runs, default_run, metrics]
92
105
 
93
106
  def register_internal_callbacks(self):
94
107
  @callback(
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: workbench
3
- Version: 0.8.231
3
+ Version: 0.8.234
4
4
  Summary: Workbench: A Dashboard and Python API for creating and deploying AWS SageMaker Model Pipelines
5
5
  Author-email: SuperCowPowers LLC <support@supercowpowers.com>
6
6
  License: MIT License
@@ -231,7 +231,7 @@ workbench/utils/json_utils.py,sha256=FSxzcD88TbIEJDw0FHue5-ZGny94wm5NeLs4zYlLLpU
231
231
  workbench/utils/lambda_utils.py,sha256=7GhGRPyXn9o-toWb9HBGSnI8-DhK9YRkwhCSk_mNKMI,1893
232
232
  workbench/utils/license_manager.py,sha256=lNE9zZIglmX3zqqCKBdN1xqTgHCEZgJDxavF6pdG7fc,6825
233
233
  workbench/utils/log_utils.py,sha256=7n1NJXO_jUX82e6LWAQug6oPo3wiPDBYsqk9gsYab_A,3167
234
- workbench/utils/markdown_utils.py,sha256=gOIkeHietL09dz4zB10E0V8E69SavIZhAAv27bFCwL4,10266
234
+ workbench/utils/markdown_utils.py,sha256=0sGG71hci_vQaamfQjHj8vttj90WOzlSYZwwAAbRatY,10359
235
235
  workbench/utils/meta_model_simulator.py,sha256=fMKZoLi_VEJohNVvbZSMvZWNdUbIpGlB6Bg6mJQW33s,20630
236
236
  workbench/utils/metrics_utils.py,sha256=iAoKrAM4iRX8wFSjSJhfNKbbW1BqB3eI_U3wvdhUdhE,9496
237
237
  workbench/utils/model_utils.py,sha256=ApUg3EclAIEzzGr7i1zwJsO-OV1NUqjOMV6Fd9lWlno,19261
@@ -290,7 +290,7 @@ workbench/web_interface/components/plugins/endpoint_details.py,sha256=0A7g_Lx5-3
290
290
  workbench/web_interface/components/plugins/generated_compounds.py,sha256=A6JGlkl7buZUugPK21YgufVFDRoGlHJowaqf8PAmz_s,8056
291
291
  workbench/web_interface/components/plugins/graph_plot.py,sha256=JFzuSH_CkEmlaLAgFpzmiEpS3sXov0ycnCfP0VLsK2g,14502
292
292
  workbench/web_interface/components/plugins/license_details.py,sha256=UyMSBGxEgdp3m9szDkDUAl_Ua8C5a4RNMdYpYCx354M,5497
293
- workbench/web_interface/components/plugins/model_details.py,sha256=Mb33be3jky4a6DxhTHQhkBw9jLrn7IhQ2zBbMaaxYcI,9102
293
+ workbench/web_interface/components/plugins/model_details.py,sha256=vBGg7_KHCJv69g-RrXcFQsmMpO7ULufGav1zz0Jb2fI,9944
294
294
  workbench/web_interface/components/plugins/molecule_panel.py,sha256=xGCEI5af8F5lNId5eKUpetdQs_ahnIPdW6U7wKvbz2o,3515
295
295
  workbench/web_interface/components/plugins/molecule_viewer.py,sha256=xavixcu4RNzh6Nj_-3-XlK09DgpNx5jGmo3wEPNftiE,4529
296
296
  workbench/web_interface/components/plugins/pipeline_details.py,sha256=caiFIakHk-1dGGNW7wlio2X7iAm2_tCNbSjDzoRWGEk,5534
@@ -304,9 +304,9 @@ workbench/web_interface/page_views/main_page.py,sha256=DyChwOGX_KtbJ09pw2Iswofba
304
304
  workbench/web_interface/page_views/models_page_view.py,sha256=M0bdC7bAzLyIaE2jviY12FF4abdMFZmg6sFuOY_LaGI,2650
305
305
  workbench/web_interface/page_views/page_view.py,sha256=Gh6YnpOGlUejx-bHZAf5pzqoQ1H1R0OSwOpGhOBO06w,455
306
306
  workbench/web_interface/page_views/pipelines_page_view.py,sha256=v2pxrIbsHBcYiblfius3JK766NZ7ciD2yPx0t3E5IJo,2656
307
- workbench-0.8.231.dist-info/licenses/LICENSE,sha256=RTBoTMeEwTgEhS-n8vgQ-VUo5qig0PWVd8xFPKU6Lck,1080
308
- workbench-0.8.231.dist-info/METADATA,sha256=IR5-3ZuLUOimQQq4lm2hF7dNGNBMkG7GF5EMTBGpo4g,10033
309
- workbench-0.8.231.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
310
- workbench-0.8.231.dist-info/entry_points.txt,sha256=t_9tY7iYku9z96qFZZtUgbWDh_nHtehXxLPLBSpAzeM,566
311
- workbench-0.8.231.dist-info/top_level.txt,sha256=Dhy72zTxaA_o_yRkPZx5zw-fwumnjGaeGf0hBN3jc_w,10
312
- workbench-0.8.231.dist-info/RECORD,,
307
+ workbench-0.8.234.dist-info/licenses/LICENSE,sha256=RTBoTMeEwTgEhS-n8vgQ-VUo5qig0PWVd8xFPKU6Lck,1080
308
+ workbench-0.8.234.dist-info/METADATA,sha256=GL5xEn6UylhTPU6KjGrCT-ea9bL3Epr0L2WLZjtNUkI,10033
309
+ workbench-0.8.234.dist-info/WHEEL,sha256=qELbo2s1Yzl39ZmrAibXA2jjPLUYfnVhUNTlyF1rq0Y,92
310
+ workbench-0.8.234.dist-info/entry_points.txt,sha256=t_9tY7iYku9z96qFZZtUgbWDh_nHtehXxLPLBSpAzeM,566
311
+ workbench-0.8.234.dist-info/top_level.txt,sha256=Dhy72zTxaA_o_yRkPZx5zw-fwumnjGaeGf0hBN3jc_w,10
312
+ workbench-0.8.234.dist-info/RECORD,,