diff --git a/dvc/utils/serialize/_yaml.py b/dvc/utils/serialize/_yaml.py index 6de2ae4ade..85cee9dbb0 100644 --- a/dvc/utils/serialize/_yaml.py +++ b/dvc/utils/serialize/_yaml.py @@ -1,4 +1,5 @@ import io +import sys from collections import OrderedDict from contextlib import contextmanager from typing import Any, TextIO @@ -46,6 +47,8 @@ def _get_yaml(): from ruamel.yaml import YAML yaml = YAML() + # prevent strings from wrapping for a proper round-trip + yaml.width = sys.maxsize yaml.default_flow_style = False # tell Dumper to represent OrderedDict as normal dict