MCPcopy Index your code
hub / github.com/idank/explainshell / on_result

Function on_result

tools/experiments/eval_size_routing.py:99–110  ·  view source on GitHub ↗
(path: str, entry: ExtractionResult)

Source from the content-addressed store, hash-verified

97 total = len(files)
98
99 def on_result(path: str, entry: ExtractionResult) -> None:
100 counter["n"] += 1
101 results[path] = entry
102 outcome = entry.outcome.value
103 n_opts = (
104 len(entry.mp.options) if entry.outcome == ExtractionOutcome.SUCCESS else 0
105 )
106 print(
107 f" [{label} {counter['n']}/{total}] {os.path.basename(path)} "
108 f"{outcome} opts={n_opts}",
109 flush=True,
110 )
111
112 print(f"\n=== {label} ({model}) on {len(files)} files, jobs={jobs} ===", flush=True)
113 t0 = time.monotonic()

Callers 7

_fake_runMethod · 0.50
_fake_runMethod · 0.50
_fake_runMethod · 0.50
_fake_runMethod · 0.50
_fake_runMethod · 0.50
_fake_runMethod · 0.50
_fake_runMethod · 0.50

Calls

no outgoing calls

Tested by 7

_fake_runMethod · 0.40
_fake_runMethod · 0.40
_fake_runMethod · 0.40
_fake_runMethod · 0.40
_fake_runMethod · 0.40
_fake_runMethod · 0.40
_fake_runMethod · 0.40