owl icon indicating copy to clipboard operation
owl copied to clipboard

Test failure in AD

Open jzstark opened this issue 5 years ago • 4 comments

I've submitted a PR to opam-repository to add the OCaml v1.0.1 to opam, but currently the test seems to fail on OCaml 4.11 at the sylvester function:

# ┌──────────────────────────────────────────────────────────────────────────────┐
# │ [FAIL]        algodiff matrix              0   reverse mode.                 │
# └──────────────────────────────────────────────────────────────────────────────┘
# [failure] 
# failed reverse mode operations
#        sylvester (1/20)
# 
# Logs saved to `~/.opam/4.11/.opam-switch/build/owl.1.0.1/_build/default/test/_build/_tests/Owl/algodiff matrix.000.output'.
#  ──────────────────────────────────────────────────────────────────────────────
# 
# Full test results in `~/.opam/4.11/.opam-switch/build/owl.1.0.1/_build/default/test/_build/_tests/Owl'.
# 1 failure! in 2.000s. 1396 tests run.

Also accordingly to this log, unittest also fails for the discrete_lyapunov2 function.

Do we know how to fix this issue? @tachukao

jzstark avatar Jan 03 '21 01:01 jzstark

@jzstark This looks like an error due to the finite difference approximations that we make, as only 1 out of 20 random initialisations failed. Theses tests pass locally for me. Is there a way to trigger the test again with opam? @mseri, any thoughts?

tachukao avatar Jan 03 '21 05:01 tachukao

sylvester fails randomly. Does it use randomly generated inputs? If so, one temporary solution is using fixed inputs.

ryanrhymes avatar Jan 03 '21 14:01 ryanrhymes

That's a good idea. I just made a PR #567, fixing the random seed for the AD unit tests.

tachukao avatar Jan 03 '21 15:01 tachukao

Should we close this or we want to keep it open to think about an improvement for the tests?

mseri avatar Jan 04 '21 13:01 mseri