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
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 6 additions and 11 deletions

View File

@ -183,18 +183,13 @@ 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)
# 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)
update_yaml_file(file_path, key_path, value)
def update_yaml_file(file_path, key_path, new_value):
yaml = YAML()

View File

@ -275,7 +275,7 @@ export default function Explore() {
<TbExclamationCircle className="mb-3 size-10" />
<div>Search Unavailable</div>
</div>
{embeddingsReindexing && (
{embeddingsReindexing && allModelsLoaded && (
<>
<div className="text-center text-primary-variant">
Search can be used after tracked object embeddings have