Opened 7 weeks ago

Last modified 7 weeks ago

#33880 new defect

Another unstable doctest in hmm/chmm.pyx

Reported by: dcoudert Owned by:
Priority: major Milestone: sage-9.7
Component: doctest framework Keywords:
Cc: mjo, gh-mwageringel Merged in:
Authors: Reviewers:
Report Upstream: N/A Work issues:
Branch: Commit:
Dependencies: Stopgaps:

Status badges

Description

Part of #32544:

sage -t --long --warn-long 290.4 --random-seed=183864609767555539161467171885435430800 src/sage/stats/hmm/chmm.pyx
**********************************************************************
File "src/sage/stats/hmm/chmm.pyx", line 905, in sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?
Failed example:
    l = stats.TimeSeries([m.baum_welch(v,max_iter=1)[0] for _ in range(len(v))])
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?[10]>", line 1, in <module>
        l = stats.TimeSeries([m.baum_welch(v,max_iter=Integer(1))[Integer(0)] for _ in range(len(v))])
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?[10]>", line 1, in <listcomp>
        l = stats.TimeSeries([m.baum_welch(v,max_iter=Integer(1))[Integer(0)] for _ in range(len(v))])
      File "sage/stats/hmm/chmm.pyx", line 968, in sage.stats.hmm.chmm.GaussianHiddenMarkovModel.baum_welch (build/cythonized/sage/stats/hmm/chmm.c:6510)
        raise RuntimeError("unable to re-estimate transition matrix")
    RuntimeError: unable to re-estimate transition matrix
**********************************************************************
File "src/sage/stats/hmm/chmm.pyx", line 906, in sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?
Failed example:
    all(l[i] <= l[i+1] + 0.0001 for i in range(9))
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?[11]>", line 1, in <module>
        all(l[i] <= l[i+Integer(1)] + RealNumber('0.0001') for i in range(Integer(9)))
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?[11]>", line 1, in <genexpr>
        all(l[i] <= l[i+Integer(1)] + RealNumber('0.0001') for i in range(Integer(9)))
    NameError: name 'l' is not defined
**********************************************************************
File "src/sage/stats/hmm/chmm.pyx", line 908, in sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?
Failed example:
    l  # random
Exception raised:
    Traceback (most recent call last):
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 695, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/Users/dcoudert/sage/local/var/lib/sage/venv-python3.9/lib/python3.9/site-packages/sage/doctest/forker.py", line 1093, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?[12]>", line 1, in <module>
        l  # random
    NameError: name 'l' is not defined
**********************************************************************
1 item had failures:
   3 of  21 in sage.stats.hmm.chmm.GaussianHiddenMarkovModel.?
    [119 tests, 3 failures, 1.77 s]

Change History (1)

comment:1 Changed 7 weeks ago by dcoudert

  • Cc mjo gh-mwageringel added
Note: See TracTickets for help on using tickets.