[theano] 02/03: Only remove the privacy-violating part of index.txt, refresh patches

Rebecca Palmer rnpalmer-guest at moszumanska.debian.org
Mon Sep 18 21:42:25 UTC 2017


This is an automated email from the git hooks/post-receive script.

rnpalmer-guest pushed a commit to branch master
in repository theano.

commit 3787852e78b6a0ce161a9856fe516a7770bb135f
Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
Date:   Mon Sep 18 22:21:11 2017 +0100

    Only remove the privacy-violating part of index.txt, refresh patches
---
 debian/changelog                                   |   9 ++
 ...disable-overly-environment-dependent-test.patch |   5 +-
 ...ix-invalid-casts-negative-stride-handling.patch | 108 ---------------------
 .../fix-test_fit_int64-for-python3-32bit.patch     |  21 ----
 debian/patches/fixes-for-numpy-1.12.patch          |  80 ---------------
 debian/patches/series                              |   3 -
 debian/patches/strip-docs.patch                    |  92 ++----------------
 7 files changed, 18 insertions(+), 300 deletions(-)

diff --git a/debian/changelog b/debian/changelog
index eec2d63..249ea68 100644
--- a/debian/changelog
+++ b/debian/changelog
@@ -1,3 +1,12 @@
+theano (0.9.0-1) UNRELEASED; urgency=medium
+
+  * New upstream release.
+  * Drop patches applied upstream, refresh others.
+  * Only remove the privacy-violating part of doc/index.txt,
+    not all of News and Download.
+
+ -- Rebecca N. Palmer <rebecca_palmer at zoho.com>  Mon, 18 Sep 2017 22:15:10 +0100
+
 theano (0.8.2-6) unstable; urgency=medium
 
   * Upload to unstable.
diff --git a/debian/patches/disable-overly-environment-dependent-test.patch b/debian/patches/disable-overly-environment-dependent-test.patch
index dad3101..42ae053 100644
--- a/debian/patches/disable-overly-environment-dependent-test.patch
+++ b/debian/patches/disable-overly-environment-dependent-test.patch
@@ -5,11 +5,9 @@ Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
 Bug-Debian: https://bugs.debian.org/835531
 Forwarded: not-needed
 
-diff --git a/theano/sparse/tests/test_basic.py b/theano/sparse/tests/test_basic.py
-index 8c183b9..03d79f1 100644
 --- a/theano/sparse/tests/test_basic.py
 +++ b/theano/sparse/tests/test_basic.py
-@@ -1209,8 +1209,8 @@ class test_structureddot(unittest.TestCase):
+@@ -1292,8 +1292,8 @@ class test_structureddot(unittest.TestCa
              overhead_tol = 0.002  # seconds
              overhead_rtol = 1.1  # times as long
              utt.assert_allclose(scipy_result, theano_result)
@@ -20,4 +18,3 @@ index 8c183b9..03d79f1 100644
                      self.assertFalse(
                          theano_time > overhead_rtol * scipy_time + overhead_tol,
                          (theano_time,
-
diff --git a/debian/patches/fix-invalid-casts-negative-stride-handling.patch b/debian/patches/fix-invalid-casts-negative-stride-handling.patch
deleted file mode 100644
index c789a92..0000000
--- a/debian/patches/fix-invalid-casts-negative-stride-handling.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-Description: Fix invalid casts and negative stride handling
- Cast values, not pointers, from int64 to int32. Remember that
- first-in-index order (numpy) and first-in-memory-order (BLAS) are
- not always the same thing. Bump c_code_cache_version to make sure
- existing installs use the fixes.
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-Bug-Debian: https://bugs.debian.org/855102 https://bugs.debian.org/831541
-Forwarded: no
-
-diff --git a/theano/sparse/opt.py b/theano/sparse/opt.py
-index 6100405..d1c2b54 100644
---- a/theano/sparse/opt.py
-+++ b/theano/sparse/opt.py
-@@ -829,7 +829,11 @@ class UsmmCscDense(gof.Op):
-             npy_intp Sind = PyArray_STRIDES(%(x_ind)s)[0] / PyArray_DESCR(%(x_ind)s)->elsize;
-             npy_intp Sptr = PyArray_STRIDES(%(x_ptr)s)[0] / PyArray_DESCR(%(x_ptr)s)->elsize;
-             npy_intp Sy = PyArray_STRIDES(%(y)s)[1] / PyArray_DESCR(%(y)s)->elsize;
--
-+            
-+            // blas expects ints; convert here (rather than just making N etc ints) to avoid potential overflow in the negative-stride correction
-+            int N32 = N;
-+            int Sy32 = Sy;
-+            int Szn32 = Szn;
- 
-             if (!(%(inplace)s))
-             {
-@@ -859,7 +863,7 @@ class UsmmCscDense(gof.Op):
-                     if (Szn < 0)
-                         z_row += (N - 1) * Szn;
- 
--                    %(axpy)s((int*)&N, (%(conv_type)s*)&Amk, (%(conv_type)s*)y_row, (int*)&Sy, (%(conv_type)s*)z_row, (int*)&Szn);
-+                    %(axpy)s(&N32, (%(conv_type)s*)&Amk, (%(conv_type)s*)y_row, &Sy32, (%(conv_type)s*)z_row, &Szn32);
-                 }
-             }
-         }
-@@ -868,7 +872,7 @@ class UsmmCscDense(gof.Op):
-         return rval
- 
-     def c_code_cache_version(self):
--        return (1, blas.blas_header_version())
-+        return (1, blas.blas_header_version(), 0xdeb1a)
- usmm_csc_dense = UsmmCscDense(inplace=False)
- usmm_csc_dense_inplace = UsmmCscDense(inplace=True)
- 
-@@ -1748,7 +1752,7 @@ class SamplingDotCSR(gof.Op):
-         ])
- 
-     def c_code_cache_version(self):
--        return (2, blas.blas_header_version())
-+        return (2, blas.blas_header_version(), 0xdeb1a)
- 
-     def c_support_code(self):
-         return blas.blas_header_text()
-@@ -1891,6 +1895,11 @@ PyErr_SetString(PyExc_NotImplementedError, "rank(y) != 2"); %(fail)s;}
-             memcpy(Dzi, Dpi, PyArray_DIMS(%(p_ind)s)[0]*sizeof(dtype_%(p_ind)s));
-             memcpy(Dzp, Dpp, PyArray_DIMS(%(p_ptr)s)[0]*sizeof(dtype_%(p_ptr)s));
- 
-+            // blas expects ints; convert here (rather than just making K etc ints) to avoid potential overflow in the negative-stride correction
-+            int K32 = K;
-+            int Sdx32 = Sdx;
-+            int Sdy32 = Sdy;
-+
-             for (npy_int32 m = 0; m < M; ++m) {
-                 for (npy_int32 n_idx = Dpp[m * Sdpp]; n_idx < Dpp[(m+1)*Sdpp]; ++n_idx) {
-                     const npy_int32 n = Dpi[n_idx * Sdpi]; // row index of non-null value for column K
-@@ -1898,8 +1907,15 @@ PyErr_SetString(PyExc_NotImplementedError, "rank(y) != 2"); %(fail)s;}
-                     const dtype_%(x)s* x_row = (dtype_%(x)s*)(PyArray_BYTES(%(x)s) + PyArray_STRIDES(%(x)s)[0] * m);
- 
-                     const dtype_%(y)s* y_col = (dtype_%(y)s*)(PyArray_BYTES(%(y)s) + PyArray_STRIDES(%(y)s)[0] * n);
-+                    // dot expects pointer to the beginning of memory arrays,
-+                    // so when the stride is negative, we need to get the
-+                    // last element
-+                    if (Sdx < 0)
-+                        x_row += (K - 1) * Sdx;
-+                    if (Sdy < 0)
-+                        y_col += (K - 1) * Sdy;
- 
--                    Dzd[n_idx * Sdzd] = Dpd[n_idx * Sdpd] * %(cdot)s((int*)&K, (const %(conv_type)s*)x_row, (int*)&Sdx, (const %(conv_type)s*)y_col, (int*)&Sdy);
-+                    Dzd[n_idx * Sdzd] = Dpd[n_idx * Sdpd] * %(cdot)s(&K32, (const %(conv_type)s*)x_row, &Sdx32, (const %(conv_type)s*)y_col, &Sdy32);
-                 }
-             }
-         }
-diff --git a/theano/sparse/tests/test_basic.py b/theano/sparse/tests/test_basic.py
-index 8c183b9..03d79f1 100644
---- a/theano/sparse/tests/test_basic.py
-+++ b/theano/sparse/tests/test_basic.py
-@@ -3085,6 +3085,20 @@ class SamplingDotTester(utt.InferShapeTester):
-         assert tested.format == 'csr'
-         assert tested.dtype == expected.dtype
- 
-+    def test_negative_stride(self):
-+        f = theano.function(
-+            self.x,
-+            sampling_dot(*self.x))
-+
-+        a2 = [self.a[0][::-1,:], self.a[1][:,::-1], self.a[2]]
-+        tested = f(*a2)
-+        x, y, p = a2
-+        expected = p.multiply(numpy.dot(x, y.T))
-+
-+        utt.assert_allclose(as_ndarray(expected), tested.toarray())
-+        assert tested.format == 'csr'
-+        assert tested.dtype == expected.dtype
-+
-     def test_infer_shape(self):
-         self._compile_and_check(self.x,
-                                 [sampling_dot(*self.x)],
-
diff --git a/debian/patches/fix-test_fit_int64-for-python3-32bit.patch b/debian/patches/fix-test_fit_int64-for-python3-32bit.patch
deleted file mode 100644
index 46425d1..0000000
--- a/debian/patches/fix-test_fit_int64-for-python3-32bit.patch
+++ /dev/null
@@ -1,21 +0,0 @@
-Description: fix for the tests passing on python3 on i386
-Bug-Debian: https://bugs.debian.org/831540
-Forwarded: https://github.com/Theano/Theano/issues/5498
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-
---- a/theano/tensor/tests/test_basic.py
-+++ b/theano/tensor/tests/test_basic.py
-@@ -6672,11 +6672,11 @@
-             assert scalar_ct.value == val
- 
-             vector_ct = constant([val, val])
--            assert vector_ct.dtype == 'int64'
-+            assert vector_ct.dtype in ('int32','int64')
-             assert numpy.all(vector_ct.value == val)
- 
-             matrix_ct = constant([[val, val]])
--            assert matrix_ct.dtype == 'int64'
-+            assert matrix_ct.dtype in ('int32','int64')
-             assert numpy.all(matrix_ct.value == val)
- 
-     def test_too_big(self):
diff --git a/debian/patches/fixes-for-numpy-1.12.patch b/debian/patches/fixes-for-numpy-1.12.patch
deleted file mode 100644
index 9845fd4..0000000
--- a/debian/patches/fixes-for-numpy-1.12.patch
+++ /dev/null
@@ -1,80 +0,0 @@
-Description: fix tests for Numpy 1.12
- Collected fixes for passing Theano 0.8.2 tests with Numpy 1.12. Partly taken
- from upstream repo, plus changes by Rebecca Palmer.
-Bug: https://github.com/Theano/Theano/issues/5396
-Bug-Debian: https://bugs.debian.org/848764
-Origin: https://github.com/Theano/Theano/commit/e8e01f4
-Author: Rebecca N. Palmer <rebecca_palmer at zoho.com>
-
---- a/theano/sparse/tests/test_sp2.py
-+++ b/theano/sparse/tests/test_sp2.py
-@@ -61,7 +61,7 @@
- 
- 
- class BinomialTester(utt.InferShapeTester):
--    n = tensor.scalar()
-+    n = tensor.scalar(dtype='int64')
-     p = tensor.scalar()
-     shape = tensor.lvector()
-     _n = 5
---- a/theano/tensor/tests/test_elemwise.py
-+++ b/theano/tensor/tests/test_elemwise.py
-@@ -414,7 +414,11 @@
-                     zv = numpy.bitwise_or.reduce(zv, axis)
-             elif scalar_op == scalar.and_:
-                 for axis in reversed(sorted(tosum)):
--                    zv = numpy.bitwise_and.reduce(zv, axis)
-+                    if zv.shape[axis] == 0:
-+                        # Theano and old numpy use +1 as 'AND of no elements', new numpy uses -1
-+                        zv = numpy.abs(numpy.bitwise_and.reduce(zv, axis).astype('int8'))
-+                    else:
-+                        zv = numpy.bitwise_and.reduce(zv, axis)
-             elif scalar_op == scalar.xor:
-                 # There is no identity value for the xor function
-                 # So we can't support shape of dimensions 0.
---- a/theano/tensor/tests/test_extra_ops.py
-+++ b/theano/tensor/tests/test_extra_ops.py
-@@ -135,7 +135,7 @@
-     def test_bincountFn(self):
-         w = T.vector('w')
-         def ref(data, w=None, minlength=None):
--            size = data.max() + 1
-+            size = int(data.max()) + 1
-             if minlength:
-                 size = max(size, minlength)
-             if w is not None:
---- a/theano/sparse/sandbox/sp2.py
-+++ b/theano/sparse/sandbox/sp2.py
-@@ -4,6 +4,7 @@
- import scipy.sparse
- 
- from theano import gof, tensor
-+from theano.tensor import discrete_dtypes, float_dtypes
- from theano.tensor.opt import register_specialize
- from theano.sparse.basic import (
-     as_sparse_variable, SparseType, add_s_s, neg,
-@@ -115,6 +116,11 @@
-         n = tensor.as_tensor_variable(n)
-         p = tensor.as_tensor_variable(p)
-         shape = tensor.as_tensor_variable(shape)
-+
-+        assert n.dtype in discrete_dtypes
-+        assert p.dtype in float_dtypes
-+        assert shape.dtype in discrete_dtypes
-+
-         return gof.Apply(self, [n, p, shape],
-                          [SparseType(dtype=self.dtype,
-                                      format=self.format)()])
---- a/theano/tensor/signal/tests/test_pool.py
-+++ b/theano/tensor/signal/tests/test_pool.py
-@@ -34,8 +34,8 @@
-             if input.shape[-1] % ds[1]:
-                 yi += 1
-         out_shp = list(input.shape[:-2])
--        out_shp.append(input.shape[-2] / ds[0] + xi)
--        out_shp.append(input.shape[-1] / ds[1] + yi)
-+        out_shp.append(input.shape[-2] // ds[0] + xi)
-+        out_shp.append(input.shape[-1] // ds[1] + yi)
-         output_val = numpy.zeros(out_shp)
-         func = numpy.max
-         if mode == 'sum':
diff --git a/debian/patches/series b/debian/patches/series
index 3fe0b49..e6c4e08 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -1,5 +1,2 @@
-fix-invalid-casts-negative-stride-handling.patch
 disable-overly-environment-dependent-test.patch
-fixes-for-numpy-1.12.patch
 strip-docs.patch
-fix-test_fit_int64-for-python3-32bit.patch
diff --git a/debian/patches/strip-docs.patch b/debian/patches/strip-docs.patch
index 2ca5843..fd6b0a4 100644
--- a/debian/patches/strip-docs.patch
+++ b/debian/patches/strip-docs.patch
@@ -1,14 +1,11 @@
 Description: strip privacy-breach-generic stuff from docs
- and disable html_last_updated_fmt for reproducible builds,
- and remove `NEWS` (obsolete) and `Download` (not needed)
- from index.
-Author: Daniel Stender <stender at debian.org>
+ and disable html_last_updated_fmt for reproducible builds
+Author: Daniel Stender <stender at debian.org>, Rebecca Palmer
 Forwarded: not-needed
-Last-Update: 2016-07-12
 
 --- a/doc/conf.py
 +++ b/doc/conf.py
-@@ -126,7 +126,7 @@ html_static_path = ['.static', 'images', 'library/d3viz/examples']
+@@ -153,7 +153,7 @@ html_static_path = ['.static', 'images',
  
  # If not '', a 'Last updated on:' timestamp is inserted at every page bottom,
  # using the given strftime format.
@@ -17,67 +14,12 @@ Last-Update: 2016-07-12
  
  # If true, SmartyPants will be used to convert quotes and dashes to
  # typographically correct entities.
-
 --- a/doc/index.txt
 +++ b/doc/index.txt
-@@ -18,78 +18,6 @@ scientific investigations since 2007.  But it is also approachable
- enough to be used in the classroom (University of Montreal's `deep
- learning/machine learning <http://www.mila.umontreal.ca/Home/courses>`_ classes).
+@@ -94,21 +94,6 @@ installation and configuration, see :ref
+ 
+ .. only:: html
  
--News
--====
--
--* We added support for :ref:`CuDNN v3 <libdoc_cuda_dnn>`.
--
--* We added support for :attr:`CNMeM <config.lib.cnmem>` to speed up
--  the GPU memory allocation.
--
--* Theano 0.7 was released 26th March 2015. Everybody is encouraged to update.
--
--* We support `cuDNN <http://deeplearning.net/software/theano/library/sandbox/cuda/dnn.html>`_ if it is installed by the user.
--
--* Open Machine Learning Workshop 2014 `presentation <omlw2014/omlw_presentation.pdf>`_.
--
--* Colin Raffel `tutorial on Theano <http://nbviewer.ipython.org/github/craffel/theano-tutorial/blob/master/Theano%20Tutorial.ipynb>`_.
--
--* Ian Goodfellow did a `12h class with exercises on Theano <https://github.com/goodfeli/theano_exercises>`_.
--
--* New technical report on Theano: `Theano: new features and speed improvements <http://arxiv.org/abs/1211.5590>`_.
--
--* `HPCS 2011 Tutorial <http://www.iro.umontreal.ca/~lisa/pointeurs/tutorial_hpcs2011_fixed.pdf>`_.
--  We included a few fixes discovered while doing the Tutorial.
--
--.. image:: images/talk2010.png
--    :scale: 75%
--    :align: left
--
--You can watch a quick (20 minute) introduction to Theano given as a talk at `SciPy 2010 <http://conference.scipy.org/scipy2010/>`_ via streaming (or downloaded) video:
--
--  `Transparent GPU Computing With Theano`_.
--  James Bergstra, SciPy 2010, June 30, 2010.
--
--.. _Transparent GPU Computing With Theano: http://www.archive.org/details/Scipy2010-JamesBergstra-TransparentGpuComputingWithTheano
--
--Download
--========
--
--Theano is now `available on PyPI`_, and can be installed via ``easy_install
--Theano``, ``pip install Theano`` or by downloading and unpacking the tarball
--and typing ``python setup.py install``.
--
--Those interested in bleeding-edge features should obtain the latest development
--version, available via::
--
--    git clone git://github.com/Theano/Theano.git
--
--You can then place the checkout directory on your ``$PYTHONPATH`` or use
--``python setup.py develop`` to install a ``.pth`` into your ``site-packages``
--directory, so that when you pull updates via Git, they will be
--automatically reflected the "installed" version. For more information about
--installation and configuration, see :ref:`installing Theano <install>`.
--
--.. only:: html
--
 -  Status
 -  ======
 -
@@ -93,24 +35,6 @@ Last-Update: 2016-07-12
 -
 -     <a href="https://crate.io/packages/Theano/"><img src="https://img.shields.io/pypi/dm/Theano.svg" alt="Number of PyPI downloads" /></a> 
 -
--.. _available on PyPI: http://pypi.python.org/pypi/Theano
--.. _Related Projects: https://github.com/Theano/Theano/wiki/Related-projects
--
- Citing Theano
- ==============
- 
---- a/doc/install.txt
-+++ b/doc/install.txt
-@@ -220,12 +220,6 @@ Bleeding-edge install instructions
- 
- .. only:: html
- 
--   Master Tests Status:
--
--   .. raw:: html
--
--      <a href="http://travis-ci.org/Theano/Theano/builds"><img src="https://secure.travis-ci.org/Theano/Theano.png?branch=master" /></a> 
--
- If you are a developer of Theano, then check out the :ref:`dev_start_guide`.
+ .. _available on PyPI: http://pypi.python.org/pypi/Theano
+ .. _Related Projects: https://github.com/Theano/Theano/wiki/Related-projects
  
- If you want the bleeding-edge without developing the code you can use pip for

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-science/packages/theano.git



More information about the debian-science-commits mailing list