Fix yaml bug and ensure embeddings progress doesn't show until all models are loaded (#14338)

This commit is contained in:
Josh Hawkins
2024-10-14 09:23:08 -05:00
committed by GitHub
parent 72aa68cedc
commit 0ee32cf110
2 changed files with 6 additions and 11 deletions

View File

@@ -183,16 +183,11 @@ def update_yaml_from_url(file_path, url):
update_yaml_file(file_path, key_path, new_value_list)
else:
value = new_value_list[0]
if "," in value:
# Skip conversion if we're a mask or zone string
update_yaml_file(file_path, key_path, value)
else:
try:
value = ast.literal_eval(value)
except (ValueError, SyntaxError):
pass
update_yaml_file(file_path, key_path, value)
try:
# no need to convert if we have a mask/zone string
value = ast.literal_eval(value) if "," not in value else value
except (ValueError, SyntaxError):
pass
update_yaml_file(file_path, key_path, value)