Files
MeltMind/tools/track_b_gino_measurement_gpu2_worker.py
T

22 lines
868 B
Python

"""Invoke the same reviewed paper measurement at its new physical card binding."""
import argparse
from pathlib import Path
import sys
from types import FunctionType
from track_b_gino_measurement_gpu2 import authorized_child
from track_b_gino_paper_keyword_patch import extract_patched_paper_code
from track_b_gino_shapenet_worker import work
if __name__ == "__main__":
parser = argparse.ArgumentParser(description=__doc__)
parser.add_argument("root", type=Path)
root = parser.parse_args().root.resolve()
c = authorized_child(root)
if str(Path(sys.executable).absolute()) != c["environment"]["python"]:
raise PermissionError("The worker did not start with the accepted interpreter")
namespace = dict(work.__globals__, extract_paper_code=extract_patched_paper_code)
FunctionType(work.__code__, namespace, work.__name__)(root, c)