Skip to content

Commit ead80d3

Browse files
committed
Fix typo, naming consistency
1 parent d584e7f commit ead80d3

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

timm/models/helpers.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,7 @@ def load_pretrained(model, default_cfg=None, num_classes=1000, in_chans=3, filte
170170
_logger.warning("No pretrained weights exist for this model. Using random initialization.")
171171
return
172172
if hf_hub_id and has_hf_hub(necessary=not pretrained_url):
173-
_logger.info(f'Loading pretrained weights from huggingface hub ({hf_hub_id})')
173+
_logger.info(f'Loading pretrained weights from Hugging Face hub ({hf_hub_id})')
174174
state_dict = load_state_dict_from_hf(hf_hub_id)
175175
else:
176176
_logger.info(f'Loading pretrained weights from url ({pretrained_url})')

timm/models/hub.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -56,13 +56,13 @@ def has_hf_hub(necessary=False):
5656
if hf_hub_url is None and necessary:
5757
# if no HF Hub module installed and it is necessary to continue, raise error
5858
raise RuntimeError(
59-
'HuggignFace Hub model specified but package not installed. Run `pip install huggingface_hub`.')
59+
'Hugging Face hub model specified but package not installed. Run `pip install huggingface_hub`.')
6060
return hf_hub_url is not None
6161

6262

6363
def hf_split(hf_id):
6464
rev_split = hf_id.split('#')
65-
assert 0 < len(rev_split) <= 2, 'HuggingFace HUB identifier should only contain on # character to identify revision.'
65+
assert 0 < len(rev_split) <= 2, 'hf_hub id should only contain one # character to identify revision.'
6666
hf_model_id = rev_split[0]
6767
hf_revision = rev_split[-1] if len(rev_split) > 1 else None
6868
return hf_model_id, hf_revision

0 commit comments

Comments
 (0)