From 4c8f539c56ada2ad708decfcfae47c625c090212 Mon Sep 17 00:00:00 2001 From: skshetry <18718008+skshetry@users.noreply.github.com> Date: Wed, 12 Jul 2023 19:14:31 +0545 Subject: [PATCH] plots: log failures during datapoint conversions (#9726) Fixes #9441. Note that we do merge props, and use that for all revision. So you may see warning for multiple revisions. --- dvc/render/match.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/dvc/render/match.py b/dvc/render/match.py index 3f36e9adc..86eba55c3 100644 --- a/dvc/render/match.py +++ b/dvc/render/match.py @@ -1,3 +1,4 @@ +import logging import os from collections import defaultdict from typing import TYPE_CHECKING, DefaultDict, Dict, List, NamedTuple, Optional @@ -17,6 +18,7 @@ if TYPE_CHECKING: dpath.options.ALLOW_EMPTY_STRING_KEYS = True +logger = logging.getLogger(__name__) def _squash_plots_properties(data: List) -> Dict: @@ -113,6 +115,7 @@ def match_defs_renderers( # noqa: C901, PLR0912 try: dps, rev_props = converter.flat_datapoints(rev) except Exception as e: # noqa: BLE001, pylint: disable=broad-except + logger.warning("In %r, %s", rev, str(e).lower()) def_errors[rev] = e continue