Skip to content

templates: fix cloud-solve blockers (Ipopt callback + bare using Piccolissimo) - #157

Merged
Rchari1 merged 1 commit into
mainfrom
rchari/solve-template-cloud-fixes
Jul 19, 2026
Merged

templates: fix cloud-solve blockers (Ipopt callback + bare using Piccolissimo)#157
Rchari1 merged 1 commit into
mainfrom
rchari/solve-template-cloud-fixes

Conversation

@Rchari1

@Rchari1 Rchari1 commented Jul 19, 2026

Copy link
Copy Markdown
Member

Two bugs found by live-testing on the baked solve-runner AMI — both blocked cloud solves (plain and HP/Piccolissimo) through the SendCommand wrapper.

The bugs

  1. Unsupported Ipopt per-iteration callback. All four solve templates passed a per-iter callback via IpoptOptions to solve! — but the DirectTrajOpt baked into the cloud bundle has no such kwarg → MethodError before the solve even starts. Dropped the per-iter pulse_emit (which fed AMICODE_PULSE frame telemetry); kept the supported callback (so AMICODE_ITER stats still stream to the poll endpoint). A comment marks it to restore once the bundle exposes an intermediate-callback hook.
  2. using Piccolissimo trailing comment (HP only). solve_template_hp.jl had using Piccolissimo # HP layer…. The cloud wrapper binds the bundled package into Main and comments out using <pkg> lines by exact match — the trailing comment defeated that, so the bundled module failed to resolve (Package Piccolissimo not found). Made the line bare; the explanatory note moved above it.

Verified live on the AMI (not just unit-checked)

  • Plain solve_template.jl → ran to DONE, fidelity ~1.0.
  • HP solve_template_hp.jl (SplineIntegrator + SplinePulseProblem) → ran to DONE fidelity=0.856, 60 iterations. Confirms Piccolissimo's HP solver works in the cloud bundle; Altissimo is present in the bundle too.
  • Both templates parse in Julia; tsc clean; packaging test unaffected.

Applied to all 4 templates (solve_template, solve_template_hp, skeleton_free, solve_rydberg_cz) for consistency.

Known follow-up: AMICODE_PULSE per-iteration frames (iter_*.png) are the one thing dropped — restoring them needs the bundle's actual intermediate-callback API, a separate change.

🤖 Generated with Claude Code

…olissimo)

Two bugs found via live testing on the baked solve-runner AMI, blocking cloud
solves through the SendCommand wrapper:

1. All 4 templates passed an unsupported per-iteration callback via IpoptOptions
   to solve!, but the DirectTrajOpt baked in the cloud bundle has no such kwarg
   -> MethodError before the solve. Drop the per-iter pulse-emit (AMICODE_PULSE
   frames); keep the supported callback (AMICODE_ITER stats still flow). Restore
   once the bundle exposes the hook.
2. solve_template_hp.jl had `using Piccolissimo` with a trailing comment -- the
   cloud wrapper's using-patcher exact-matches the bare line, so the comment made
   the bundled module fail to resolve. Made it bare (note moved above).

Verified live on the AMI: plain template runs to DONE fidelity ~1.0; HP template
(spline stack) runs to DONE fidelity=0.856. Both parse in Julia; tsc clean.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant