MCPcopy Create free account
hub / github.com/0xShug0/audio.cpp / load_requests

Function load_requests

tests/ace_step/ace_step_python_warm_bench.py:76–87  ·  view source on GitHub ↗
(args: argparse.Namespace)

Source from the content-addressed store, hash-verified

74
75
76def load_requests(args: argparse.Namespace) -> list[dict[str, Any]]:
77 if args.request_sequence_json:
78 payload = json.loads(args.request_sequence_json)
79 if not isinstance(payload, list):
80 raise RuntimeError("--request-sequence-json must decode to a list")
81 return payload
82 if args.request_json:
83 payload = json.loads(args.request_json)
84 if not isinstance(payload, dict):
85 raise RuntimeError("--request-json must decode to an object")
86 return [payload]
87 raise RuntimeError("ACE-Step warmbench requires --request-json or --request-sequence-json")
88
89
90def normalize_device(backend: str, device_index: int) -> str:

Callers 1

mainFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected