1
0
mirror of https://github.com/osmarks/meme-search-engine.git synced 2025-02-07 22:50:06 +00:00

12 lines
292 B
Python
Raw Normal View History

2024-10-05 17:22:44 +01:00
import torch
import pyarrow as pa
torch.set_float32_matmul_precision("high")
with pa.memory_map("../../sample_1m.arrow", "r") as source:
loaded_arrays = pa.ipc.open_file(source).read_all()
train_split = 0.8
def ckpt_path(steps):
return f"ckpt/{steps}.pt", f"ckpt/{steps}.optim.pt"