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

Report Update - Add timestamps, multi-plot selection and selection filtering #507

Merged
merged 5 commits into from
Nov 21, 2023
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
4 changes: 2 additions & 2 deletions cyclops/report/model_card/fields.py
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,9 @@ class MetricCard(
description="The trend of the metric over time.",
)

plot: Optional[GraphicsCollection] = Field(
timestamps: Optional[List[StrictStr]] = Field(
None,
description="A plot of the performance over time.",
description="Timestamps for each point in the history.",
)


Expand Down
9 changes: 7 additions & 2 deletions cyclops/report/report.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,12 @@
_raise_if_not_dict_with_str_keys,
create_metric_cards,
empty,
get_histories,
get_names,
get_passed,
get_plots,
get_slices,
get_thresholds,
get_timestamps,
get_trends,
regex_replace,
regex_search,
Expand Down Expand Up @@ -1089,8 +1090,10 @@
# write to file
if synthetic_timestamp is not None:
today = synthetic_timestamp
today_now = synthetic_timestamp

Check warning on line 1093 in cyclops/report/report.py

View check run for this annotation

Codecov / codecov/patch

cyclops/report/report.py#L1093

Added line #L1093 was not covered by tests
else:
today = dt_date.today().strftime("%Y-%m-%d")
today_now = dt_datetime.now().strftime("%Y-%m-%d %H:%M:%S")

Check warning on line 1096 in cyclops/report/report.py

View check run for this annotation

Codecov / codecov/patch

cyclops/report/report.py#L1096

Added line #L1096 was not covered by tests

current_report_metrics: List[List[PerformanceMetric]] = []
sweep_metrics(self._model_card, current_report_metrics)
Expand Down Expand Up @@ -1121,6 +1124,7 @@
# compare tests
metrics, tooltips, slices, values, metric_cards = create_metric_cards(
current_report_metrics_set,
today_now,
latest_report_metric_cards_set,
)
self._log_metric_card_collection(
Expand All @@ -1138,11 +1142,12 @@
"sweep_tests": sweep_tests,
"sweep_graphics": sweep_graphics,
"get_slices": get_slices,
"get_plots": get_plots,
"get_thresholds": get_thresholds,
"get_trends": get_trends,
"get_passed": get_passed,
"get_names": get_names,
"get_histories": get_histories,
"get_timestamps": get_timestamps,
}
template.globals.update(func_dict)

Expand Down
Loading
Loading