nv_dfm_core.targets.local.LocalSessionDelegate#

class nv_dfm_core.targets.local.LocalSessionDelegate(session, federation_name, homesite, logger, max_concurrent_jobs=4, sites=None, **kwargs)[source]#
Parameters:
  • session (Any)

  • federation_name (str)

  • homesite (str)

  • logger (Logger)

  • max_concurrent_jobs (int)

  • sites (list[str] | None)

  • kwargs (Any)

execute(pipeline, next_frame, input_params, callback_runner, debug, options=None, force_modgen=False)[source]#

Execute a prepared pipeline.

Parameters:
  • pipeline (PreparedPipeline) – The prepared pipeline to execute.

  • next_frame (Frame) – The next frame for the pipeline.

  • input_params (list[tuple[Frame, dict[str, Any]]]) – List of (frame, params) tuples for input.

  • callback_runner (CallbackRunner) – The callback runner for receiving results.

  • debug (bool) – Whether to run in debug mode.

  • options (Any | None) – Target-specific options.

  • force_modgen (bool) – If True, force code regeneration.

Returns:

Job object for the execution.

Return type:

Job

reattach(job_id, callback_runner)[source]#

Reattach to an existing local job (within the same process + same connected Session only).

Parameters:
  • job_id (str) – The ID of the job to reattach to

  • callback_runner (CallbackRunner | None) – The callback runner for receiving results, or None for informational-only attachment (status/abort only).

Returns:

Job object for the existing local job. If job_id is not known to this local federation process, returns a job with UNKNOWN status.

Return type:

Job

Note

In local mode, jobs are tracked in-memory by the FederationRunner instance created by this Session’s connect(). Reattachment therefore requires:

  • the same OS process, AND

  • the same connected Session (i.e., the same FederationRunner instance).

Reattachment works for both running and finished jobs for the lifetime of that runner.