mirror of
https://github.com/ROCm/jax.git
synced 2025-04-19 05:16:06 +00:00
[LRUCache
] Fix CI failure on Windows
PiperOrigin-RevId: 644418325
This commit is contained in:
parent
12ffb2fa23
commit
79cc04a183
@ -72,8 +72,8 @@ class LRUCache(CacheInterface):
|
||||
self.max_size = max_size
|
||||
self.lock_timeout_secs = lock_timeout_secs
|
||||
|
||||
lock_path = self.path / ".lockfile"
|
||||
self.lock = filelock.FileLock(lock_path)
|
||||
self.lock_path = self.path / ".lockfile"
|
||||
self.lock = filelock.FileLock(self.lock_path)
|
||||
|
||||
def get(self, key: str) -> bytes | None:
|
||||
"""Retrieves the cached value for the given key.
|
||||
@ -157,7 +157,7 @@ class LRUCache(CacheInterface):
|
||||
h: list[tuple[int, pathlib.Path, int]] = []
|
||||
dir_size = 0
|
||||
for file in self.path.iterdir():
|
||||
if file.is_file():
|
||||
if file.is_file() and file != self.lock_path:
|
||||
file_size = file.stat().st_size
|
||||
file_mtime = file.stat().st_mtime_ns
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user