Unverified Commit 4331923b authored by Sylvain Gugger's avatar Sylvain Gugger Committed by GitHub
Browse files

Fix None value when adding info to auto_map (#22990)

parent d0b50023
...@@ -560,8 +560,8 @@ def add_model_info_to_auto_map(auto_map, repo_id): ...@@ -560,8 +560,8 @@ def add_model_info_to_auto_map(auto_map, repo_id):
""" """
for key, value in auto_map.items(): for key, value in auto_map.items():
if isinstance(value, (tuple, list)): if isinstance(value, (tuple, list)):
auto_map[key] = [f"{repo_id}--{v}" if "--" not in v else v for v in value] auto_map[key] = [f"{repo_id}--{v}" if (v is not None and "--" not in v) else v for v in value]
else: elif value is not None and "--" not in value:
auto_map[key] = f"{repo_id}--{value}" if "--" not in value else value auto_map[key] = f"{repo_id}--{value}"
return auto_map return auto_map
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment