From 4775ca9ca1014830f4a5b6ae68b6ba2045f2f231 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Saugat=20Pachhai=20=28=E0=A4=B8=E0=A5=8C=E0=A4=97=E0=A4=BE?= =?UTF-8?q?=E0=A4=A4=29?= Date: Wed, 12 Jul 2023 12:59:49 +0545 Subject: [PATCH] plots: log failures during datapoint conversions 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 3f36e9adc0..86eba55c3a 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 @@ 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