-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Hydra composition writes scientific float without decimal point which is parsed by YAML as str #8466
Comments
Hi @aschuh-hf ! Thanks for the detailed report. This is kind of expected. DVC requires YAML 1.2 (https://dvc.org/doc/command-reference/params#description) and I believe you are using If you change the code to use dvc.api.params_show (or any other library supporting YAML 1.2) it should fix the error:
The above code uses ruaml.yaml internally. Closing the issue as "won't fix", as it is expected behavior, but don't hesitate to comment |
I think it's a duplicate of #5971. @aschuh-hf If you want to comment, it might have more visibility there. |
Thanks, indeed this is a duplicate. I would just add that I've installed DVC from the official YUM repo, and thus would expect that DVC has thus been packaged with an incompatible YAML version? In my own code, I am using
|
@aschuh-hf The problem is that |
But when I install DVC from YUM repo, does it not use its own virtual environment / libraries in |
OK, I think I understand now. The conclusion is that the |
Bug Report
Description
When using the Hydra Composition, float numbers in the input config files in scientific format, e.g.,
1.0e-5
are written to the generatedparams.yaml
file as1e-5
. The latter is parsed as astr
instead of afloat
. The decimal point is required.Reproduce
conf/config.yaml
test.py
dvc.yaml
Generated
params.yaml
:Expected
Environment information
Output of
dvc doctor
:Additional Information (if any):
The text was updated successfully, but these errors were encountered: