plattli 0.11.0
“Plättli is an opinionated dataformat for logging a series of metrics”
Module built on the numeric Python stackPython opens ZipFile in write mode
SHA-256726856e2f57e4fb72a9fe2bb582424dc5b1040bc78e3be3754b55be93c181299
MaleculeH₂(DbF₂)
Evidence
175 indices = np.fromfile(idx_path, dtype=np.uint32)
176 keep = int(np.searchsorted(indices, step, side="left")) if indices.size else 0
177 with idx_path.open("r+b") as fh:
178 fh.truncate(keep * 4)
179 else:
270 raise FileNotFoundError(f"missing values file for {name} in run {_run_name_for_root(root)}")
271 count = 0
272 lines = path.read_bytes().splitlines()
273 for idx, line in enumerate(lines):
274 try:
275 json.loads(line)
276 except (json.JSONDecodeError, UnicodeDecodeError):
277 if idx == len(lines) - 1:
500 for info, out_path in members:
501 out_path.parent.mkdir(parents=True, exist_ok=True)
502 out_path.write_bytes(zf.read(info))
503 zip_path.unlink()
1import json
2import zipfile
3from datetime import datetime, timezone
4from pathlib import Path
5
6import numpy as np
7
8from ._indices import _find_piecewise_params
⋯4 lines
86:13… tmp_path = zip_path.with_name(zip_path.name + ".tmp")
87 zf = zipfile.ZipFile(tmp_path, "w", compression=zipfile.ZIP_STORED)
88
89 def write_bytes(name, payload):
⋯9 lines
99 path = self.root / name
100 path.parent.mkdir(parents=True, exist_ok=True)
101 with path.open("wb") as fh:
102 fh.write(payload)
103
⋯5 lines
No evidence locations were recorded for this file. Raw result