From 2837cab34a6553ac411d95d1fea3f56580ffe164 Mon Sep 17 00:00:00 2001 From: Ella Charlaix Date: Wed, 9 Oct 2024 16:28:01 +0200 Subject: [PATCH] add log --- optimum/modeling_base.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/optimum/modeling_base.py b/optimum/modeling_base.py index ad1ec06446f..275bf65cc0d 100644 --- a/optimum/modeling_base.py +++ b/optimum/modeling_base.py @@ -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: @@ -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