marcoabreu commented on a change in pull request #11383: [MXNET-565]change wget
into java download
URL: https://github.com/apache/incubator-mxnet/pull/11383#discussion_r197851003
##########
File path:
scala-package/examples/src/test/scala/org/apache/mxnetexamples/infer/imageclassifier/ImageClassifierExampleSuite.scala
##########
@@ -38,18 +40,30 @@ class ImageClassifierExampleSuite extends FunSuite with
BeforeAndAfterAll {
val tempDirPath = System.getProperty("java.io.tmpdir")
logger.info("tempDirPath: %s".format(tempDirPath))
- Process("wget https://s3.us-east-2.amazonaws.com/scala-infer-models" +
- "/resnet-18/resnet-18-symbol.json " + "-P " + tempDirPath + "/resnet18/
-q") !
+ val baseUrl = "https://s3.us-east-2.amazonaws.com/scala-infer-models"
- Process("wget https://s3.us-east-2.amazonaws.com/scala-infer-models"
- + "/resnet-18/resnet-18-0000.params " + "-P " + tempDirPath +
"/resnet18/ -q") !
-
- Process("wget https://s3.us-east-2.amazonaws.com/scala-infer-models" +
- "/resnet-18/synset.txt -P " + tempDirPath + "/resnet18/ -q") !
-
- Process("wget " +
- "https://s3.amazonaws.com/model-server/inputs/Pug-Cookie.jpg " +
- "-P " + tempDirPath + "/inputImages/") !
+ var tmpFile = new File(tempDirPath + "/resnet18/resnet-18-symbol.json")
+ if (!tmpFile.exists()) {
Review comment:
In the past, we had problems with corrupt files being downloaded, so this
check could cause problems. What do you think about moving this into a helper
function which has this logic as well as hash-validation?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services