[
https://issues.apache.org/jira/browse/OPENNLP-1472?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17692723#comment-17692723
]
ASF GitHub Bot commented on OPENNLP-1472:
-----------------------------------------
mawiesne opened a new pull request, #88:
URL: https://github.com/apache/opennlp-sandbox/pull/88
- adjusts parameter alpha in GradientDescentUtilsTest from `0.00002` to
`0.00001`
- aforementioned param change results in stable convergence, checked via
RepeatedTest (JUnit)
- optimizes how random values are obtained in `GradientDescentUtils`
- fixes a potentially unpredictable BigDecimal value in
`AnomalyDetectionUtils` (see JavaDoc of that constructor)
Thank you for contributing to Apache OpenNLP.
In order to streamline the review of the contribution we ask you
to ensure the following steps have been taken:
### For all changes:
- [x] Is there a JIRA ticket associated with this PR? Is it referenced
in the commit message?
- [x] Does your PR title start with OPENNLP-XXXX where XXXX is the JIRA
number you are trying to resolve? Pay particular attention to the hyphen "-"
character.
- [x] Has your PR been rebased against the latest commit within the target
branch (typically main)?
- [x] Is your initial contribution a single, squashed commit?
### For code changes:
- [x] Have you ensured that the full suite of tests is executed via `mvn
clean install` at the root opennlp-sandbox folder?
- [x] Have you written or updated unit tests to verify your changes?
- [ ] If adding new dependencies to the code, are these dependencies
licensed in a way that is compatible for inclusion under [ASF
2.0](https://www.apache.org/legal/resolved.html#category-a)?
- [ ] If applicable, have you updated the LICENSE file, including the main
LICENSE file in opennlp-sandbox folder?
- [ ] If applicable, have you updated the NOTICE file, including the main
NOTICE file found in opennlp-sandbox folder?
### For documentation related changes:
- [x] Have you ensured that format looks appropriate for the output in which
it is rendered?
### Note:
Please ensure that once the PR is submitted, you check GitHub Actions for
build issues and submit an update to your PR as soon as possible.
> Fix flaky (sub-) test of GradientDescentUtilsTest in sandbox component
> 'nlp-utils'
> ----------------------------------------------------------------------------------
>
> Key: OPENNLP-1472
> URL: https://issues.apache.org/jira/browse/OPENNLP-1472
> Project: OpenNLP
> Issue Type: Test
> Affects Versions: 2.1.1
> Reporter: Martin Wiesner
> Assignee: Martin Wiesner
> Priority: Major
>
> A flaky test has been discovered with recent modernizations of the sandbox
> components. It lives in 'nlp-utils' and the problem signals a fragile test
> setup or potentially numerical instabilities:
> {quote}Error:
> org.apache.opennlp.utils.regression.GradientDescentUtilsTest.testConvergence
> Time elapsed: 1.156 s <<< ERROR!
> [3270|https://github.com/apache/opennlp-sandbox/actions/runs/4177895676/jobs/7296072329#step:5:3271]java.lang.RuntimeException:
> failed to converge at iteration 75129 with cost going from 5.010577258277822
> to 5.010577258277823
> [3271|https://github.com/apache/opennlp-sandbox/actions/runs/4177895676/jobs/7296072329#step:5:3272]
> at
> org.apache.opennlp.utils.regression.GradientDescentUtilsTest.testConvergence(GradientDescentUtilsTest.java:34)
> {quote}
> The problem (sometimes) occurs on different platforms / environments (Win,
> Lin, Mac).
> Aims:
> * Investigate the cause of the flakyness
> * Fix the test (environment / setup) so it runs reliably.
--
This message was sent by Atlassian Jira
(v8.20.10#820010)