Skip to content

DrivelineSciML: Dyad 3.5 upgrade validation ​

Current Julia distribution: dyad-3.5.0; Dyad CLI target: 3.5.1. Forward-looking reproduction commands use the 3.5.0 Julia channel; recorded results and compiler hashes describe the original RC2 validation and have not been rerun on 3.5.1.

Target: Dyad 3.5.0 language with runtime dyad-3.5.0-rc2 (Julia 1.13.2). Baseline: the original project on dyad-3.4.0 (Julia 1.12.7). Runs use two Julia threads and one precompile task.

Follow-up: calibration validation supersedes the Stage 1 nonconvergence limitation below. Resolving the chirp with a 0.1 ms maximum integration step produces successful convergence on both runtimes, with the original tolerances, data, bounds, and optimizer budget.

References read before editing ​

Reproduction ​

Instantiate this project, regenerate with the Dyad 3.5 CLI, then run the existing tests and all concrete analyses:

sh
julia +dyad-3.5.0 --project -e 'using Pkg; Pkg.instantiate()'
dyad --version
JULIA_EXECUTABLE="julia +dyad-3.5.0" dyad compile "$PWD"
julia +dyad-3.5.0 --project scripts/fix_analysis_codegen.jl
JULIA_NUM_THREADS=2 JULIA_NUM_PRECOMPILE_TASKS=1 julia +dyad-3.5.0 --project -e 'using Pkg; Pkg.test()'
DYAD_UPGRADE_OUTPUT=/path/to/results JULIA_NUM_THREADS=2 julia +dyad-3.5.0 --project scripts/validate_upgrade.jl

The validation driver uses the declared simulation horizons and training budgets, checks ODE return codes and finite state/parameter values, and writes per-analysis metrics and state trajectories. Training output goes to the validation directory. DYAD_UPGRADE_ONLY selects a comma-separated subset when retrying failed runs.

RC2 compiler verification (2026-10-26) ​

Regenerated this project with the repository's then-present RC2 compiler wrapper (since removed), reporting 3.5.0-rc2 (a24a224; compiler-only source build). Its source checkout is exactly a24a2240667872d432a3b86c4db1240d77150e35 (v3.5.0-rc2). Then ran scripts/fix_analysis_codegen.jl with the RC2 Julia runtime. The generated tree now preserves the compiler's exact output, including blank-line whitespace, except for the required DyadTimeseries annotation correction. The script's former whitespace replacement has been removed. A byte comparison against raw compiler output verified that the annotation replacement is the only change; rerunning the script makes no further changes.

The workaround tracks upstream issue #1958. Every Dyad Studio recompile, including compile on save, also requires rerunning the script before loading the project again; see the README workflow.

Re-ran julia +dyad-3.5.0-rc2 --project -e 'using Pkg; Pkg.test()' after regeneration, with two Julia threads and one precompile task: 15/15 assertions passed, including the calibration/training analysis-construction regressions.

The numerical tables and workflow results below are retained from the earlier validation; those analyses were not rerun during this provenance check. The unchanged generated code supports retaining them without relabeling their original compiler provenance.

Results ​

The existing test suite passes: 15/15 assertions (13 demo checks and two calibration-construction regressions). All five transient analyses return Success at their full declared horizons. Both calibrations run to completion; Stage 1 reports the same pre-existing Infeasible optimizer status on both runtimes. Stage 2 reports Success on both runtimes.

The numerical comparisons and calibration results below were originally run with code generated by CLI 3.5.0-rc1 (e5bac67), using the RC2 runtime. fix_analysis_codegen.jl reproducibly corrects the compiler issue where a parametric DyadTimeseries value is declared with a UnionAll type: it uses typeof(__local__data) for the generated symbolic parameter annotation. A direct analysis run exposed this failure; the regular smoke tests alone did not cover calibration construction.

Full-horizon old/new trajectory comparison ​

States are matched by symbolic name on identical saved time grids. Values below are the largest absolute sample difference across all integrated states, with RMS difference for the state attaining that maximum. The state is engine angular speed (rad/s) in each dynamic harness.

| Analysis | Samples | Maximum absolute change | RMS change | |—|—😐—😐—😐

| TestDrivelineChirpMaxwellOnlyTransient | 5001 | 0.01420522 | 0.0005675664 | | TestDrivelineChirpTransient | 5001 | 0.0003650833 | 9.210071e-05 | | TestDrivelineSlowCycleTransient | 1001 | 3.213046e-05 | 4.706933e-06 | | TestDrivelineTipInTransient | 4001 | 0.001082889 | 0.0002403589 | | TestTipInTorqueTransient (torque output, Nm) | 4001 | 2.756906e-12 | 7.316169e-13 |

TestTipInTorqueTransient has no integrated states; its torque output is compared instead. Default solver selection/tolerances are retained. The largest angular-speed difference is 0.01421 rad/s on the high-frequency Maxwell-only chirp (roughly 0.01% of the 147 rad/s speed scale).

Calibration results at declared budgets ​

The declared iteration limits are 400 for Stage 1 and 300 for Stage 2; the optimizer may terminate earlier with the return status shown above. these entries run each analysis with its declared default model (Stage 2 therefore uses nominal Maxwell parameters, rather than the chained Stage 1 fit).

Analysis3.4 values3.5 valuesObjective 3.4 → 3.5
DrivelineStage1CalibrationAnalysis[293.84112154029486, 1.02312706428496, 46.77750128342999][293.81493088067236, 1.023115603609219, 46.77444876683099]0.09598595522912254 → 0.09598692792772814
DrivelineStage2CalibrationAnalysis[41.27165271985458, 3.39358163212713, 0.05119367843362858][41.25691530460942, 3.3924545971255706, 0.05118451402420553]0.3960505632517328 → 0.3960509806673762

The maximum absolute parameter change is 0.02620 for Stage 1 (k1, about 0.009%) and 0.01474 for Stage 2 (alpha, about 0.036%). Objectives change by +9.73e-7 and +4.17e-7 respectively. Stage 1 Infeasible is retained as an explicit limitation; no successful-convergence claim is made for that fit.

Chained calibration and held-out validation ​

The existing scripts/run_calibration.jl and scripts/validate.jl both complete on 3.5. The chained fit freezes Stage 1's Maxwell branch before fitting Stage 2: alpha = 49.63 (truth 50, -0.74%), beta = 4.970 (truth 5, -0.60%), gamma = 0.4441 (truth 0.5, -11.19%). The fitted saturation torque is 9.99 Nm versus 10 Nm truth. Gamma remains the least well recovered parameter in this identification problem.

On the unseen tip-in, calibrated RMSE versus truth is 0.004492 rad/s (engine speed), 0.005614 rad/s (speed difference), and 9.129e-5 rad (twist). The linear baseline errors are 0.5234 rad/s, 0.6543 rad/s, and 0.01073 rad, respectively: 99.1% lower RMSE for each observable. The existing plot exporter also writes assets/validation_tipin.png successfully (ignored generated output).

No measurement datasets were regenerated. All seven defined analyses and the existing tests were run; no analysis or training budget was silently omitted.