1 CandidateContext

pose_generation.types.CandidateContext(
    cfg,
    reference_pose,
    sampling_pose,
    gt_mesh,
    mesh_verts,
    mesh_faces,
    occupancy_extent,
    camera_calib_template,
    shell_poses,
    centers_world,
    shell_offsets_ref,
    mask_valid,
    rule_masks=dict(),
    debug=dict(),
)

Mutable full-shell state passed between sampling and pruning rules.

shell_poses, centers_world, shell_offsets_ref, and mask_valid are aligned over the full candidate shell of size N, including candidates that later become invalid. Pruning rules must update mask_valid and may store same-shape diagnostic masks in rule_masks; they must not compact rows.

views are not stored here because compact valid camera views are built only after pruning. This separation lets rollout writers preserve invalid candidates with reason codes while exposing only valid actions to policies.

1.1 Methods

Name Description
record_mask Store a copy of the cumulative validity mask for diagnostics.
invalidate Apply a rejection mask (True = reject) to the current validity mask.
mark_debug Attach debug tensors in a consistent shape (clone kept to avoid side-effects).

1.1.1 record_mask

pose_generation.types.CandidateContext.record_mask(name, mask)

Store a copy of the cumulative validity mask for diagnostics.

1.1.2 invalidate

pose_generation.types.CandidateContext.invalidate(reject_mask)

Apply a rejection mask (True = reject) to the current validity mask.

1.1.3 mark_debug

pose_generation.types.CandidateContext.mark_debug(key, value)

Attach debug tensors in a consistent shape (clone kept to avoid side-effects).