Bug#926813: unblock: python-scipy/1.1.0-6

2019-04-11 Thread Drew Parsons

On 2019-04-12 11:43, Drew Parsons wrote:


python-scipy/1.1.0-7 is now uploaded.


Here's the debdiff

$ debdiff python-scipy_1.1.0-4.dsc python-scipy_1.1.0-7.dsc
diff -Nru python-scipy-1.1.0/debian/changelog 
python-scipy-1.1.0/debian/changelog
--- python-scipy-1.1.0/debian/changelog	2019-03-14 14:12:00.0 
+0800
+++ python-scipy-1.1.0/debian/changelog	2019-04-12 00:46:35.0 
+0800

@@ -1,3 +1,27 @@
+python-scipy (1.1.0-7) unstable; urgency=medium
+
+  * Team upload.
+  * Patch fix_test_optim_canonical~onstraint_2d7e7e8c.patch applies
+upstream patch 2d7e7e8 to fix occasional random failures in
+test_canonical_constraint.test_concatenation.
+
+ -- Drew Parsons   Fri, 12 Apr 2019 00:46:35 +0800
+
+python-scipy (1.1.0-6) unstable; urgency=medium
+
+  * Team upload.
+  * skip sparsetools.TestInt32Overflow matvec tests on python3 also.
+
+ -- Drew Parsons   Thu, 11 Apr 2019 09:38:17 +0800
+
+python-scipy (1.1.0-5) unstable; urgency=medium
+
+  * Team upload.
+  * Skip sparsetools.TestInt32Overflow matvec tests on python2
+(MemoryError). Closes: #919929.
+
+ -- Drew Parsons   Wed, 10 Apr 2019 16:41:47 +0800
+
 python-scipy (1.1.0-4) unstable; urgency=medium

   * Team upload.
diff -Nru 
python-scipy-1.1.0/debian/patches/fix_test_optim_canonical_constraint_2d7e7e8c.patch 
python-scipy-1.1.0/debian/patches/fix_test_optim_canonical_constraint_2d7e7e8c.patch
--- 
python-scipy-1.1.0/debian/patches/fix_test_optim_canonical_constraint_2d7e7e8c.patch	1970-01-01 
08:00:00.0 +0800
+++ 
python-scipy-1.1.0/debian/patches/fix_test_optim_canonical_constraint_2d7e7e8c.patch	2019-04-12 
00:46:35.0 +0800

@@ -0,0 +1,37 @@
+From 2d7e7e8c6142e8925c44f92f6839147690880e7d Mon Sep 17 00:00:00 2001
+From: Warren Weckesser 
+Date: Wed, 10 Apr 2019 14:20:40 -0400
+Subject: [PATCH] BUG/TST: optimize: Fix a test that occasionally raises 
an

+ exception.
+
+The test `test_initial_constraints_as_canonical()` in
+scipy/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py
+occasionally raises an exception when it is run, because the random 
initial
+value `x0` that it generates does not satisfy the nonlinear constraint 
used

+in the test.  To avoid this, use a fixed `x0` instead of generating it
+randomly.
+
+Closes gh-9308.
+---
+ .../_trustregion_constr/tests/test_canonical_constraint.py | 7 +--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+diff --git 
a/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py 
b/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py

+index 3ac51b6faa8..589f32f1aee 100644
+--- 
a/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py
 
b/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py

+@@ -234,9 +234,12 @@ def test_empty():
+
+
+ def test_initial_constraints_as_canonical():
++# rng is only used to generate the coefficients of the quadratic
++# function that is used by the nonlinear constraint.
+ rng = np.random.RandomState(0)
+-n = 4
+-x0 = np.random.rand(n)
++
++x0 = np.array([0.5, 0.4, 0.3, 0.2])
++n = len(x0)
+
+ lb1 = [-1, -np.inf, -2, 3]
+ ub1 = [1, np.inf, np.inf, 3]
diff -Nru python-scipy-1.1.0/debian/patches/series 
python-scipy-1.1.0/debian/patches/series
--- python-scipy-1.1.0/debian/patches/series	2019-03-14 
14:12:00.0 +0800
+++ python-scipy-1.1.0/debian/patches/series	2019-04-12 
00:46:35.0 +0800

@@ -4,3 +4,4 @@
 matrix_API_614847c5.patch
 matrix_API_more_e0cfa29e2.patch
 matrix_API_filter_check_87e48c3c5.patch
+fix_test_optim_canonical_constraint_2d7e7e8c.patch
diff -Nru python-scipy-1.1.0/debian/tests/python2 
python-scipy-1.1.0/debian/tests/python2
--- python-scipy-1.1.0/debian/tests/python2	2019-03-14 
14:12:00.0 +0800
+++ python-scipy-1.1.0/debian/tests/python2	2019-04-12 
00:46:35.0 +0800

@@ -27,6 +27,9 @@
 
"sparse.tests.test_sparsetools.TestInt32Overflow.test_bsr_n_block[matmat]",
 
"sparse.tests.test_sparsetools.TestInt32Overflow.test_bsr_n_block[matvecs]",
 
"sparse.tests.test_sparsetools.TestInt32Overflow.test_bsr_n_block[transpose]",

+# postscriptum on Bug#919929
+"sparse.tests.test_sparsetools.TestInt32Overflow.test_matvecs",
+"sparse.tests.test_sparsetools.TestInt32Overflow.test_dia_matvec",
 ]

 junit = "$TMPDIR/junit.xml"
diff -Nru python-scipy-1.1.0/debian/tests/python3 
python-scipy-1.1.0/debian/tests/python3
--- python-scipy-1.1.0/debian/tests/python3	2019-03-14 
14:12:00.0 +0800
+++ python-scipy-1.1.0/debian/tests/python3	2019-04-12 
00:46:35.0 +0800

@@ -19,6 +19,9 @@
 "linalg.tests.test_solvers.test_solve_generalized_discrete_are",
 # fails with atlas
 "linalg.tests.test_solvers.test_solve_discrete_are",
+# postscriptum on Bug#919929
+"sparse.tests.test_sparsetools.TestInt32Overflow.test_matvecs",
+"sparse.tests.test_sparsetools.TestInt32Overflow.test_dia_matvec",
 ]

 junit = "$TMPDIR/junit.xml"



Bug#926813: unblock: python-scipy/1.1.0-6

2019-04-11 Thread Drew Parsons

On 2019-04-12 00:25, Paul Gevers wrote:



E   ValueError: `x0` is infeasible with respect to some
inequality constraint with `keep_feasible` set to True.


Upstream noticed it too,
https://github.com/scipy/scipy/issues/9308

It's a small patch. Should we apply it in a python-scipy/1.1.0-7  ?


Yes please.



python-scipy/1.1.0-7 is now uploaded.



Bug#926813: unblock: python-scipy/1.1.0-6

2019-04-11 Thread Paul Gevers
Hi Drew,

On 11-04-2019 17:49, Drew Parsons wrote:
> On 2019-04-11 23:41, Drew Parsons wrote:
>>
>> The one failure is odd.  It's not in the same class as previous test
>> failures, not a MemoryError.
> ...
>> E   ValueError: `x0` is infeasible with respect to some
>> inequality constraint with `keep_feasible` set to True.
> 
> Upstream noticed it too,
> https://github.com/scipy/scipy/issues/9308
> 
> The randomness of the failure happens because the value is randomly
> generated.
> 
> Apparently fixed with
> https://github.com/scipy/scipy/pull/10046/commits/2d7e7e8c6142e8925c44f92f6839147690880e7d
> 
> 
> It's a small patch. Should we apply it in a python-scipy/1.1.0-7  ?

Yes please.

Paul



signature.asc
Description: OpenPGP digital signature


Bug#926813: unblock: python-scipy/1.1.0-6

2019-04-11 Thread Drew Parsons

On 2019-04-11 23:41, Drew Parsons wrote:


The one failure is odd.  It's not in the same class as previous test
failures, not a MemoryError.

...

E   ValueError: `x0` is infeasible with respect to some
inequality constraint with `keep_feasible` set to True.


Upstream noticed it too,
https://github.com/scipy/scipy/issues/9308

The randomness of the failure happens because the value is randomly 
generated.


Apparently fixed with 
https://github.com/scipy/scipy/pull/10046/commits/2d7e7e8c6142e8925c44f92f6839147690880e7d


It's a small patch. Should we apply it in a python-scipy/1.1.0-7  ?



Bug#926813: unblock: python-scipy/1.1.0-6

2019-04-11 Thread Drew Parsons

On 2019-04-11 10:54, Drew Parsons wrote:

On 2019-04-11 04:38, Paul Gevers wrote:


The score isn't great (and not all results are in): 3/14 failure (2 in
unstable, 1 in testing so far). Can you please have a look?



Apparently the same test failure does occur in python3 tests, but only
some of the time not all of the time.  Weird.

I've uploaded 1.1.0-6 now to skip the same 2 tests in python3.



1.1.0-6 puts us in the clear with respect to the MemoryError failures.

10/10 test runs passed in unstable

9/10 test runs passed in testing.


The one failure is odd.  It's not in the same class as previous test 
failures, not a MemoryError.


It appears to be a true test failure, failing 
_trustregion_constr.tests.test_canonical_constraint.test_concatenation
in 
/usr/lib/python2.7/dist-packages/scipy/optimize/_trustregion_constr/tests/test_canonical_constraint.py:179 
with


if np.any(f0[mask] < lb[mask]) or np.any(f0[mask] > ub[mask]):

  raise ValueError("`x0` is infeasible with respect to some "
 "inequality constraint with `keep_feasible` 
"

 "set to True.")
E   ValueError: `x0` is infeasible with respect to some 
inequality constraint with `keep_feasible` set to True.




This happens in the atlas tests (atlas provides lapack/blas), which is 
not core scipy as such, since lapack can be provided by openblas.


This particular failure only happened once.