Skip to content
This repository was archived by the owner on Nov 17, 2023. It is now read-only.

Commit 9faecd4

Browse files
authored
update NDCollector doc (#12349)
* explain the details for Scala Experimental
1 parent 353f323 commit 9faecd4

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

scala-package/core/src/main/scala/org/apache/mxnet/NDArrayCollector.scala

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,10 @@ class NDArrayCollector private(private val autoDispose: Boolean = true,
133133
* If the return type of scope is <em>NDArray</em> or <em>NDArrayFuncReturn</em>,
134134
* it is smart enough NOT to collect or dispose the returned NDArray. <br />
135135
* However in other cases, it is users' responsibility NOT to leak allocated NDArrays outside.
136+
* <br />
137+
* We might switch to try -with-resources statement (by AutoCloseable in Java 1.7+)
138+
* and deprecate this method later, thus it is marked as Experimental.
139+
*
136140
* @param codeBlock code block to be executed within the scope.
137141
* @tparam T return type of the function <em>codeBlock</em>.
138142
* @return The result of function <em>codeBlock</em>.

scala-package/core/src/main/scala/org/apache/mxnet/annotation/Experimental.scala

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import java.lang.annotation.{ElementType, Retention, Target, _}
2121

2222
/**
2323
* Experimental: there is a comparably high chance that
24-
* the API will undergo some kind of changes
24+
* the API will be changed or removed.
2525
*/
2626
@Retention(RetentionPolicy.RUNTIME)
2727
@Target(Array(ElementType.TYPE, ElementType.FIELD, ElementType.METHOD, ElementType.PARAMETER,

0 commit comments

Comments
 (0)