MCPcopy Create free account
hub / github.com/RightNow-AI/autokernel / _run_forward

Function _run_forward

profile.py:516–526  ·  view source on GitHub ↗

Run a single forward pass with the correct calling convention.

(model: nn.Module, inputs: Dict[str, Any])

Source from the content-addressed store, hash-verified

514
515
516def _run_forward(model: nn.Module, inputs: Dict[str, Any]) -> None:
517 """Run a single forward pass with the correct calling convention."""
518 if "input_ids" in inputs:
519 model(input_ids=inputs["input_ids"])
520 elif "x" in inputs:
521 try:
522 model(inputs["x"])
523 except TypeError:
524 model(**inputs)
525 else:
526 model(**inputs)
527
528
529def profile_model(

Callers 1

profile_modelFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected