mirror of
https://github.com/Stone-Red-Code/dvc.git
synced 2026-11-10 07:18:27 +01:00
@@ -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(
|
||||
|
||||
Reference in New Issue
Block a user