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

Commit

Permalink
Bump Scala version to 1.6 (#15660)
Browse files Browse the repository at this point in the history
Fix API deprecation versions
  • Loading branch information
zachgk authored and lanking520 committed Jul 26, 2019
1 parent c310763 commit 7bc3db8
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -756,7 +756,7 @@ object NDArray extends NDArrayBase {
class NDArray private[mxnet](private[mxnet] val handle: NDArrayHandle,
val writable: Boolean) extends NativeResource {

@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
def this(handle: NDArrayHandle,
writable: Boolean = true,
addToCollector: Boolean = true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ import scala.collection.mutable
* });
* </pre>
*/
@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
object NDArrayCollector {
private val logger = LoggerFactory.getLogger(classOf[NDArrayCollector])

Expand All @@ -76,28 +76,28 @@ object NDArrayCollector {
* Create a collector which will dispose the collected NDArrays automatically.
* @return an auto-disposable collector.
*/
@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
def auto(): NDArrayCollector = new NDArrayCollector(true)

/**
* Create a collector allows users to later dispose the collected NDArray manually.
* @return a manually-disposable collector.
*/
@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
@Experimental
def manual(): NDArrayCollector = new NDArrayCollector(false)

/**
* Collect the NDArrays into the collector of the current thread.
* @param ndArray NDArrays need to be collected.
*/
@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
@varargs def collect(ndArray: NDArray*): Unit = {
currCollector.get().add(ndArray: _*)
}
}

@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
class NDArrayCollector private(private val autoDispose: Boolean = true,
private val doCollect: Boolean = true) {
// native ptr (handle) of the NDArray -> NDArray
Expand Down Expand Up @@ -147,7 +147,7 @@ class NDArrayCollector private(private val autoDispose: Boolean = true,
* @return The result of function <em>codeBlock</em>.
*/
@Experimental
@deprecated("Please use ResourceScope instead", "1.6.0")
@deprecated("Please use ResourceScope instead", "1.5.0")
def withScope[T](codeBlock: => T): T = {
val old = NDArrayCollector.currCollector.get()
NDArrayCollector.currCollector.set(this)
Expand Down
2 changes: 1 addition & 1 deletion scala-package/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@
<scala.version>2.11.8</scala.version>
<build.platform/>
<scala.binary.version>2.11</scala.binary.version>
<base.revision>1.5.0</base.revision>
<base.revision>1.6.0</base.revision>
<build.platform />
<cxx>g++</cxx>
<dollar>$</dollar>
Expand Down

0 comments on commit 7bc3db8

Please sign in to comment.