MCPcopy Create free account
hub / github.com/RoboVerseOrg/RoboVerse / check_task

Function check_task

scripts/parity_simpler_env.py:122–133  ·  view source on GitHub ↗

Run one task's native-vs-wrapped comparison in a fresh subprocess.

(task_name: str, *, steps: int, seed: int)

Source from the content-addressed store, hash-verified

120
121
122def check_task(task_name: str, *, steps: int, seed: int) -> dict:
123 """Run one task's native-vs-wrapped comparison in a fresh subprocess."""
124 proc = subprocess.run(
125 [sys.executable, "-c", _WORKER, task_name, str(seed), str(steps)],
126 check=False,
127 capture_output=True,
128 text=True,
129 )
130 for line in proc.stdout.splitlines():
131 if line.startswith("RESULT_B64:"):
132 return json.loads(base64.b64decode(line[len("RESULT_B64:") :]).decode())
133 return {"task": task_name, "parity_1to1": False, "error": proc.stderr[-2000:]}
134
135
136def main() -> None:

Callers 1

mainFunction · 0.70

Calls 1

runMethod · 0.45

Tested by

no test coverage detected