romtools.hpc.components.call_runner#
The wire contract behind dispatcher.call(): resolving a “module:qualname” target, packing arguments and results into a JSON + .npz pair, and building the standalone runner script that executes the target under a remote interpreter.
The runner has no access to romtools, so it is assembled from this module’s own source to keep both ends of the transfer on the same format.
Functions
Build the standalone script that runs a call target on the remote host. |
|
|
Replace ndarrays with references into arrays so obj is JSON-safe. |
|
Resolve a "module:qualname" string to the object it names. |
|
Inverse of pack(): restore ndarrays and tuples from their references. |
|
Run in path, with path importable ahead of the rest of sys.path. |
- romtools.hpc.components.call_runner.build_call_runner()[source]#
Build the standalone script that runs a call target on the remote host.
The wire-format helpers are injected from this module’s own source so the two ends of the transfer cannot drift apart.
- Return type:
str
- romtools.hpc.components.call_runner.pack(obj, arrays)[source]#
Replace ndarrays with references into arrays so obj is JSON-safe.
- romtools.hpc.components.call_runner.resolve_target(target)[source]#
Resolve a “module:qualname” string to the object it names.