Skip to content

Commit 8836ce2

Browse files
committed
Improved selection of transfer learning caches
1 parent b7cda36 commit 8836ce2

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

kernel_tuner/interface.py

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -918,7 +918,12 @@ def tune_kernel_T1(
918918
cache_dir = Path(cache_filepath).parent
919919
# TODO remove in production!
920920
transfer_learning_caches = [
921-
p for p in cache_dir.iterdir() if not p.stem.endswith("_T4") and p.name != cache_filepath.name
921+
p
922+
for p in cache_dir.iterdir()
923+
if len(p.suffixes) > 0
924+
and p.suffixes[-1].endswith(".json")
925+
and not p.stem.endswith("_T4")
926+
and p.name != cache_filepath.name
922927
]
923928

924929
# get the grid divisions

0 commit comments

Comments
 (0)