Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

exp run: --set-param adds new parameters to the params file #6282

Closed
iesahin opened this issue Jul 5, 2021 · 1 comment
Closed

exp run: --set-param adds new parameters to the params file #6282

iesahin opened this issue Jul 5, 2021 · 1 comment
Labels
A: experiments Related to dvc exp

Comments

@iesahin
Copy link

iesahin commented Jul 5, 2021

Bug Report

Description

When I add an non-existent parameter after -S, it is added to params.yaml and the pipeline is run. This leads to unexpected results.

Reproduce

git clone https://github.com/iterative/example-get-started
cd example-get-started
dvc pull
virtualenv .venv
. .venv/bin/activate
pip install -r src/requirements.txt
dvc exp run -S feature.n_grams=3
git diff params.yaml

The experiment is run as normal and params.yaml has a new parameter:

diff --git a/params.yaml b/params.yaml
index e5a636f..aed2663 100644
--- a/params.yaml
+++ b/params.yaml
@@ -6,6 +6,7 @@ featurize:
   max_features: 3000
   ngrams: 2
 
+  n_grams: 3
 train:
   seed: 20170428
   n_est: 100
(END)

Note the typo in the parameter name.

The user thinks that they have changed a parameter, and no error is reported.

Expected

I'd expect parameters' existence are checked before making any modifications. So the line with

dvc exp run -S train.n_grams=3

should report that train.n_grams is not a valid parameter.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.4.3 (pip)
---------------------------------
Platform: Python 3.8.10 on Linux-5.8.0-59-generic-x86_64-with-glibc2.29
Supports: All remotes
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/nvme0n1p2
Caches: local
Remotes: https
Workspace directory: ext4 on /dev/nvme0n1p2
Repo: dvc, git
@iesahin iesahin added the A: experiments Related to dvc exp label Jul 5, 2021
@iesahin
Copy link
Author

iesahin commented Jul 5, 2021

Seems a duplicate of #5477

@iesahin iesahin closed this as completed Jul 5, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A: experiments Related to dvc exp
Projects
None yet
Development

No branches or pull requests

1 participant