[GitHub] asitstands commented on issue #10951: [MXNET-545] Fix broken cython build

2018-08-04 Thread GitBox
asitstands commented on issue #10951: [MXNET-545] Fix broken cython build
URL: https://github.com/apache/incubator-mxnet/pull/10951#issuecomment-410495113
 
 
   - We need to build cython modules for both of python2 and python3. Once the 
two builds are successful, I think we don't strictly need to run the tests for 
both. However, I think maintain the two tests in combinations with make/cmake 
would be a good idea.
   - Currently "Python2 CPU" and "Python3 GPU" don't use cmake. One solution 
would be modifying "Python3 GPU" to run the test based on ''GPU: CMake'' build. 
So "CPU: Openblas" and "GPU: CMake" build the cython modules, and we have two 
unit test environments with cython: "Python2 CPU" = (make, cpu, python2) and 
"Python3 GPU"= (cmake, gpu, python3). I'll try this modification.
   - I set MXNET_ENABLE_CYTHON=0 explicitly for all other python test 
environments.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin closed pull request #11955: [MXNET-751] fix bce_loss flaky

2018-08-04 Thread GitBox
eric-haibin-lin closed pull request #11955: [MXNET-751] fix bce_loss flaky
URL: https://github.com/apache/incubator-mxnet/pull/11955
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/python/unittest/test_loss.py 
b/tests/python/unittest/test_loss.py
index 3c147bc4c72..91ee011dac2 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -83,8 +83,8 @@ def test_ce_loss():
 initializer=mx.init.Xavier(magnitude=2))
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
-
-@with_seed(1234)
+# tracked at: https://github.com/apache/incubator-mxnet/issues/11691
+@with_seed()
 def test_bce_loss():
 N = 20
 data = mx.random.uniform(-1, 1, shape=(N, 20))
@@ -107,7 +107,7 @@ def test_bce_loss():
 prob_npy = 1.0 / (1.0 + np.exp(-data.asnumpy()))
 label_npy = label.asnumpy()
 npy_bce_loss = - label_npy * np.log(prob_npy) - (1 - label_npy) * np.log(1 
- prob_npy)
-assert_almost_equal(mx_bce_loss, npy_bce_loss)
+assert_almost_equal(mx_bce_loss, npy_bce_loss, rtol=1e-4, atol=1e-5)
 
 @with_seed()
 def test_bce_equal_ce2():


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asitstands commented on a change in pull request #10951: [MXNET-545] Fix broken cython build

2018-08-04 Thread GitBox
asitstands commented on a change in pull request #10951: [MXNET-545] Fix broken 
cython build
URL: https://github.com/apache/incubator-mxnet/pull/10951#discussion_r207724038
 
 

 ##
 File path: ci/docker/runtime_functions.sh
 ##
 @@ -33,6 +33,18 @@ clean_repo() {
 git submodule update --init --recursive
 }
 
+check_cython() {
+set -ex
+local python_ver=$1
+if [ "$(echo -e 'import mxnet as 
mx\nprint(mx.nd._internal.NDArrayBase.__module__)' | python${python_ver})" != 
"mxnet._cy${python_ver}.ndarray" ]; then
 
 Review comment:
   I couldn't figure out how to run multiline code with `python -c`. Anyway 
this kind of piping is a standard unix way. Any reason to prefer `python -c`?


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] asitstands commented on a change in pull request #10951: [MXNET-545] Fix broken cython build

2018-08-04 Thread GitBox
asitstands commented on a change in pull request #10951: [MXNET-545] Fix broken 
cython build
URL: https://github.com/apache/incubator-mxnet/pull/10951#discussion_r207724018
 
 

 ##
 File path: ci/docker/runtime_functions.sh
 ##
 @@ -343,6 +343,11 @@ build_ubuntu_cpu_openblas() {
 USE_BLAS=openblas \
 USE_DIST_KVSTORE=1\
 -j$(nproc)
+
+export CC="gcc"
+export CXX="g++"
+make cython PYTHON=python2
 
 Review comment:
   ccache does not work. 
(http://jenkins.mxnet-ci.amazon-ml.com/blue/organizations/jenkins/incubator-mxnet/detail/PR-10951/11/pipeline).


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] apeforest commented on a change in pull request #11742: [MXNET-623] Fixing an integer overflow bug in large NDArray

2018-08-04 Thread GitBox
apeforest commented on a change in pull request #11742: [MXNET-623] Fixing an 
integer overflow bug in large NDArray
URL: https://github.com/apache/incubator-mxnet/pull/11742#discussion_r207724015
 
 

 ##
 File path: src/operator/tensor/ordering_op-inl.h
 ##
 @@ -367,7 +367,7 @@ void TopKImpl(RunContext ctx,
   // Additional temp space for gpu full sorts for batch ids.
   temp_size += sizeof(int) * src.Size();
   // Temp space for cpu sorts.
-  temp_size = std::max(temp_size, sizeof(real_t) * src.Size());
+  temp_size = std::max(temp_size, sizeof(real_t) * 
static_cast(src.Size()));
 
 Review comment:
   Updated.


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] Add LabelBot prediction module

2018-08-04 Thread GitBox
CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] 
Add LabelBot prediction module
URL: https://github.com/apache/incubator-mxnet/pull/11935#discussion_r207723556
 
 

 ##
 File path: mxnet-bot/LabelBotPredict/elastic_beanstalk_server/SentenceParser.py
 ##
 @@ -0,0 +1,129 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This script serves to do data cleaning
+from bs4 import BeautifulSoup
+import logging
+import nltk
+import ssl
+try:
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] Add LabelBot prediction module

2018-08-04 Thread GitBox
CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] 
Add LabelBot prediction module
URL: https://github.com/apache/incubator-mxnet/pull/11935#discussion_r207723541
 
 

 ##
 File path: mxnet-bot/LabelBotPredict/elastic_beanstalk_server/DataFetcher.py
 ##
 @@ -0,0 +1,124 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This scipt is served to fetch GitHub issues into a json file
+from __future__ import print_function
+import os
+import requests
+import json
+import re
+import pandas as pd
+import logging
+
+logging.basicConfig(level=logging.INFO)
+LOGGER = logging.getLogger(__name__)
+
+
+class DataFetcher:
+GITHUB_USER = os.environ.get("GITHUB_USER")
+GITHUB_OAUTH_TOKEN = os.environ.get("GITHUB_OAUTH_TOKEN")
+REPO = os.environ.get("REPO")
+assert GITHUB_USER and GITHUB_OAUTH_TOKEN and REPO, "Please set 
environment variables!"
+REPO_URL = 'https://api.github.com/repos/%s/issues' % REPO
+AUTH = (GITHUB_USER, GITHUB_OAUTH_TOKEN)
+
+def __init__(self):
+self.json_data = None
+
+def cleanstr(self, string, substring):
+# convert all non-alphanumeric charaters into substring
+cleanstr = re.sub("[^0-9a-zA-Z]", substring, string)
+return cleanstr.lower()
+
+def count_pages(self, state):
+# This method is to count how many pages of issues/labels in total
+# state could be "open"/"closed"/"all", available to issues
+response = requests.get(self.REPO_URL, {'state': state},
+auth=self.AUTH)
+assert response.status_code == 200, "Authorization failed"
+if "link" not in response.headers:
+# That means only 1 page exits
+return 1
+# response.headers['link'] will looks like:
+# 
; 
rel="last"
+# In this case we need to extract '387' as the count of pages
+# return the number of pages
+return int(self.cleanstr(response.headers['link'], " ").split()[-3])
+
+def fetch_issues(self, numbers):
+# number: a list of issue ids
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] Add LabelBot prediction module

2018-08-04 Thread GitBox
CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] 
Add LabelBot prediction module
URL: https://github.com/apache/incubator-mxnet/pull/11935#discussion_r207723544
 
 

 ##
 File path: mxnet-bot/LabelBotPredict/elastic_beanstalk_server/SentenceParser.py
 ##
 @@ -0,0 +1,129 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+# This script serves to do data cleaning
+from bs4 import BeautifulSoup
+import logging
+import nltk
+import ssl
+try:
+_create_unverified_https_context = ssl._create_unverified_context
+except AttributeError:
+pass
+else:
+ssl._create_default_https_context = _create_unverified_https_context
+import os.path
+import pandas as pd
+import re
+import sys
+
+logging.basicConfig(level=logging.INFO)
+LOGGER = logging.getLogger(__name__)
+
+# English Stopwords
+with open('stopwords.txt') as file:
+stopwords = file.read().split()
+file.close()
+
+
+class SentenceParser:
+
+regex_str = [
+r'<[^>]+>',
 # HTML tags
+r'(?:@[\w_]+)',
 # @-mentions
+r"(?:\#+[\w_]+[\w\'_\-]*[\w_]+)",  
 # hash-tags
+
r'http[s]?://(?:[a-z]|[0-9]|[$-_@.+]|[!*\(\),]|(?:%[0-9a-f][0-9a-f]))+',   
# URLs
+r'(?:(?:\d+,?)+(?:\.?\d+)?)',  
 # numbers
+r"(?:[a-z][a-z'\-_]+[a-z])",   
 # words with - and '
+r'(?:[\w_]+)', 
 # other words
+r'(?:\S)'  
 # anything else
+]
+
+def __init__(self, loggingLevel = 20):
 
 Review comment:
   Done


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] burness commented on issue #11763: When Train SSD, It hold on during read the data

2018-08-04 Thread GitBox
burness commented on issue #11763: When Train SSD, It hold on during read the 
data
URL: 
https://github.com/apache/incubator-mxnet/issues/11763#issuecomment-410489385
 
 
   Thanks for your help, I will try to fix this issuelater
   
   发自我的 iPhone
   
   > 在 2018年8月3日,上午6:49,Joshua Z. Zhang  写道:
   > 
   > @burness I am closing this issue as it's related to a more general issue 
rather than SSD training specifically. If you cannot fix the problem following 
#11872, feel free to ping me.
   > 
   > —
   > You are receiving this because you were mentioned.
   > Reply to this email directly, view it on GitHub, or mute the thread.
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] JohnCalhoun commented on issue #5659: how to use two dist sync kv store in one job

2018-08-04 Thread GitBox
JohnCalhoun commented on issue #5659: how to use two dist sync kv store in one 
job
URL: 
https://github.com/apache/incubator-mxnet/issues/5659#issuecomment-410486967
 
 
   I am also having this issue,
   use case is trying to train a GAN, which requires two networks, over 
multiple GPUS/Machines


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet-site] branch asf-site updated: Bump the publish timestamp.

2018-08-04 Thread zhasheng
This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new ee97f9b  Bump the publish timestamp.
ee97f9b is described below

commit ee97f9bfe512f607a0d94c0e96a7d81d9c8535ce
Author: mxnet-ci 
AuthorDate: Sun Aug 5 00:42:23 2018 +

Bump the publish timestamp.
---
 date.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/date.txt b/date.txt
new file mode 100644
index 000..8060b7e
--- /dev/null
+++ b/date.txt
@@ -0,0 +1 @@
+Sun Aug  5 00:42:23 UTC 2018



[GitHub] CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] Add LabelBot prediction module

2018-08-04 Thread GitBox
CathyZhang0822 commented on a change in pull request #11935: [MXNET-691][WIP] 
Add LabelBot prediction module
URL: https://github.com/apache/incubator-mxnet/pull/11935#discussion_r207721633
 
 

 ##
 File path: 
mxnet-bot/LabelBotPredict/elastic_beanstalk_server/test_sentenceparse.py
 ##
 @@ -0,0 +1,69 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import requests
+import unittest
+import boto3
+import pandas as pd
+from botocore.exceptions import ClientError
+from botocore.exceptions import NoCredentialsError
+from SentenceParser import SentenceParser
+from pandas.util.testing import assert_frame_equal
+# some version issue
+try:
+from unittest.mock import patch
+except ImportError:
+from mock import patch
+
+# test coverage: 88%
+class TestSentenceParser(unittest.TestCase):
+
+   def setUp(self):
+   self.sp = SentenceParser()
+   self.sp.data = pd.DataFrame([{'id': 11925, 'title': "issue's 
title", 
+ 
'body': " bug ``` import pandas``` ## Environment info", 
+ 
'labels': ['Doc']}])
+
+   def tearDown(self):
 
 Review comment:
   Removed


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: make gluon rnn layers hybrid blocks (#11482)

2018-08-04 Thread zhasheng
This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 5474b08  make gluon rnn layers hybrid blocks (#11482)
5474b08 is described below

commit 5474b086757a8df94984fb95622ead0047ac78b4
Author: Sheng Zha 
AuthorDate: Sat Aug 4 12:17:50 2018 -0700

make gluon rnn layers hybrid blocks (#11482)

* make Gluon RNN layer hybrid block

* separate gluon gpu tests

* remove excess assert_raises_cudnn_disabled usage

* add comments and refactor

* add bidirectional test

* temporarily remove hybridize in test_gluon_rnn.test_layer_fill_shape
---
 python/mxnet/gluon/rnn/rnn_layer.py | 132 ++---
 src/operator/nn/concat.cc   | 127 
 src/operator/nn/concat.cu   |   4 +
 src/operator/rnn.cc |   6 +-
 tests/python/gpu/test_gluon_gpu.py  | 203 
 tests/python/gpu/test_operator_gpu.py   | 124 ---
 tests/python/unittest/test_gluon_rnn.py |  91 +++---
 7 files changed, 449 insertions(+), 238 deletions(-)

diff --git a/python/mxnet/gluon/rnn/rnn_layer.py 
b/python/mxnet/gluon/rnn/rnn_layer.py
index 418c497..4a7a0be 100644
--- a/python/mxnet/gluon/rnn/rnn_layer.py
+++ b/python/mxnet/gluon/rnn/rnn_layer.py
@@ -23,12 +23,11 @@
 from __future__ import print_function
 __all__ = ['RNN', 'LSTM', 'GRU']
 
-from ... import ndarray
-from .. import Block
+from ... import ndarray, symbol
+from .. import HybridBlock, tensor_types
 from . import rnn_cell
 
-
-class _RNNLayer(Block):
+class _RNNLayer(HybridBlock):
 """Implementation of recurrent layers."""
 def __init__(self, hidden_size, num_layers, layout,
  dropout, bidirectional, input_size,
@@ -52,33 +51,28 @@ class _RNNLayer(Block):
 
 self._gates = {'rnn_relu': 1, 'rnn_tanh': 1, 'lstm': 4, 'gru': 3}[mode]
 
-self.i2h_weight = []
-self.h2h_weight = []
-self.i2h_bias = []
-self.h2h_bias = []
-
 ng, ni, nh = self._gates, input_size, hidden_size
 for i in range(num_layers):
-for j in (['l', 'r'] if self._dir == 2 else ['l']):
-self.i2h_weight.append(
-self.params.get('%s%d_i2h_weight'%(j, i), shape=(ng*nh, 
ni),
-init=i2h_weight_initializer,
-allow_deferred_init=True))
-self.h2h_weight.append(
-self.params.get('%s%d_h2h_weight'%(j, i), shape=(ng*nh, 
nh),
-init=h2h_weight_initializer,
-allow_deferred_init=True))
-self.i2h_bias.append(
-self.params.get('%s%d_i2h_bias'%(j, i), shape=(ng*nh,),
-init=i2h_bias_initializer,
-allow_deferred_init=True))
-self.h2h_bias.append(
-self.params.get('%s%d_h2h_bias'%(j, i), shape=(ng*nh,),
-init=h2h_bias_initializer,
-allow_deferred_init=True))
+for j in ['l', 'r'][:self._dir]:
+self._register_param('{}{}_i2h_weight'.format(j, i),
+ shape=(ng*nh, ni),
+ init=i2h_weight_initializer)
+self._register_param('{}{}_h2h_weight'.format(j, i),
+ shape=(ng*nh, nh),
+ init=h2h_weight_initializer)
+self._register_param('{}{}_i2h_bias'.format(j, i),
+ shape=(ng*nh,),
+ init=i2h_bias_initializer)
+self._register_param('{}{}_h2h_bias'.format(j, i),
+ shape=(ng*nh,),
+ init=h2h_bias_initializer)
 ni = nh * self._dir
 
-self._unfused = self._unfuse()
+def _register_param(self, name, shape, init):
+p = self.params.get(name, shape=shape, init=init,
+allow_deferred_init=True)
+setattr(self, name, p)
+return p
 
 def __repr__(self):
 s = '{name}({mapping}, {_layout}'
@@ -89,12 +83,23 @@ class _RNNLayer(Block):
 if self._dir == 2:
 s += ', bidirectional'
 s += ')'
-shape = self.i2h_weight[0].shape
+shape = self.l0_i2h_weight.shape
 mapping = '{0} -> {1}'.format(shape[1] if shape[1] else None, shape[0] 
// self._gates)
 return s.format(name=self.__class__.__name__,
 mapping=mapping,
 **self.__dict__)
 
+def 

[GitHub] szha closed issue #10873: gluon.rnn layers should use fused RNN operator and become HybridBlock

2018-08-04 Thread GitBox
szha closed issue #10873: gluon.rnn layers should use fused RNN operator and 
become HybridBlock
URL: https://github.com/apache/incubator-mxnet/issues/10873
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] szha closed pull request #11482: make gluon rnn layers hybrid blocks

2018-08-04 Thread GitBox
szha closed pull request #11482: make gluon rnn layers hybrid blocks
URL: https://github.com/apache/incubator-mxnet/pull/11482
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/python/mxnet/gluon/rnn/rnn_layer.py 
b/python/mxnet/gluon/rnn/rnn_layer.py
index 418c497ce83..4a7a0be2bc3 100644
--- a/python/mxnet/gluon/rnn/rnn_layer.py
+++ b/python/mxnet/gluon/rnn/rnn_layer.py
@@ -23,12 +23,11 @@
 from __future__ import print_function
 __all__ = ['RNN', 'LSTM', 'GRU']
 
-from ... import ndarray
-from .. import Block
+from ... import ndarray, symbol
+from .. import HybridBlock, tensor_types
 from . import rnn_cell
 
-
-class _RNNLayer(Block):
+class _RNNLayer(HybridBlock):
 """Implementation of recurrent layers."""
 def __init__(self, hidden_size, num_layers, layout,
  dropout, bidirectional, input_size,
@@ -52,33 +51,28 @@ def __init__(self, hidden_size, num_layers, layout,
 
 self._gates = {'rnn_relu': 1, 'rnn_tanh': 1, 'lstm': 4, 'gru': 3}[mode]
 
-self.i2h_weight = []
-self.h2h_weight = []
-self.i2h_bias = []
-self.h2h_bias = []
-
 ng, ni, nh = self._gates, input_size, hidden_size
 for i in range(num_layers):
-for j in (['l', 'r'] if self._dir == 2 else ['l']):
-self.i2h_weight.append(
-self.params.get('%s%d_i2h_weight'%(j, i), shape=(ng*nh, 
ni),
-init=i2h_weight_initializer,
-allow_deferred_init=True))
-self.h2h_weight.append(
-self.params.get('%s%d_h2h_weight'%(j, i), shape=(ng*nh, 
nh),
-init=h2h_weight_initializer,
-allow_deferred_init=True))
-self.i2h_bias.append(
-self.params.get('%s%d_i2h_bias'%(j, i), shape=(ng*nh,),
-init=i2h_bias_initializer,
-allow_deferred_init=True))
-self.h2h_bias.append(
-self.params.get('%s%d_h2h_bias'%(j, i), shape=(ng*nh,),
-init=h2h_bias_initializer,
-allow_deferred_init=True))
+for j in ['l', 'r'][:self._dir]:
+self._register_param('{}{}_i2h_weight'.format(j, i),
+ shape=(ng*nh, ni),
+ init=i2h_weight_initializer)
+self._register_param('{}{}_h2h_weight'.format(j, i),
+ shape=(ng*nh, nh),
+ init=h2h_weight_initializer)
+self._register_param('{}{}_i2h_bias'.format(j, i),
+ shape=(ng*nh,),
+ init=i2h_bias_initializer)
+self._register_param('{}{}_h2h_bias'.format(j, i),
+ shape=(ng*nh,),
+ init=h2h_bias_initializer)
 ni = nh * self._dir
 
-self._unfused = self._unfuse()
+def _register_param(self, name, shape, init):
+p = self.params.get(name, shape=shape, init=init,
+allow_deferred_init=True)
+setattr(self, name, p)
+return p
 
 def __repr__(self):
 s = '{name}({mapping}, {_layout}'
@@ -89,12 +83,23 @@ def __repr__(self):
 if self._dir == 2:
 s += ', bidirectional'
 s += ')'
-shape = self.i2h_weight[0].shape
+shape = self.l0_i2h_weight.shape
 mapping = '{0} -> {1}'.format(shape[1] if shape[1] else None, shape[0] 
// self._gates)
 return s.format(name=self.__class__.__name__,
 mapping=mapping,
 **self.__dict__)
 
+def _collect_params_with_prefix(self, prefix=''):
+if prefix:
+prefix += '.'
+def convert_key(key): # for compatibility with old parameter format
+key = key.split('_')
+return '_unfused.{}.{}_cell.{}'.format(key[0][1:], key[0][0], 
'_'.join(key[1:]))
+ret = {prefix + convert_key(key) : val for key, val in 
self._reg_params.items()}
+for name, child in self._children.items():
+ret.update(child._collect_params_with_prefix(prefix + name))
+return ret
+
 def state_info(self, batch_size=0):
 raise NotImplementedError
 
@@ -111,7 +116,7 @@ def _unfuse(self):
 'gru': lambda **kwargs: rnn_cell.GRUCell(self._hidden_size,
  
**kwargs)}[self._mode]
 
-stack = 

[incubator-mxnet-site] branch asf-site updated: Bump the publish timestamp.

2018-08-04 Thread zhasheng
This is an automated email from the ASF dual-hosted git repository.

zhasheng pushed a commit to branch asf-site
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet-site.git


The following commit(s) were added to refs/heads/asf-site by this push:
 new 6eaeba8  Bump the publish timestamp.
6eaeba8 is described below

commit 6eaeba8145d38a7b110b34442ef2d4036746aa0a
Author: mxnet-ci 
AuthorDate: Sat Aug 4 18:45:36 2018 +

Bump the publish timestamp.
---
 date.txt | 1 +
 1 file changed, 1 insertion(+)

diff --git a/date.txt b/date.txt
new file mode 100644
index 000..5997874
--- /dev/null
+++ b/date.txt
@@ -0,0 +1 @@
+Sat Aug  4 18:45:36 UTC 2018



[GitHub] eric-haibin-lin commented on a change in pull request #11742: [MXNET-623] Fixing an integer overflow bug in large NDArray

2018-08-04 Thread GitBox
eric-haibin-lin commented on a change in pull request #11742: [MXNET-623] 
Fixing an integer overflow bug in large NDArray
URL: https://github.com/apache/incubator-mxnet/pull/11742#discussion_r207714501
 
 

 ##
 File path: tests/nightly/test_large_array.py
 ##
 @@ -0,0 +1,31 @@
+# Licensed to the Apache Software Foundation (ASF) under one
+# or more contributor license agreements.  See the NOTICE file
+# distributed with this work for additional information
+# regarding copyright ownership.  The ASF licenses this file
+# to you under the Apache License, Version 2.0 (the
+# "License"); you may not use this file except in compliance
+# with the License.  You may obtain a copy of the License at
+#
+#   http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing,
+# software distributed under the License is distributed on an
+# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+# KIND, either express or implied.  See the License for the
+# specific language governing permissions and limitations
+# under the License.
+
+import mxnet as mx
+from mxnet import gluon, nd
+
+def test_ndarray2numpy():
+m = gluon.nn.Embedding(14000, 128)
+m.initialize()
+ind = nd.zeros((70, 128))
+x = m(ind)
+x.shape
+test=x.asnumpy()
+assert (x.shape == test.shape)
+
+if __name__ == '__main__':
+test_ndarray2numpy()
 
 Review comment:
   I think you need to update 
https://github.com/apache/incubator-mxnet/blob/master/tests/nightly/Jenkinsfile 
to enable nightly test @marcoabreu correct me if i'm wrong


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin closed pull request #11950: Re-enabling test_ndarray.test_cached

2018-08-04 Thread GitBox
eric-haibin-lin closed pull request #11950: Re-enabling test_ndarray.test_cached
URL: https://github.com/apache/incubator-mxnet/pull/11950
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/python/unittest/test_ndarray.py 
b/tests/python/unittest/test_ndarray.py
index e55fa1af90e..e4b69ef63a2 100644
--- a/tests/python/unittest/test_ndarray.py
+++ b/tests/python/unittest/test_ndarray.py
@@ -862,7 +862,7 @@ def test_iter():
 for i in range(x.size):
 assert same(y[i].asnumpy(), x[i].asnumpy())
 
-@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/8049;)
+@with_seed()
 def test_cached():
 sym = mx.sym.Convolution(kernel=(3, 3), num_filter=10) + 2
 op = mx.nd.CachedOp(sym)


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Re-enabling test_ndarray/test_cached (#11950)

2018-08-04 Thread haibin
This is an automated email from the ASF dual-hosted git repository.

haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new deae58d  Re-enabling test_ndarray/test_cached (#11950)
deae58d is described below

commit deae58db8e7fd7583988357ed7c2e6c53d1db500
Author: Vandana Kannan 
AuthorDate: Sat Aug 4 10:23:49 2018 -0700

Re-enabling test_ndarray/test_cached (#11950)

Test passes on CPU and GPU (1 runs)
---
 tests/python/unittest/test_ndarray.py | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tests/python/unittest/test_ndarray.py 
b/tests/python/unittest/test_ndarray.py
index ac6ee15..931f805 100644
--- a/tests/python/unittest/test_ndarray.py
+++ b/tests/python/unittest/test_ndarray.py
@@ -862,7 +862,7 @@ def test_iter():
 for i in range(x.size):
 assert same(y[i].asnumpy(), x[i].asnumpy())
 
-@unittest.skip("test fails intermittently. temporarily disabled till it gets 
fixed. tracked at https://github.com/apache/incubator-mxnet/issues/8049;)
+@with_seed()
 def test_cached():
 sym = mx.sym.Convolution(kernel=(3, 3), num_filter=10) + 2
 op = mx.nd.CachedOp(sym)



[GitHub] eric-haibin-lin closed pull request #11215: [MXNET-23] Adding support to profile kvstore server during distributed training

2018-08-04 Thread GitBox
eric-haibin-lin closed pull request #11215: [MXNET-23] Adding support to 
profile kvstore server during distributed training 
URL: https://github.com/apache/incubator-mxnet/pull/11215
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh
index 8805850e314..428d71960bb 100755
--- a/ci/docker/runtime_functions.sh
+++ b/ci/docker/runtime_functions.sh
@@ -759,6 +759,7 @@ integrationtest_ubuntu_cpu_dist_kvstore() {
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--no-multiprecision
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--type=compressed_cpu
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--type=compressed_cpu --no-multiprecision
+../../tools/launch.py -n 3 --launcher local python test_server_profiling.py
 }
 
 integrationtest_ubuntu_gpu_scala() {
diff --git a/example/image-classification/common/fit.py 
b/example/image-classification/common/fit.py
index 67cda78172b..b3b13053add 100755
--- a/example/image-classification/common/fit.py
+++ b/example/image-classification/common/fit.py
@@ -135,6 +135,12 @@ def add_fit_args(parser):
help='the epochs to ramp-up lr to scaled large-batch 
value')
 train.add_argument('--warmup-strategy', type=str, default='linear',
help='the ramping-up strategy for large batch sgd')
+train.add_argument('--profile-worker-suffix', type=str, default='',
+   help='profile workers actions into this file. During 
distributed training\
+ filename saved will be rank1_ followed by this 
suffix')
+train.add_argument('--profile-server-suffix', type=str, default='',
+   help='profile server actions into a file with name like 
rank1_ followed by this suffix \
+ during distributed training')
 return train
 
 
@@ -150,6 +156,17 @@ def fit(args, network, data_loader, **kwargs):
 if args.gc_type != 'none':
 kv.set_gradient_compression({'type': args.gc_type,
  'threshold': args.gc_threshold})
+if args.profile_server_suffix:
+mx.profiler.set_config(filename=args.profile_server_suffix, 
profile_all=True, profile_process='server')
+mx.profiler.set_state(state='run', profile_process='server')
+
+if args.profile_worker_suffix:
+if kv.num_workers > 1:
+filename = 'rank' + str(kv.rank) + '_' + args.profile_worker_suffix
+else:
+filename = args.profile_worker_suffix
+mx.profiler.set_config(filename=filename, profile_all=True, 
profile_process='worker')
+mx.profiler.set_state(state='run', profile_process='worker')
 
 # logging
 head = '%(asctime)-15s Node[' + str(kv.rank) + '] %(message)s'
@@ -180,7 +197,6 @@ def fit(args, network, data_loader, **kwargs):
 logging.info('Batch [%d]\tSpeed: %.2f samples/sec', i,
  args.disp_batches * args.batch_size / 
(time.time() - tic))
 tic = time.time()
-
 return
 
 # load model
@@ -314,3 +330,8 @@ def fit(args, network, data_loader, **kwargs):
   epoch_end_callback=checkpoint,
   allow_missing=True,
   monitor=monitor)
+
+if args.profile_server_suffix:
+mx.profiler.set_state(state='run', profile_process='server')
+if args.profile_worker_suffix:
+mx.profiler.set_state(state='run', profile_process='worker')
\ No newline at end of file
diff --git a/include/mxnet/c_api.h b/include/mxnet/c_api.h
index 75147cfd706..6bbe9dfe8f0 100644
--- a/include/mxnet/c_api.h
+++ b/include/mxnet/c_api.h
@@ -230,7 +230,19 @@ MXNET_DLL int MXRandomSeedContext(int seed, int dev_type, 
int dev_id);
 MXNET_DLL int MXNotifyShutdown();
 
 /*!
- * \brief Set up configuration of profiler
+ * \brief Set up configuration of profiler for the process passed as 
profile_process in keys
+ * \param num_params Number of parameters
+ * \param keys array of parameter keys
+ * \param vals array of parameter values
+ * \param kvstoreHandle handle to kvstore
+ * \return 0 when success, -1 when failure happens.
+ */
+MXNET_DLL int MXSetProcessProfilerConfig(int num_params, const char* const* 
keys,
+ const char* const* vals,
+ KVStoreHandle kvstoreHandle);
+
+/*!
+ * \brief Set up configuration of profiler for worker/current process
  * \param num_params Number of parameters
  * \param keys array of parameter keys
  * \param vals array of parameter values
@@ -239,7 +251,21 @@ MXNET_DLL int MXNotifyShutdown();
 MXNET_DLL int 

[incubator-mxnet] branch master updated: [MXNET-23] Adding support to profile kvstore server during distributed training (#11215)

2018-08-04 Thread haibin
This is an automated email from the ASF dual-hosted git repository.

haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 4649bfa  [MXNET-23] Adding support to profile kvstore server during 
distributed training  (#11215)
4649bfa is described below

commit 4649bfa641ad4129b3e83ea0af14b489e512f8f4
Author: Rahul Huilgol 
AuthorDate: Sat Aug 4 10:22:50 2018 -0700

[MXNET-23] Adding support to profile kvstore server during distributed 
training  (#11215)

* server profiling

merge with master

cleanup old code

added a check and better info message

add functions for C compatibility

fix doc

lint fixes

fix compile issues

lint fix

build error

update function signatures to preserve compatibility

fix comments

lint

* add part1 of test

* add integration test
---
 ci/docker/runtime_functions.sh |   1 +
 example/image-classification/common/fit.py |  23 +-
 include/mxnet/c_api.h  |  59 --
 include/mxnet/kvstore.h|  26 +++
 python/mxnet/kvstore.py|   8 +-
 python/mxnet/profiler.py   |  79 +++
 src/c_api/c_api_profile.cc |  87 ++---
 src/kvstore/gradient_compression.cc|  21 +
 src/kvstore/kvstore_dist.h |   9 +++
 src/kvstore/kvstore_dist_server.h  | 121 ++---
 src/kvstore/kvstore_local.h|  16 
 tests/nightly/test_server_profiling.py |  69 
 12 files changed, 434 insertions(+), 85 deletions(-)

diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh
index 2147190..1c861be 100755
--- a/ci/docker/runtime_functions.sh
+++ b/ci/docker/runtime_functions.sh
@@ -731,6 +731,7 @@ integrationtest_ubuntu_cpu_dist_kvstore() {
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--no-multiprecision
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--type=compressed_cpu
 ../../tools/launch.py -n 7 --launcher local python dist_sync_kvstore.py 
--type=compressed_cpu --no-multiprecision
+../../tools/launch.py -n 3 --launcher local python test_server_profiling.py
 }
 
 integrationtest_ubuntu_gpu_scala() {
diff --git a/example/image-classification/common/fit.py 
b/example/image-classification/common/fit.py
index 67cda78..b3b1305 100755
--- a/example/image-classification/common/fit.py
+++ b/example/image-classification/common/fit.py
@@ -135,6 +135,12 @@ def add_fit_args(parser):
help='the epochs to ramp-up lr to scaled large-batch 
value')
 train.add_argument('--warmup-strategy', type=str, default='linear',
help='the ramping-up strategy for large batch sgd')
+train.add_argument('--profile-worker-suffix', type=str, default='',
+   help='profile workers actions into this file. During 
distributed training\
+ filename saved will be rank1_ followed by this 
suffix')
+train.add_argument('--profile-server-suffix', type=str, default='',
+   help='profile server actions into a file with name like 
rank1_ followed by this suffix \
+ during distributed training')
 return train
 
 
@@ -150,6 +156,17 @@ def fit(args, network, data_loader, **kwargs):
 if args.gc_type != 'none':
 kv.set_gradient_compression({'type': args.gc_type,
  'threshold': args.gc_threshold})
+if args.profile_server_suffix:
+mx.profiler.set_config(filename=args.profile_server_suffix, 
profile_all=True, profile_process='server')
+mx.profiler.set_state(state='run', profile_process='server')
+
+if args.profile_worker_suffix:
+if kv.num_workers > 1:
+filename = 'rank' + str(kv.rank) + '_' + args.profile_worker_suffix
+else:
+filename = args.profile_worker_suffix
+mx.profiler.set_config(filename=filename, profile_all=True, 
profile_process='worker')
+mx.profiler.set_state(state='run', profile_process='worker')
 
 # logging
 head = '%(asctime)-15s Node[' + str(kv.rank) + '] %(message)s'
@@ -180,7 +197,6 @@ def fit(args, network, data_loader, **kwargs):
 logging.info('Batch [%d]\tSpeed: %.2f samples/sec', i,
  args.disp_batches * args.batch_size / 
(time.time() - tic))
 tic = time.time()
-
 return
 
 # load model
@@ -314,3 +330,8 @@ def fit(args, network, data_loader, **kwargs):
   epoch_end_callback=checkpoint,
   allow_missing=True,
   monitor=monitor)
+
+if args.profile_server_suffix:
+  

[GitHub] eric-haibin-lin commented on issue #1516: Why is Adam much slower than sgd?

2018-08-04 Thread GitBox
eric-haibin-lin commented on issue #1516: Why is Adam much slower than sgd?
URL: 
https://github.com/apache/incubator-mxnet/issues/1516#issuecomment-410464358
 
 
   in 
https://github.com/apache/incubator-mxnet/blob/master/src/operator/optimizer_op-inl.h#L841


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin commented on a change in pull request #11948: [MXNET-766] add unroll RNN for HybridBlock

2018-08-04 Thread GitBox
eric-haibin-lin commented on a change in pull request #11948: [MXNET-766] add 
unroll RNN for HybridBlock
URL: https://github.com/apache/incubator-mxnet/pull/11948#discussion_r207714212
 
 

 ##
 File path: python/mxnet/gluon/contrib/rnn/rnn_cell.py
 ##
 @@ -315,3 +317,138 @@ def hybrid_forward(self, F, inputs, states, i2h_weight,
 
 return next_r, [next_r, next_c]
 # pylint: enable= arguments-differ
+
+
+def _contrib_format_sequence(inputs, layout, in_layout=None):
+assert inputs is not None, \
+"unroll(inputs=None) has been deprecated. " \
+"Please create input variables outside unroll."
+
+axis = layout.find('T')
+batch_axis = layout.find('N')
+batch_size = 0
+in_axis = in_layout.find('T') if in_layout is not None else axis
+assert isinstance(inputs, tensor_types)
+if isinstance(inputs, symbol.Symbol):
+F = symbol
+else:
+F = ndarray
+batch_size = inputs.shape[batch_axis]
+
+if axis != in_axis:
+inputs = F.swapaxes(inputs, dim1=axis, dim2=in_axis)
+
+return inputs, axis, F, batch_size
+
+
+def unroll(cell, inputs, begin_state, drop_inputs=0, drop_outputs=0,
+   layout='TNC', valid_length=None):
+"""Unrolls an RNN cell across time steps.
+
+Currently, 'TNC' is a preferred layout. unroll on the input of this layout
+runs much faster.
+
+Parameters
+--
+cell : an object whose base class is RNNCell.
+The RNN cell to run on the input sequence.
+inputs : Symbol
+It should have shape (batch_size, length, ...) if `layout` is 'NTC',
+or (length, batch_size, ...) if `layout` is 'TNC'.
+begin_state : nested list of Symbol
+The initial states of the RNN sequence.
+drop_inputs : float, default 0.
+The dropout rate for inputs. Won't apply dropout if it equals 0.
+drop_outputs : float, default 0.
+The dropout rate for outputs. Won't apply dropout if it equals 0.
+layout : str, optional
+`layout` of input symbol. Only used if inputs
+is a single Symbol.
+valid_length : Symbol, NDArray or None
+`valid_length` specifies the length of the sequences in the batch 
without padding.
+This option is especially useful for building sequence-to-sequence 
models where
+the input and output sequences would potentially be padded.
+If `valid_length` is None, all sequences are assumed to have the same 
length.
+If `valid_length` is a Symbol or NDArray, it should have shape 
(batch_size,).
+The ith element will be the length of the ith sequence in the batch.
+The last valid state will be return and the padded outputs will be 
masked with 0.
+Note that `valid_length` must be smaller or equal to `length`.
+
+Returns
+---
+outputs : Symbol
+the output of the RNN from this unrolling.
+
+states : list of Symbol
+The new state of this RNN after this unrolling.
+The type of this symbol is same as the output of `begin_state`.
+
+Examples
+
+>>> seq_len = 3
+>>> batch_size = 2
+>>> input_size = 5
+>>> cell = mx.gluon.rnn.LSTMCell(input_size, prefix='rnn_')
+>>> cell.initialize(ctx=mx.cpu())
+>>> rnn_data = mx.nd.normal(loc=0, scale=1, shape=(seq_len, batch_size, 
input_size))
+>>> state_shape = (batch_size, input_size)
+>>> states = [mx.nd.normal(loc=0, scale=1, shape=state_shape) for i in 
range(2)]
+>>> valid_length = mx.nd.array([2, 3])
+>>> output, states = mx.gluon.contrib.rnn.rnn_cell.unroll(cell, rnn_data, 
states,
+  
valid_length=valid_length,
+  layout='TNC')
+>>> print(output)
+[[[ 0.00767238  0.00023103  0.03973929 -0.00925503 -0.05660512]
+  [ 0.00881535  0.05428379 -0.02493718 -0.01834097  0.02189514]]
+ [[-0.00676967  0.01447039  0.01287002 -0.00574152 -0.05734247]
+  [ 0.01568508  0.02650866 -0.04270559 -0.04328435  0.00904011]]
+ [[ 0.  0.  0.  0.  0.]
+  [ 0.01055336  0.02734251 -0.03153727 -0.03742751 -0.01378113]]]
+ 
+"""
+
+inputs, axis, F, _ = _contrib_format_sequence(inputs, layout)
+if axis != 0:
+axes = list(range(len(layout)))
+tmp = axes[0]
 
 Review comment:
   nit: you can swap element by `foo[i], foo[j] = foo[j], foo[i]` in python


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] eric-haibin-lin closed pull request #11995: Remove fixed seed for test_l1_loss and test_l2_loss

2018-08-04 Thread GitBox
eric-haibin-lin closed pull request #11995: Remove fixed seed for test_l1_loss 
and test_l2_loss
URL: https://github.com/apache/incubator-mxnet/pull/11995
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/tests/python/unittest/test_loss.py 
b/tests/python/unittest/test_loss.py
index 8d5b86341a8..fea8e5f2669 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -144,7 +144,7 @@ def test_kl_loss():
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
-@with_seed(1234)
+@with_seed()
 def test_l2_loss():
 N = 20
 data = mx.random.uniform(-1, 1, shape=(N, 10))
@@ -162,7 +162,7 @@ def test_l2_loss():
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
-@with_seed(1234)
+@with_seed()
 def test_l1_loss():
 N = 20
 data = mx.random.uniform(-1, 1, shape=(N, 10))


 


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[incubator-mxnet] branch master updated: Update test_loss.py to remove fixed seed (#11995)

2018-08-04 Thread haibin
This is an automated email from the ASF dual-hosted git repository.

haibin pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/master by this push:
 new 1b4a7c9  Update test_loss.py to remove fixed seed (#11995)
1b4a7c9 is described below

commit 1b4a7c9739c7f9cd2230e35e08ea32fdeeff1ed1
Author: Haibin Lin 
AuthorDate: Sat Aug 4 10:00:11 2018 -0700

Update test_loss.py to remove fixed seed (#11995)
---
 tests/python/unittest/test_loss.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tests/python/unittest/test_loss.py 
b/tests/python/unittest/test_loss.py
index 8dfd362..deb7a6a 100644
--- a/tests/python/unittest/test_loss.py
+++ b/tests/python/unittest/test_loss.py
@@ -146,7 +146,7 @@ def test_kl_loss():
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
-@with_seed(1234)
+@with_seed()
 def test_l2_loss():
 N = 20
 data = mx.random.uniform(-1, 1, shape=(N, 10))
@@ -164,7 +164,7 @@ def test_l2_loss():
 assert mod.score(data_iter, eval_metric=mx.metric.Loss())[0][1] < 0.05
 
 
-@with_seed(1234)
+@with_seed()
 def test_l1_loss():
 N = 20
 data = mx.random.uniform(-1, 1, shape=(N, 10))



[GitHub] eric-haibin-lin closed issue #11699: test_loss.test_l2_loss has fixed seed that can mask flakiness

2018-08-04 Thread GitBox
eric-haibin-lin closed issue #11699: test_loss.test_l2_loss has fixed seed that 
can mask flakiness
URL: https://github.com/apache/incubator-mxnet/issues/11699
 
 
   


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services


[GitHub] starimpact opened a new issue #12033: Some design proposals from me

2018-08-04 Thread GitBox
starimpact opened a new issue #12033: Some design proposals from me
URL: https://github.com/apache/incubator-mxnet/issues/12033
 
 
   hi, guys,
   i have performed some design proposals in the confluence space.
   see the following links:
   KVStore for Distributed Model Parallel FC(nsoftmax)
   https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=89066589
   
   KVStore for Partial FC(nsoftmax) for Large Scale Data Training
   https://cwiki.apache.org/confluence/pages/viewpage.action?pageId=89066594
   
   End2End Fixpoint Finetuning Plug-In
   
https://cwiki.apache.org/confluence/display/MXNET/End2End+Fixpoint+Finetuning+Plug-In
   
   welcome anybody to join me to finish them into the master branch of mxnet.
   
   thanks.
   Ming Zhang


This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
us...@infra.apache.org


With regards,
Apache Git Services