-
Notifications
You must be signed in to change notification settings - Fork 394
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
Document that yaml files are expected to be in YAML v1.2 #1704
Comments
Interesting. Is there a changelog or better doc that explains the main differences between <1.2 and >=1.2 ?
Can you explain this a little further? Where are these directives explained, what YAML files? Example? Thanks |
You can check the list of differences here: https://yaml.readthedocs.io/en/latest/pyyaml.html#defaulting-to-yaml-1-2-support
1 and 2 should not be a problem if DVC dumped them, but if it's hand-written and DVC never overwrote them, there might be an issue. You have to use yaml version directive to force versions: % YAML 1.1 |
Sounds like we should focus on adding notes about this specific feature in docs, where needed. We can also specify
OK. But again, can you explain this? What is a version directive? Where is it documented? How is it a workaround and workaround for what? Etc. Thanks |
@jorgeorpinel, the most popular library in python is
You just have to start your YAML document with: % YAML 1.1
--- |
OK. About "YAML" directives, there are still open questions @skshetry . Again, can you explain this a little further please? We can't document something that isn't fully understood. How is it a workaround and workaround for what? Who would add them and to which files? Examples? Thanks! |
After this
pendingPR iterative/dvc#4415, all YAML files will be expected to be in YAML1.2.Unless they were hand-written, it should not break anyone's workflow.

The workaround will be to add YAML version directive to the top of the file (though on
dvc metrics/params
with--revs
, they might see wrong values or values of wrong types because of the git history involved but should be very rare).The text was updated successfully, but these errors were encountered: