Skip to content

Conversation

@ricardoV94
Copy link
Member

@ricardoV94 ricardoV94 commented Oct 25, 2025

I noticed cache clear wasn't working and always used purge instead. It was a mistake introduced by 671a821 (downstream of aesara-devs/aesara#1312).

This changed many time.time() to to time.perf_counter(). But here it was a mistake. The units are wrong for the logic used in refresh to denote files that are "too old", as it compares the age of a file with the os stats:

def last_access_time(path):
"""
Return the number of seconds since the epoch of the last access of a
given file.
"""
return os.stat(path)[stat.ST_ATIME]

The whole thing is a bit over-engineered but I don't want to touch it.

@ricardoV94 ricardoV94 added the bug Something isn't working label Oct 25, 2025
@ricardoV94 ricardoV94 requested a review from Armavica October 25, 2025 11:00
@ricardoV94 ricardoV94 force-pushed the fix_pytensor_cache_clear branch from 9ad4c68 to 8ebff26 Compare October 25, 2025 11:11
@ricardoV94 ricardoV94 merged commit d98db66 into pymc-devs:main Nov 8, 2025
139 of 144 checks passed
@ricardoV94 ricardoV94 deleted the fix_pytensor_cache_clear branch November 8, 2025 09:05
@codecov
Copy link

codecov bot commented Nov 8, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 0.00%. Comparing base (17c675a) to head (8ebff26).
⚠️ Report is 14 commits behind head on main.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main   #1694       +/-   ##
==========================================
- Coverage   81.61%       0   -81.62%     
==========================================
  Files         242       0      -242     
  Lines       53537       0    -53537     
  Branches     9433       0     -9433     
==========================================
- Hits        43695       0    -43695     
+ Misses       7366       0     -7366     
+ Partials     2476       0     -2476     

see 242 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants