Skip to content

[CI Broken] DDE test failure due to type conversion error in DelayDiffEq #172

@ChrisRackauckas-Claude

Description

@ChrisRackauckas-Claude

Summary

CI is currently broken on the master branch. The delay differential equation (DDE) test is failing with a MethodError related to type conversion in the ODE solver cache.

Which CI job(s) failed

  • ubuntu-latest Python 3.10: Failed after 49m12s
  • macos-latest Python 3.13: Failed after 1h5m33s
  • macos-latest Python 3.10: Still pending
  • ubuntu-latest Python 3.13: Still pending

Error Details

Test File

.tox/py/lib/python3.10/site-packages/diffeqpy/tests/test_dde.py::test

Error Message

juliacall.JuliaError: MethodError: Cannot `convert` an object of type 
  OrdinaryDiffEqRosenbrock.Rosenbrock23Cache{...}

The full error is a very long type conversion error between incompatible cache types in the DelayDiffEq solver when using the default algorithm with automatic algorithm switching.

Test Code That Failed

def test():
    f = de.seval("""
    function f(du, u, h, p, t)
      du[1] = 1.1/(1 + sqrt(10)*(h(p, t-20)[1])^(5/4)) - 10*u[1]/(1 + 40*u[2])
      du[2] = 100*u[1]/(1 + 40*u[2]) - 2.43*u[2]
    end""")
    u0 = [1.05767027/3, 1.030713491/3]
    
    h = de.seval("""
    function h(p,t)
      [1.05767027/3, 1.030713491/3]
    end""")
    
    tspan = (0.0, 100.0)
    constant_lags = [20.0]
    prob = de.DDEProblem(f,u0,h,tspan,constant_lags=constant_lags)
    sol = de.solve(prob,saveat=0.1)  # <-- Fails here

Root Cause Analysis

This appears to be a type system incompatibility in the Julia DelayDiffEq solver, specifically:

  1. The default algorithm uses CompositeAlgorithm with automatic switching between multiple solvers (Tsit5, Vern7, Rosenbrock23, Rodas5P, FBDF)
  2. There's a type mismatch when trying to convert between different cache types during algorithm switching
  3. The error involves ForwardDiff.Tag{DiffEqBase.OrdinaryDiffEqTag, Float64} vs ForwardDiff.Tag{..., Nothing} - suggesting an autodiff configuration mismatch
  4. This is likely caused by a recent upstream change in one of the Julia packages (DelayDiffEq, OrdinaryDiffEq, ForwardDiff, or ADTypes)

Suggested Fix Approaches

  1. Pin Julia package versions - Identify which recent Julia package update broke compatibility
  2. Specify explicit algorithm - Update the test to use an explicit DDE solver instead of relying on automatic algorithm selection
  3. Update DelayDiffEq - The issue may be fixed in a newer version (or may have been introduced by a newer version)
  4. Disable autodiff - Try passing autodiff=false to the solver

Link to Failed CI Run

Additional Context

This was discovered during an automated CI health check on the master branch. The test was passing previously, indicating this is a regression likely caused by upstream Julia package updates.

Test Summary from CI:

1 failed, 3 passed, 5 skipped in 1796.15s (0:29:56)

cc @ChrisRackauckas

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions