exp run: workspace status wrong

fix: #8045
This commit is contained in:
karajan1001
2022-07-26 15:02:09 +05:45
committed by skshetry
parent d0eda1d538
commit 9dfe88e2b1
2 changed files with 7 additions and 0 deletions
+4
View File
@@ -1,4 +1,5 @@
import logging
import os
from collections import defaultdict
from typing import TYPE_CHECKING, Collection, Dict, Generator, Optional
@@ -6,6 +7,7 @@ from funcy import first
from dvc.exceptions import DvcException
from ....utils.fs import remove
from ..exceptions import ExpQueueEmptyError
from ..executor.base import BaseExecutor, ExecutorResult
from ..executor.local import WorkspaceExecutor
@@ -116,6 +118,8 @@ class WorkspaceQueue(BaseStashQueue):
f"Failed to reproduce experiment '{rev[:7]}'"
) from exc
finally:
if self._EXEC_NAME == exec_name:
remove(os.path.join(self.pid_dir, exec_name))
executor.cleanup()
return results
@@ -99,6 +99,9 @@ def test_failed_exp_workspace(
tmp_dir.gen("params.yaml", "foo: 2")
with pytest.raises(ReproductionError):
dvc.experiments.run(failed_exp_stage.addressing)
assert not dvc.fs.exists(
os.path.join(dvc.experiments.workspace_queue.pid_dir, "workspace")
)
@pytest.mark.parametrize(