From 65ffc7d24871f742a48dc41b954edb4a7cf3e754 Mon Sep 17 00:00:00 2001 From: Ruslan Kuprieiev Date: Sat, 18 Aug 2018 05:05:00 +0300 Subject: [PATCH] metrics: use --xpath if no xpath is specified in the stage file Signed-off-by: Ruslan Kuprieiev --- dvc/project.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/dvc/project.py b/dvc/project.py index ef81d8fd1..ad2dbde98 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -576,8 +576,8 @@ class Project(object): entries = [] for o in metrics: if not typ and isinstance(o.metric, dict): - t = o.metric.get(o.PARAM_METRIC_TYPE, None) - x = o.metric.get(o.PARAM_METRIC_XPATH, None) + t = o.metric.get(o.PARAM_METRIC_TYPE, typ) + x = o.metric.get(o.PARAM_METRIC_XPATH, xpath) else: t = typ x = xpath