dataset tags don't support https uris (#2195)

This commit is contained in:
Wing Lian
2024-12-17 13:58:53 -05:00
committed by GitHub
parent d91feaffc8
commit 339f3c67e2

View File

@@ -266,6 +266,9 @@ def train(
dataset_tags = [
d["path"] for d in cfg.datasets if not Path(d["path"]).is_dir()
]
dataset_tags = [
d for d in dataset_tags if not d.startswith("https://")
]
if dataset_tags:
# guard as create_model_card may fail if dataset_tags is empty list
model_card_kwarg["dataset_name"] = dataset_tags
@@ -273,6 +276,9 @@ def train(
dataset_tags = [
d["path"] for d in cfg.datasets if not Path(d["path"]).is_dir()
]
dataset_tags = [
d for d in dataset_tags if not d.startswith("https://")
]
if dataset_tags:
# guard as create_model_card may fail if dataset_tags is empty list
model_card_kwarg["dataset_tags"] = dataset_tags