Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Another unstable doctest in hmm/chmm.pyx #33880

Open
dcoudert opened this issue May 21, 2022 · 0 comments
Open

Another unstable doctest in hmm/chmm.pyx #33880

dcoudert opened this issue May 21, 2022 · 0 comments

Comments

@dcoudert
Copy link
Contributor

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]

CC: @orlitzky @mwageringel

Component: doctest framework

Issue created by migration from https://trac.sagemath.org/ticket/33880

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants