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

add test_fingerprint to test widget #1386

Merged
merged 6 commits into from
Dec 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading