Skip to content

Commit

Permalink
fix line
Browse files Browse the repository at this point in the history
  • Loading branch information
mike0sv committed Dec 5, 2024
1 parent fba10d5 commit 0330442
Showing 1 changed file with 12 additions and 10 deletions.
22 changes: 12 additions & 10 deletions src/evidently/ui/dashboards/reports.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
from evidently.ui.dashboards.utils import PlotType
from evidently.ui.dashboards.utils import _get_hover_params
from evidently.ui.dashboards.utils import _get_metric_hover
from evidently.ui.type_aliases import DataPointsAsType
from evidently.ui.type_aliases import PointInfo
from evidently.ui.type_aliases import ProjectID

Expand Down Expand Up @@ -157,16 +158,17 @@ async def build(
timestamp_start: Optional[datetime.datetime],
timestamp_end: Optional[datetime.datetime],
) -> BaseWidgetInfo:
bins_for_hists = (
await data_storage.load_points_as_type(
Union[HistogramData, Distribution], # type: ignore[arg-type]
project_id,
self.filter,
[self.value],
timestamp_start,
timestamp_end,
)
)[0]
bins_for_hists_data: DataPointsAsType[
Union[HistogramData, Distribution]
] = await data_storage.load_points_as_type(
Union[HistogramData, Distribution], # type: ignore[arg-type]
project_id,
self.filter,
[self.value],
timestamp_start,
timestamp_end,
)
bins_for_hists = bins_for_hists_data[0]
if len(bins_for_hists) == 0:
raise ValueError(f"Cannot build hist from {self.value}")
if len(bins_for_hists) > 1:
Expand Down

0 comments on commit 0330442

Please sign in to comment.