Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions dvc/repo/experiments/executor/manager/local.py
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ def exec_queue(
rev=rev,
infofile=infofile,
log_level=logger.getEffectiveLevel(),
log_errors=not isinstance(executor, WorkspaceExecutor),
)
if not exec_result.exp_hash:
raise DvcException(
Expand Down
13 changes: 13 additions & 0 deletions tests/func/experiments/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from dvc.exceptions import DvcException
from dvc.repo.experiments.utils import exp_refs_by_rev
from dvc.scm import resolve_rev
from dvc.stage.exceptions import StageFileDoesNotExistError
from dvc.utils.serialize import PythonFileCorruptedError
from tests.func.test_repro_multistage import COPY_SCRIPT

Expand Down Expand Up @@ -704,3 +705,15 @@ def test_experiment_name_invalid(tmp_dir, scm, dvc, exp_stage, mocker):
params=["foo=3"],
)
new_mock.assert_not_called()


def test_experiments_workspace_not_log_exception(caplog, dvc, scm):
"""Experiments run in workspace should not log exception.

Instead it should just leave it to be handled in the main entrypoints.
"""
with caplog.at_level(logging.ERROR):
with pytest.raises(StageFileDoesNotExistError):
dvc.experiments.run()

assert not caplog.text