nv_dfm_core.targets.local.LocalJob#
- class nv_dfm_core.targets.local.LocalJob(homesite, job_id, pipeline, next_frame, federation, federation_name, logger, force_modgen=False, callback_runner=None)[source]#
A Job is a request to run a pipeline.
- Parameters:
homesite (str)
job_id (str)
pipeline (PreparedPipeline)
next_frame (Frame)
federation (FederationRunner)
federation_name (str)
logger (Logger)
force_modgen (bool)
callback_runner (CallbackRunner | None)
- classmethod create_from_handle(handle, federation, logger, callback_runner=None)[source]#
Create a LocalJob from a JobHandle.
This is the primary way to create LocalJob objects, both for initial execution and for reattachment.
- Parameters:
handle (object) – JobHandle with job metadata and execution reference
federation (FederationRunner) – FederationRunner managing this job
logger (Logger) – Logger for this job
callback_runner (CallbackRunner | None) – Optional callback runner for dispatch control
- Returns:
New LocalJob connected to the execution tracked by handle
- Return type:
- classmethod create_stub(job_id, homesite, logger, callback_runner=None)[source]#
Create a stub LocalJob for unknown job_id.
This job will always report UNKNOWN status and cannot perform operations. Used when reattaching to a job_id that doesn’t exist.
- Parameters:
job_id (str)
homesite (str)
logger (Logger)
callback_runner (CallbackRunner | None)
- Return type:
- detach()[source]#
Stop polling for results and release callbacks.
After detach, this LocalJob becomes inert and can be GC’d. The job execution continues running in FederationRunner, but results will not be delivered until another LocalJob reattaches.
This is idempotent - calling detach() multiple times is safe.