Core: organize files on ingest via alpha, not ascii (#3029)

* organize files on ingest via alpha, not ascii

* Change from lower() to casefold()
This commit is contained in:
ken
2024-05-02 03:14:50 -07:00
committed by GitHub
parent 31a5696526
commit 3cc434cd78

View File

@@ -120,7 +120,7 @@ def main(args=None, callback=ERmain):
raise ValueError(f"File {fname} is invalid. Please fix your yaml.") from e
# sort dict for consistent results across platforms:
weights_cache = {key: value for key, value in sorted(weights_cache.items())}
weights_cache = {key: value for key, value in sorted(weights_cache.items(), key=lambda k: k[0].casefold())}
for filename, yaml_data in weights_cache.items():
if filename not in {args.meta_file_path, args.weights_file_path}:
for yaml in yaml_data: