Skip to content

Commit a2c3af1

Browse files
committed
Remove runner copy
1 parent 71ac8db commit a2c3af1

File tree

1 file changed

+2
-28
lines changed

1 file changed

+2
-28
lines changed

Diff for: neurons/_validator/competitions/services/circuit_evaluator.py

+2-28
Original file line numberDiff line numberDiff line change
@@ -477,38 +477,12 @@ def _run_baseline_model(self, test_inputs: torch.Tensor) -> List | None:
477477
bt.logging.error(f"ONNX model not found at {model_path}")
478478
return None
479479

480-
version_result = subprocess.run(
481-
[
482-
python_path,
483-
"-c",
484-
"import sys; print(f'{sys.version_info.major}.{sys.version_info.minor}')",
485-
],
486-
capture_output=True,
487-
text=True,
488-
check=True,
489-
)
490-
python_version = version_result.stdout.strip()
491-
runner_path = os.path.join(
492-
self.onnx_venv,
493-
"lib",
494-
f"python{python_version}",
495-
"site-packages",
496-
"onnx_runner.py",
497-
)
498-
499-
if not os.path.exists(runner_path):
500-
bt.logging.error(f"ONNX runner not found at {runner_path}")
501-
return None
502-
503-
shutil.copy2(self.onnx_runner, runner_path)
504-
505-
bt.logging.debug(f"Running ONNX inference with Python {python_version}")
506-
bt.logging.debug(f"Runner path: {runner_path}")
480+
bt.logging.debug(f"Runner path: {self.onnx_runner}")
507481

508482
process = subprocess.Popen(
509483
[
510484
python_path,
511-
runner_path,
485+
self.onnx_runner,
512486
model_path,
513487
input_file.name,
514488
output_file.name,

0 commit comments

Comments
 (0)