-
Notifications
You must be signed in to change notification settings - Fork 6.8k
Conversation
@mxnet-label-bot add [Scala, Maven, pr-awaiting-review] |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- General question: why we need to import postfixop library?
- Please also explain the comments below
All the rest looks fine since covered by the tests.
} | ||
} | ||
|
||
private val _provideLabel: ListMap[String, Shape] = { | ||
@deprecated("Please use provideDataDesc instead", "1.3.0") | ||
override def provideLabel: ListMap[String, Shape] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why not make it private?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _provideLabel was a private implementation of the externally accessible provideLabel. I thought there was no point in having both so I combined them and left the public one.
@@ -39,7 +39,7 @@ object NeuralStyle { | |||
private val logger = LoggerFactory.getLogger(classOf[NeuralStyle]) | |||
|
|||
def preprocessContentImage(path: String, longEdge: Int, ctx: Context): NDArray = { | |||
val img = Image(new File(path)) | |||
val img = Image.fromFile(new File(path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why change this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a warning against using Image(). I don't remember what the warning was, though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The import of postfix, along with the rest of scala.language, is to enable various language features that are not default. The postfix operation seemed to mostly be used for CLI execution such as:
"python -m SimpleHTTPServer" !
} | ||
} | ||
|
||
private val _provideLabel: ListMap[String, Shape] = { | ||
@deprecated("Please use provideDataDesc instead", "1.3.0") | ||
override def provideLabel: ListMap[String, Shape] = { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The _provideLabel was a private implementation of the externally accessible provideLabel. I thought there was no point in having both so I combined them and left the public one.
@@ -39,7 +39,7 @@ object NeuralStyle { | |||
private val logger = LoggerFactory.getLogger(classOf[NeuralStyle]) | |||
|
|||
def preprocessContentImage(path: String, longEdge: Int, ctx: Context): NDArray = { | |||
val img = Image(new File(path)) | |||
val img = Image.fromFile(new File(path)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a warning against using Image(). I don't remember what the warning was, though.
Does the Scala GPU failure related to your changes? |
* Feature and Deprecation Warnings * Address feature and deprecation Warnings (mostly provideData) * Fix name search
* Feature and Deprecation Warnings * Address feature and deprecation Warnings (mostly provideData) * Fix name search
Description
This PR fixes the feature/deprecation warnings and makes them display as part of the Maven run by default. Most of the fixes are related to the change to IndexedSeq[DataDesc]. Contains a part of #13995.
@lanking520 @andrewfayres
Checklist
Essentials
Please feel free to remove inapplicable items for your PR.