Unverified Commit 4fd32a1f authored by Yih-Dar's avatar Yih-Dar Committed by GitHub
Browse files

Catch `HFValidationError` in `TrainingSummary` (#19252)



* Catch HfValidationError in TrainingSummary
Co-authored-by: default avatarydshieh <ydshieh@users.noreply.github.com>
parent f3d2f7a6
......@@ -26,6 +26,7 @@ from typing import Any, Dict, List, Optional, Union
import requests
import yaml
from huggingface_hub import model_info
from huggingface_hub.utils import HFValidationError
from . import __version__
from .models.auto.modeling_auto import (
......@@ -378,7 +379,7 @@ class TrainingSummary:
for tag in info.tags:
if tag.startswith("license:"):
self.license = tag[8:]
except requests.exceptions.HTTPError:
except (requests.exceptions.HTTPError, HFValidationError):
pass
def create_model_index(self, metric_mapping):
......
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