This is an automated email from the ASF dual-hosted git repository. apeforest 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 3f4f3d5 fix kvstore nightly failure (#15156) 3f4f3d5 is described below commit 3f4f3d578c23388c850c1691e3e77ab5d6e81ee1 Author: Lai Wei <roywei...@gmail.com> AuthorDate: Thu Jun 6 06:49:47 2019 -0700 fix kvstore nightly failure (#15156) * fix kvstore * fix * update tutorial * Update docs/tutorials/python/kvstore.md Co-Authored-By: Lin Yuan <apefor...@gmail.com> --- docs/tutorials/python/kvstore.md | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/docs/tutorials/python/kvstore.md b/docs/tutorials/python/kvstore.md index 4807475..ad7d6bf 100644 --- a/docs/tutorials/python/kvstore.md +++ b/docs/tutorials/python/kvstore.md @@ -53,15 +53,11 @@ print(a.asnumpy()) The data for pushing can be stored on any device. Furthermore, you can push multiple values into the same key, where KVStore will first sum all of these -values and then push the aggregated value: +values and then push the aggregated value. Here we will just demonstrate pushing a list of values on CPU. +Please note summation only happens if the value list is longer than one ```python -# The numbers used below assume 4 GPUs -gpus = mx.context.num_gpus() -if gpus > 0: - contexts = [mx.gpu(i) for i in range(gpus)] -else: - contexts = [mx.cpu(i) for i in range(4)] +contexts = [mx.cpu(i) for i in range(4)] b = [mx.nd.ones(shape, ctx) for ctx in contexts] kv.push(3, b) kv.pull(3, out = a) @@ -87,7 +83,6 @@ print(a.asnumpy()) ```python kv.push(3, mx.nd.ones(shape)) -# kv.pull(3, out=a) print(a.asnumpy()) ```