depot/third_party/nixpkgs/pkgs/development/python-modules/jax/cache-fix.patch
Default email a425ba4985 Project import generated by Copybara.
GitOrigin-RevId: 5b091d4fbe3b7b7493c3b46fe0842e4b30ea24b3
2021-12-30 14:39:12 +01:00

12 lines
562 B
Diff

diff --git a/jax/experimental/compilation_cache/file_system_cache.py b/jax/experimental/compilation_cache/file_system_cache.py
index b85969de..92acd523 100644
--- a/jax/experimental/compilation_cache/file_system_cache.py
+++ b/jax/experimental/compilation_cache/file_system_cache.py
@@ -33,6 +33,7 @@ class FileSystemCache(CacheInterface):
path_to_key = os.path.join(self._path, key)
if os.path.exists(path_to_key):
with open(path_to_key, "rb") as file:
+ os.utime(file.fileno())
return file.read()
else:
return None