taliesinb commented on a change in pull request #12064: Allow stop of arange to
be inferred from dims.
URL: https://github.com/apache/incubator-mxnet/pull/12064#discussion_r211114930
##########
File path: contrib/clojure-package/src/org/apache/clojure_mxnet/symbol.clj
##########
@@ -135,7 +135,17 @@
([start stop {:keys [step repeat dtype]
:or {step (float 1) repeat (int 1) dtype base/MX_REAL_TYPE}
:as opts}]
- (Symbol/arange (float start) ($/option (float stop)) step repeat nil dtype))
+ (Symbol/arange (float start) ($/option (float stop)) step repeat false nil
dtype))
+ ([start stop]
+ (arange start stop {})))
+
+(defn arange-with-inference
+ "Behaves like arange operator, but infers the stop value from the output
shape,
Review comment:
@gigasquid happy to try to do that! i haven't ever used Clojure or Scala
before. But I've run into a problem even getting the first step, `make
scalapkg`, to work on macOS. The make initially failed, comlpaining it couldn't
find the mvn executable. I assumed that was maven, `brew install maven` had me
first `brew install java`. Then `make scalapkg` seemed to be happy, and
downloaded a bunch of stuff (including scala). But it failed with this:
```
[INFO] /Users/taliesinb/git/MXNet/scala-package/init/src/main/scala:-1:
info: compiling
[INFO] Compiling 2 source files to
/Users/taliesinb/git/MXNet/scala-package/init/target/classes at 1534710433224
Downloading from central:
https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/scala-lang/modules/scala-xml_2.11/1.0.4/scala-xml_2.11-1.0.4.jar
(648 kB at 755 kB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/scala-lang/scala-library/2.11.4/scala-library-2.11.4.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/scala-lang/scala-library/2.11.4/scala-library-2.11.4.jar
(5.5 MB at 1.3 MB/s)
Downloading from central:
https://repo.maven.apache.org/maven2/org/scala-lang/scala-library/2.11.6/scala-library-2.11.6.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/scala-lang/scala-library/2.11.6/scala-library-2.11.6.jar
(5.6 MB at 1.2 MB/s)
[INFO] compiler plugin: BasicArtifact(org.scalamacros,paradise_2.11.8,2.1.0)
Downloading from central:
https://repo.maven.apache.org/maven2/org/scalamacros/paradise_2.11.8/2.1.0/paradise_2.11.8-2.1.0.jar
Downloaded from central:
https://repo.maven.apache.org/maven2/org/scalamacros/paradise_2.11.8/2.1.0/paradise_2.11.8-2.1.0.jar
(271 kB at 397 kB/s)
[ERROR] error: scala.reflect.internal.MissingRequirementError: object
java.lang.Object in compiler mirror not found.
[ERROR] at
scala.reflect.internal.MissingRequirementError$.signal(MissingRequirementError.scala:17)
[ERROR] at
scala.reflect.internal.MissingRequirementError$.notFound(MissingRequirementError.scala:18)
[INFO] at
scala.reflect.internal.Mirrors$RootsBase.getModuleOrClass(Mirrors.scala:53)
```
This seems to be related to https://issues.scala-lang.org/browse/SI-9103,
but that issue is still open. I have no idea whats going on or how to make
progress. I reran the `make scalapkg` to no effect, here's a gist with the full
output: https://gist.github.com/taliesinb/d0f09e9f0202c3983298511383542f59. Do
you have any suggestions?
----------------------------------------------------------------
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