MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / save_to_cache

Method save_to_cache

kernelbench/bridge.py:66–75  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

64 # ----- Cache persistence -----
65
66 def save_to_cache(self) -> None:
67 self.cache_path.parent.mkdir(parents=True, exist_ok=True)
68 self.cache_path.write_text(self.source_code, encoding="utf-8")
69 meta_path = self.cache_path.with_suffix(".json")
70 meta = {
71 "level": self.level,
72 "problem_id": self.problem_id,
73 "name": self.name,
74 }
75 meta_path.write_text(json.dumps(meta, indent=2), encoding="utf-8")
76
77 @classmethod
78 def load_from_cache(cls, level: int, problem_id: int) -> Optional["KernelBenchProblem"]:

Callers 3

load_from_huggingfaceFunction · 0.95
load_from_local_repoFunction · 0.95
load_from_fileFunction · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected