Optimization v3.16.0 errors in precompile

Julia Version 1.9.2
Optimization v3.16.0

Two errors are present
│ ┌ Error: Error during loading of extension OptimizationSparseFinitediffExt of Optimization, use `Base.retry_load_extensions()` to retry.

│ ┌ Error: Error during loading of extension OptimizationSparseForwarddiffExt of Optimization, use `Base.retry_load_extensions()` to retry.

Then did
test Optimization

This resulted in many warnings of deprecated functions e.g.

┌ Warning: `ADAM` is deprecated, use `Adam` instead. │ caller = top-level scope at ADtests.jl:449 └ @ Core ~/.julia/packages/Optimization/HPEh3/test/ADtests.jl:449

As well as errors, the two above and this one:

DiffEqFlux: Test Failed at ~/.julia/packages/Optimization/HPEh3/test/diffeqfluxtests.jl:113
Expression: result_neuralode2.objective < 10
Evaluated: 10.487717f0 < 10

Then it stops testing.
Is this error expected?
Is it related to the precompile errors?

That’s unrelated. That test can randomly error sometimes due to bad initializations of the neural network. I wouldn’t be too worried aobut that.

Thank you for your response.
Does this mean the error threshold is too tight?
Is there something I can do to improve the initialization?

Probably. We should probably make the test use multiple initializations or something to make it more robust.