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: unexpected error - cannot represent an object: {'lr': 0.1} #6476

Closed
mmeendez8 opened this issue Aug 24, 2021 · 2 comments · Fixed by #6706
Closed

exp run: unexpected error - cannot represent an object: {'lr': 0.1} #6476

mmeendez8 opened this issue Aug 24, 2021 · 2 comments · Fixed by #6706
Labels
A: experiments Related to dvc exp bug Did we break something?

Comments

@mmeendez8
Copy link
Contributor

Bug Report

Description

I have updated DVC version from 2.5.4 to latest version 2.6.4.

I am running my experiments with dvc exp run. I use -S option to use different parameters between experiments. Following the get-started example I load my params.yaml in my script and update my model config programatically.

If my params.yaml is emtpy and I run dvc exp run -S optimizer.lr=0.1:

  • dvc 2.5.4: experiment runs without problems
  • dvc 2.6.4: experiment crashes returning a confusing error: ERROR: unexpected error - cannot represent an object: {'lr': 0.1}

Reproduce

  1. dvc init
  2. Copy dataset.zip to the directory
  3. dvc add dataset.zip
  4. create empty params.yaml
  5. dvc exp run -S optimizer.lr=0.1

-->

Expected

Experiment runs without returning any error.

Environment information

Output of dvc doctor:

$ dvc doctor
DVC version: 2.6.4 (pip)
---------------------------------
Platform: Python 3.8.10 on Linux-4.15.0-96-generic-x86_64-with-glibc2.10
Supports:
        gdrive (pydrive2 = 1.9.1),
        http (requests = 2.26.0),
        https (requests = 2.26.0)
Cache types: hardlink, symlink
Cache directory: ext4 on /dev/sdb1
Caches: local
Remotes: None
Workspace directory: ext4 on /dev/sdb1
Repo: dvc, git

Additional Information (if any):

I wouldn't like to have to set my params.yaml manually. This would force to replicate my config twice. Most DL frameworks have config files where model description and training hyperparameters are stored. So I would like to update those values simply using the -S flag.

@daavoo
Copy link
Contributor

daavoo commented Aug 24, 2021

It seems that the breaking change was introduced in #6378 as part of the 2.6.0 release. I will take a look and try to come back with more details.

Pd. There is an open issue about whether we should allow using -S to create new params or not. It would be nice if you could expose there your use case, which seems to rely on allowing to create new params on the fly.

@daavoo daavoo added A: experiments Related to dvc exp bug Did we break something? labels Aug 24, 2021
@mmeendez8
Copy link
Contributor Author

I see thanks! Just added my own thoughts on the matter there 👍

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 bug Did we break something?
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants