Skip to content

Commit

Permalink
save: Fix experiments.get_exact_name usage.
Browse files Browse the repository at this point in the history
  • Loading branch information
daavoo committed Nov 21, 2022
1 parent 0fd874b commit 5ceffa5
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion dvc/commands/experiments/save.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ def run(self):
if self.args.json:
ui.write_json({"ref": ref})
else:
name = self.repo.experiments.get_exact_name(ref)
name = self.repo.experiments.get_exact_name([ref])[ref]
ui.write(f"Experiment has been saved as: {name}")
ui.write(
"\nTo promote an experiment to a Git branch run:\n\n"
Expand Down
2 changes: 1 addition & 1 deletion tests/func/experiments/test_save.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ def test_exp_save(tmp_dir, dvc, scm, exp_stage, name):
assert ref_info and ref_info.baseline_sha == baseline

exp_name = name if name else ref_info.name
assert dvc.experiments.get_exact_name(exp) == exp_name
assert dvc.experiments.get_exact_name([exp])[exp] == exp_name
assert resolve_rev(scm, exp_name) == exp


Expand Down

0 comments on commit 5ceffa5

Please sign in to comment.