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

Commit

Permalink
fix tests (#14565)
Browse files Browse the repository at this point in the history
  • Loading branch information
gigasquid authored and nswamy committed Apr 5, 2019
1 parent e761e2f commit b4583cb
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 22 deletions.
28 changes: 12 additions & 16 deletions contrib/clojure-package/test/dev/generator_test.clj
Original file line number Diff line number Diff line change
Expand Up @@ -86,19 +86,17 @@
(is (= "LRN" (-> lrn-info vals ffirst :name str)))))

(deftest test-symbol-vector-args
;; FIXME
#_(is (= `(if (clojure.core/map? kwargs-map-or-vec-or-sym)
(is (= '(if (clojure.core/map? kwargs-map-or-vec-or-sym)
(util/empty-list)
(util/coerce-param
kwargs-map-or-vec-or-sym
#{"scala.collection.Seq"}))
kwargs-map-or-vec-or-sym
#{"scala.collection.Seq"}))
(gen/symbol-vector-args))))

(deftest test-symbol-map-args
;; FIXME
#_(is (= `(if (clojure.core/map? kwargs-map-or-vec-or-sym)
(is (= '(if (clojure.core/map? kwargs-map-or-vec-or-sym)
(org.apache.clojure-mxnet.util/convert-symbol-map
kwargs-map-or-vec-or-sym)
kwargs-map-or-vec-or-sym)
nil)
(gen/symbol-map-args))))

Expand Down Expand Up @@ -160,14 +158,13 @@
:exception-types [],
:flags #{:public}}]}
function-name (symbol "div")]
;; FIXME
#_(is (= '(([sym sym-or-Object]
(is (= '(([sym sym-or-object]
(util/coerce-return
(.$div
sym
(util/nil-or-coerce-param
sym-or-Object
#{"org.apache.mxnet.Symbol" "java.lang.Object"})))))
(.$div
sym
(util/nil-or-coerce-param
sym-or-object
#{"org.apache.mxnet.Symbol" "java.lang.Object"})))))
(gen/gen-symbol-function-arity op-name op-values function-name)))))

(deftest test-gen-ndarray-function-arity
Expand Down Expand Up @@ -210,5 +207,4 @@
fname)
good-contents (slurp "test/good-test-ndarray.clj")
contents (slurp fname)]
;; FIXME
#_(is (= good-contents contents)))))
(is (= good-contents contents)))))
1 change: 1 addition & 0 deletions contrib/clojure-package/test/good-test-ndarray.clj
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,4 @@
ndarray-or-double-or-float
#{"org.apache.mxnet.MX_PRIMITIVES$MX_PRIMITIVE_TYPE"
"org.apache.mxnet.NDArray"})))))

Original file line number Diff line number Diff line change
Expand Up @@ -246,6 +246,7 @@
d-shape1 [10 3 64 64]
d-shape2 [10 3 32 32]
l-shape [10]

mod (m/module my-sym {:data-names ["data1" "data2"]})
data-batch {:data [(ndarray/random-uniform 0 9 (str (mx-shape/->shape d-shape1)))
(ndarray/random-uniform 5 15 (str (mx-shape/->shape d-shape2)))]
Expand Down Expand Up @@ -280,9 +281,8 @@
:index nil
:pad 0}]
(-> mod
(m/forward data-batch))
;; FIXME
#_(is (= [(first l-shape) num-class]
(m/forward data-batch-2))
(is (= [(first l-shape) num-class]
(-> mod
(m/outputs-merged)
(first)
Expand All @@ -301,9 +301,8 @@
:index nil
:pad 0}]
(-> mod
(m/forward data-batch))
;; FIXME
#_(is (= [(first l-shape) num-class]
(m/forward data-batch-2))
(is (= [(first l-shape) num-class]
(-> mod
(m/outputs-merged)
(first)
Expand Down

0 comments on commit b4583cb

Please sign in to comment.