Skip to content

Commit

Permalink
add log
Browse files Browse the repository at this point in the history
  • Loading branch information
echarlaix committed Oct 9, 2024
1 parent 5e51e36 commit 2837cab
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions optimum/modeling_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -382,7 +382,6 @@ def from_pretrained(
)
model_id, revision = model_id.split("@")

# TODO: enable this when offline
config_folder = subfolder
try:
if len(find_files_matching_pattern(model_id, cls.config_name, subfolder=subfolder)) == 0:
Expand All @@ -391,7 +390,8 @@ def from_pretrained(
)
config_folder = ""
except OfflineModeIsEnabled:
pass
# TODO: enable this for offline mode by checking the cache
logger.info(f"Offline mode enabled, the {cls.config_name} is expected to be in the subfolder {subfolder}.")

library_name = TasksManager.infer_library_from_model(
model_id, subfolder=config_folder, revision=revision, cache_dir=cache_dir, token=token
Expand Down

0 comments on commit 2837cab

Please sign in to comment.