Skip to content

Commit 99b88b1

Browse files
committed
[DEBUG] Add mode debug output to check stuff happening in workflow (again)
1 parent c8f36d1 commit 99b88b1

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

medcat-v2/tests/components/addons/meta_cat/test_bert_meta_cat.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,9 +56,12 @@ def _force_hf_download(temp_dir_path: str):
5656

5757
def replacement_method(*args, **kwargs):
5858
method_calls.append((len(args), len(kwargs)))
59-
return orig_from_pretrained(
59+
print(f"=== DEBUG: Cache dir contents BEFORE: {os.listdir(temp_dir_path)} ===")
60+
result = orig_from_pretrained(
6061
*args, force_download=True,
6162
cache_dir=temp_dir_path, **kwargs)
63+
print(f"=== DEBUG: Cache dir contents AFTER: {os.listdir(temp_dir_path)} ===")
64+
return result
6265
transformers.BertModel.from_pretrained = replacement_method
6366
try:
6467
yield

0 commit comments

Comments
 (0)