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
6 changes: 3 additions & 3 deletions dvc/exceptions.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,9 +157,9 @@ class InitError(DvcException):


class ReproductionError(DvcException):
def __init__(self, dvc_file_name):
self.path = dvc_file_name
super().__init__(f"failed to reproduce '{dvc_file_name}'")
def __init__(self, name):
self.name = name
super().__init__(f"failed to reproduce '{name}'")


class BadMetricError(DvcException):
Expand Down
2 changes: 1 addition & 1 deletion dvc/repo/reproduce.py
Original file line number Diff line number Diff line change
Expand Up @@ -218,7 +218,7 @@ def _reproduce_stages(
except CheckpointKilledError:
raise
except Exception as exc:
raise ReproductionError(stage.relpath) from exc
raise ReproductionError(stage.addressing) from exc

if on_unchanged is not None:
on_unchanged(unchanged)
Expand Down
2 changes: 1 addition & 1 deletion tests/func/experiments/test_experiments.py
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@ def test_failed_exp(tmp_dir, scm, dvc, exp_stage, mocker, caplog):

mocker.patch(
"concurrent.futures.Future.exception",
return_value=ReproductionError(exp_stage.relpath),
return_value=ReproductionError(exp_stage.addressing),
)
with caplog.at_level(logging.ERROR):
dvc.experiments.run(exp_stage.addressing, tmp_dir=True)
Expand Down