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

Unstable doctest in hmm/chmm.pyx #32890

Closed
kliem opened this issue Nov 17, 2021 · 9 comments
Closed

Unstable doctest in hmm/chmm.pyx #32890

kliem opened this issue Nov 17, 2021 · 9 comments

Comments

@kliem
Copy link
Contributor

kliem commented Nov 17, 2021

Part of #32544:

sage -t --long --warn-long 42.1 --random-seed=30462179883676183063850454726642654182 src/sage/stats/hmm/chmm.pyx
**********************************************************************
File "src/sage/stats/hmm/chmm.pyx", line 136, in sage.stats.hmm.chmm.GaussianHiddenMarkovModel
Failed example:
    try:
        p, s = m.baum_welch(obs)
        assert p > log_likelihood
        assert (4 <= s < 200)
    except RuntimeError:
        pass
Exception raised:
    Traceback (most recent call last):
      File "/home/jonathan/Applications/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 694, in _run
        self.compile_and_execute(example, compiler, test.globs)
      File "/home/jonathan/Applications/sage/local/lib/python3.8/site-packages/sage/doctest/forker.py", line 1088, in compile_and_execute
        exec(compiled, globs)
      File "<doctest sage.stats.hmm.chmm.GaussianHiddenMarkovModel[12]>", line 4, in <module>
        assert (Integer(4) <= s < Integer(200))
    AssertionError
**********************************************************************
1 item had failures:
   1 of  15 in sage.stats.hmm.chmm.GaussianHiddenMarkovModel
    [119 tests, 1 failure, 0.53 s]

Depends on #32907

CC: @orlitzky

Component: doctest framework

Author: Michael Orlitzky

Branch/Commit: 657a861

Reviewer: Markus Wageringel

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

@kliem kliem added this to the sage-9.5 milestone Nov 17, 2021
@mkoeppe mkoeppe modified the milestones: sage-9.5, sage-9.6 Dec 18, 2021
@orlitzky
Copy link
Contributor

comment:2

The return value s here is a number of iterations, and should probably lie between zero (or maybe one) and the max_iter of the baum_welch() method, inclusive.

@orlitzky
Copy link
Contributor

Commit: 657a861

@orlitzky
Copy link
Contributor

Last 10 new commits:

bb1f741build/pkgs/singular/spkg-install.in: Remove workaround for make paralellization bugs
2673632Port to API changes in singular 4.2.1p2
720d10eUpdate tests for singular 4.2.1p2
cca353bsrc/sage/rings/polynomial/hilbert.pyx: Fix doctest markup
8c6c949build/pkgs/flint/: Add patch for threads with GCC < 4.9
eea6328build/pkgs/singular/spkg-install.in: singular.hlp -> singular.info
a137b7eMerge tag '9.5.beta8' into t/32907/update_singular_to_4_2_1p2
0856554build/pkgs/singular: Update to 4.2.1p3
e1c448eMerge commit '0856554' into develop
657a861Trac #32890: fix a failing random doctest in sage.stats.hmm.chmm.

@orlitzky
Copy link
Contributor

Author: Michael Orlitzky

@orlitzky
Copy link
Contributor

Branch: u/mjo/ticket/32890

@mwageringel
Copy link

Dependencies: #32907

@mwageringel
Copy link

Reviewer: Markus Wageringel

@mwageringel
Copy link

comment:4

The last commit looks good to me. Let me add the dependency for completeness.

@vbraun
Copy link
Member

vbraun commented Jan 31, 2022

Changed branch from u/mjo/ticket/32890 to 657a861

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

5 participants