Unzip eval_bundle.zip and place it in the base directory.
(file_path)
| 93 | |
| 94 | |
| 95 | def 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 | |
| 107 | def evaluate_core(model, tokenizer, device, max_per_task=-1): |
nothing calls this directly
no test coverage detected