_forkserver_worker
genlm.eval.domains.ds1000._forkserver_worker
Warm fork-server for DS-1000 harness scripts: pre-imports the science libs (not tensorflow, fork-unsafe) and forks a child per request, or from a warm per-task session child. JSON lines in/out.
run_child(script, timeout, out_path, td)
Executed in the forked child. Never returns.
Source code in genlm/eval/domains/ds1000/_forkserver_worker.py
run_session(setup, cmd_r, res_w, td)
Session child: run setup once, then fork one grandchild per body.
Source code in genlm/eval/domains/ds1000/_forkserver_worker.py
run_child_in_ns(body, timeout, out_path, ns)
Grandchild: execute a body script in the session namespace.