Skip to content

Commit

Permalink
add test_fingerprint to test widget (#1386)
Browse files Browse the repository at this point in the history
* add test_fingerprint to  test widget

---------

Co-authored-by: DimaAmega <[email protected]>
  • Loading branch information
mike0sv and DimaAmega authored Dec 18, 2024
1 parent 9817cc1 commit 88259ab
Show file tree
Hide file tree
Showing 13 changed files with 21 additions and 14 deletions.
2 changes: 1 addition & 1 deletion src/evidently/nbextension/static/index.js

Large diffs are not rendered by default.

2 changes: 2 additions & 0 deletions src/evidently/renderers/base_renderer.py
Original file line number Diff line number Diff line change
Expand Up @@ -74,6 +74,7 @@ class DetailsInfo:
class TestHtmlInfo:
name: str
description: str
test_fingerprint: str
status: str
details: List[DetailsInfo]
groups: Dict[str, str]
Expand All @@ -98,6 +99,7 @@ def render_html(self, obj: TTest) -> TestHtmlInfo:
return TestHtmlInfo(
name=result.name,
description=self.html_description(obj),
test_fingerprint=obj.get_fingerprint(),
status=result.status.value,
details=[],
groups=obj.get_groups(),
Expand Down
4 changes: 3 additions & 1 deletion src/evidently/test_suite/test_suite.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from evidently.model.widget import set_source_fingerprint
from evidently.options.base import AnyOptions
from evidently.pipeline.column_mapping import ColumnMapping
from evidently.renderers.base_renderer import TestHtmlInfo
from evidently.renderers.base_renderer import TestRenderer
from evidently.renderers.base_renderer import WidgetIdGenerator
from evidently.renderers.base_renderer import replace_test_widget_ids
Expand Down Expand Up @@ -212,7 +213,7 @@ def as_dict( # type: ignore[override]
return result

def _build_dashboard_info(self):
test_results = []
test_results: List[TestHtmlInfo] = []
total_tests = len(self._inner_suite.context.test_results)
by_status = {}
color_options = self.options.color_options
Expand Down Expand Up @@ -249,6 +250,7 @@ def _build_dashboard_info(self):
dict(
title=test_info.name,
description=test_info.description,
test_fingerprint=test_info.test_fingerprint,
state=test_info.status.lower(),
details=dict(
parts=[dict(id=item.id, title=item.title, type="widget") for item in test_info.details]
Expand Down
2 changes: 1 addition & 1 deletion src/evidently/ui/assets/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
content="Evidently - ML Monitoring Demo. Hosted example to monitor the performance of a demand forecasting model on a toy dataset."
/>
<title>Evidently - ML Monitoring Demo</title>
<script type="module" crossorigin src="/static/js/index-Bk_zDyHx.js"></script>
<script type="module" crossorigin src="/static/js/index-D-BBKVDE.js"></script>
<link rel="modulepreload" crossorigin href="/static/js/vendor-C2GWNUp2.js">
<link rel="stylesheet" crossorigin href="/static/css/index-CJbKDbyR.css">
</head>
Expand Down

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Large diffs are not rendered by default.

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit 88259ab

Please sign in to comment.