MCPcopy
hub / github.com/karpathy/nanochat / place_eval_bundle

Function place_eval_bundle

scripts/base_eval.py:95–104  ·  view source on GitHub ↗

Unzip eval_bundle.zip and place it in the base directory.

(file_path)

Source from the content-addressed store, hash-verified

93
94
95def place_eval_bundle(file_path):
96 """Unzip eval_bundle.zip and place it in the base directory."""
97 base_dir = get_base_dir()
98 eval_bundle_dir = os.path.join(base_dir, "eval_bundle")
99 with tempfile.TemporaryDirectory() as tmpdir:
100 with zipfile.ZipFile(file_path, 'r') as zip_ref:
101 zip_ref.extractall(tmpdir)
102 extracted_bundle_dir = os.path.join(tmpdir, "eval_bundle")
103 shutil.move(extracted_bundle_dir, eval_bundle_dir)
104 print0(f"Placed eval_bundle directory at {eval_bundle_dir}")
105
106
107def evaluate_core(model, tokenizer, device, max_per_task=-1):

Callers

nothing calls this directly

Calls 2

get_base_dirFunction · 0.90
print0Function · 0.90

Tested by

no test coverage detected