MCPcopy Index your code
hub / github.com/karpathy/reader3 / save_to_pickle

Function save_to_pickle

reader3.py:286–290  ·  view source on GitHub ↗
(book: Book, output_dir: str)

Source from the content-addressed store, hash-verified

284
285
286def save_to_pickle(book: Book, output_dir: str):
287 p_path = os.path.join(output_dir, 'book.pkl')
288 with open(p_path, 'wb') as f:
289 pickle.dump(book, f)
290 print(f"Saved structured data to {p_path}")
291
292
293# --- CLI ---

Callers 1

reader3.pyFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected