You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by li...@apache.org on 2018/08/25 03:30:39 UTC

[incubator-mxnet] branch v1.3.x updated: update NDCollector doc (#12349)

This is an automated email from the ASF dual-hosted git repository.

liuyizhi pushed a commit to branch v1.3.x
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git


The following commit(s) were added to refs/heads/v1.3.x by this push:
     new 9faecd4  update NDCollector doc (#12349)
9faecd4 is described below

commit 9faecd4092019281bfa341454663c58d06bd3e24
Author: Yizhi Liu <li...@apache.org>
AuthorDate: Fri Aug 24 20:30:31 2018 -0700

    update NDCollector doc (#12349)
    
    * explain the details for Scala Experimental
---
 .../core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala       | 4 ++++
 .../src/main/scala/org/apache/mxnet/annotation/Experimental.scala     | 2 +-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala b/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala
index 3952b73..0b7f9af 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala
@@ -133,6 +133,10 @@ class NDArrayCollector private(private val autoDispose: Boolean = true,
    * If the return type of scope is <em>NDArray</em> or <em>NDArrayFuncReturn</em>,
    * it is smart enough NOT to collect or dispose the returned NDArray. <br />
    * However in other cases, it is users' responsibility NOT to leak allocated NDArrays outside.
+   * <br />
+   * We might switch to try -with-resources statement (by AutoCloseable in Java 1.7+)
+   * and deprecate this method later, thus it is marked as Experimental.
+   *
    * @param codeBlock code block to be executed within the scope.
    * @tparam T return type of the function <em>codeBlock</em>.
    * @return The result of function <em>codeBlock</em>.
diff --git a/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala b/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala
index 147d651..d63194d 100644
--- a/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala
+++ b/scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala
@@ -21,7 +21,7 @@ import java.lang.annotation.{ElementType, Retention, Target, _}
 
 /**
   * Experimental: there is a comparably high chance that
-  * the API will undergo some kind of changes
+  * the API will be changed or removed.
   */
 @Retention(RetentionPolicy.RUNTIME)
 @Target(Array(ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,