MCPcopy Create free account
hub / github.com/geekcomputers/Python / save

Method save

ML/src/python/neuralforge/utils/metrics.py:46–55  ·  view source on GitHub ↗
(self, filepath: str)

Source from the content-addressed store, hash-verified

44 return np.mean([v for v in history if v is not None])
45
46 def save(self, filepath: str):
47 os.makedirs(os.path.dirname(filepath), exist_ok=True)
48
49 data = {
50 'metrics': self.metrics,
51 'best_metrics': self.best_metrics
52 }
53
54 with open(filepath, 'w') as f:
55 json.dump(data, f, indent=2)
56
57 def load(self, filepath: str):
58 with open(filepath, 'r') as f:

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected