From 43e7fec5d34eaca3a89e3eea1f16a6622fc81948 Mon Sep 17 00:00:00 2001 From: "Mr. Outis" Date: Sat, 24 Nov 2018 11:57:19 -0600 Subject: [PATCH] skip verification if file doesn not exist --- dvc/output/local.py | 3 +++ dvc/project.py | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/dvc/output/local.py b/dvc/output/local.py index ddf6973d3..d52bbaea5 100644 --- a/dvc/output/local.py +++ b/dvc/output/local.py @@ -72,6 +72,9 @@ class OutputLOCAL(DependencyLOCAL): if not self.metric: return + if not os.path.exists(self.path): + return + if os.path.isdir(self.path): msg = 'Directory \'{}\' cannot be used as metrics.' raise DvcException(msg.format(self.rel_path)) diff --git a/dvc/project.py b/dvc/project.py index a93a8abbf..5763bc2c7 100644 --- a/dvc/project.py +++ b/dvc/project.py @@ -1023,9 +1023,6 @@ class Project(object): self._metrics_modify(path, typ, xpath) def metrics_add(self, path, typ=None, xpath=None): - if not os.path.exists(path): - raise DvcException('File does not exist'.format(path)) - if not typ: typ = 'raw' self._metrics_modify(path, typ, xpath)