INNER CODE UNIT · Python
create_inference_job
GACWR/OpenUBA · core/operator/main.py:112
def create_inference_job(spec, name, meta, status, **kwargs):
runtime = spec.get('runtime', 'python-base')
input_path = spec.get('inputPath')
output_path = spec.get('outputPath')
model_ref = spec.get('modelRef')
# Resolve runtime to image
image_tag = "base"
if runtime in ["sklearn", "pytorch", "tensorflow", "networkx"]:
image_tag = runtime
image = f"openuba-model-runner:{image_tag}"
job_name = f"inf-job-{name}"
# Env vars for the runner
db_url = os.getenv("DATABASE_URL", "postgresql://gacwr:gacwr@postgres.openuba.svc:5432/openuba")
run_id = spec.get('runId', '')
execution_id = spec.get('executionId', '')