From 8ebff2687c550ec21082d9d2429b79eebab41886 Mon Sep 17 00:00:00 2001 From: Ricardo Vieira Date: Sat, 25 Oct 2025 12:53:39 +0200 Subject: [PATCH] Fix pytensor_cache clear Bug introduced by 671a821d5d6ce33eb8ff3baa05d392c99da4133f --- pytensor/link/c/cmodule.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/pytensor/link/c/cmodule.py b/pytensor/link/c/cmodule.py index 40253f199e..f7389231ef 100644 --- a/pytensor/link/c/cmodule.py +++ b/pytensor/link/c/cmodule.py @@ -806,7 +806,7 @@ def rmtree_empty(*args, **kwargs): to_delete_empty.append((args, kwargs)) # add entries that are not in the entry_from_key dictionary - time_now = time.perf_counter() + time_now = time.time() # Go through directories in alphabetical order to ensure consistent # behavior. try: @@ -976,7 +976,7 @@ def unpickle_failure(): # directories in alphabetical order so as to make # sure all new processes only use the first one. if cleanup: - age = time.perf_counter() - last_access_time(entry) + age = time.time() - last_access_time(entry) if delete_if_problem or age > self.age_thresh_del: rmtree( root, @@ -1528,7 +1528,7 @@ def clear_unversioned(self, min_age=None): assert key[0] to_del = [] - time_now = time.perf_counter() + time_now = time.time() for filename in os.listdir(self.dirname): if filename.startswith("tmp"): try: