ultralytics 8.0.31 updates and fixes (#857)
Co-authored-by: Yonghye Kwon <developer.0hye@gmail.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com> Co-authored-by: Kalen Michael <kalenmike@gmail.com>
This commit is contained in:
parent
2e7a533ac3
commit
f5d003d05a
9 changed files with 285 additions and 131 deletions
|
|
@ -131,7 +131,11 @@ def yaml_save(file='data.yaml', data=None):
|
|||
|
||||
with open(file, 'w') as f:
|
||||
# Dump data to file in YAML format, converting Path objects to strings
|
||||
yaml.safe_dump({k: str(v) if isinstance(v, Path) else v for k, v in data.items()}, f, sort_keys=False)
|
||||
yaml.safe_dump({k: str(v) if isinstance(v, Path) else v
|
||||
for k, v in data.items()},
|
||||
f,
|
||||
sort_keys=False,
|
||||
allow_unicode=True)
|
||||
|
||||
|
||||
def yaml_load(file='data.yaml', append_filename=False):
|
||||
|
|
@ -164,7 +168,7 @@ def yaml_print(yaml_file: Union[str, Path, dict]) -> None:
|
|||
None
|
||||
"""
|
||||
yaml_dict = yaml_load(yaml_file) if isinstance(yaml_file, (str, Path)) else yaml_file
|
||||
dump = yaml.dump(yaml_dict, default_flow_style=False)
|
||||
dump = yaml.dump(yaml_dict, sort_keys=False, allow_unicode=True)
|
||||
LOGGER.info(f"Printing '{colorstr('bold', 'black', yaml_file)}'\n\n{dump}")
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue