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
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