Skip to content

Commit

Permalink
adapted docstring and added file name ending
Browse files Browse the repository at this point in the history
  • Loading branch information
jonasd4 committed Sep 11, 2024
1 parent 06c092c commit c087a2a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions thingsvision/core/extraction/extractors.py
Original file line number Diff line number Diff line change
Expand Up @@ -353,7 +353,8 @@ def __init__(
def _load_vissl_state_dict(self, model_url: str, unique_model_filename: str):
"""
Downloads the model in vissl format, converts it to torchvision format and
saves it under output_model_filepath.
caches it under the unique_model_filename. Therefore, this file_name should be unique
per url. Otherwise, the wrong cached variant is loaded.
"""
model = load_state_dict_from_url(model_url,
map_location=torch.device("cpu"),
Expand Down Expand Up @@ -394,7 +395,7 @@ def load_model_from_source(self) -> None:
if self.model_name in SSLExtractor.MODELS:

# unique model id name for all models
unique_model_filename = f'thingsvision_ssl_v0_{self.model_name}'
unique_model_filename = f'thingsvision_ssl_v0_{self.model_name}.pth'

# defines how the model should be loaded
model_config = SSLExtractor.MODELS[self.model_name]
Expand Down

0 comments on commit c087a2a

Please sign in to comment.