From 9f2f4e287712eca3d50346522edef5959db0e7cd Mon Sep 17 00:00:00 2001 From: Greg Steuck Date: Fri, 28 Oct 2016 18:08:32 -0700 Subject: [PATCH] Fixed CI and added indicator. (#15) * Sorted test names. * Don't require a terminal to run tests. Should resolve "the input device is not a TTY" problem with Jenkins. * Added build indicator to README.md. * Fixed up URL. --- README.md | 2 ++ ci_build/outer_launch_tests.sh | 2 +- tensorflow-nn/tests/NNTest.hs | 12 ++++++------ 3 files changed, 9 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 80cb9c6..f95c943 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,5 @@ +[![Build Status](https://ci.tensorflow.org/buildStatus/icon?job=tensorflow-haskell-master)](https://ci.tensorflow.org/job/tensorflow-haskell-master) + The tensorflow-haskell package provides Haskell bindings to [TensorFlow](https://www.tensorflow.org/). diff --git a/ci_build/outer_launch_tests.sh b/ci_build/outer_launch_tests.sh index a9f935f..f4aba13 100755 --- a/ci_build/outer_launch_tests.sh +++ b/ci_build/outer_launch_tests.sh @@ -8,4 +8,4 @@ IMAGE_NAME=tensorflow/haskell/ci_build:v0 git submodule update docker build -t $IMAGE_NAME -f ci_build/Dockerfile . -docker run -ti $IMAGE_NAME stack test +docker run $IMAGE_NAME stack test diff --git a/tensorflow-nn/tests/NNTest.hs b/tensorflow-nn/tests/NNTest.hs index acc09f0..ce8a9b1 100644 --- a/tensorflow-nn/tests/NNTest.hs +++ b/tensorflow-nn/tests/NNTest.hs @@ -78,20 +78,20 @@ testLogisticOutput = testCase "testLogisticOutput" $ do vTargets = TF.vector $ targets inputs tfLoss = TF.sigmoidCrossEntropyWithLogits vLogits vTargets ourLoss = V.fromList $ sigmoidXentWithLogits (logits inputs) (targets inputs) - + r <- run tfLoss assertAllClose r ourLoss testLogisticOutputMultipleDim = testCase "testLogisticOutputMultipleDim" $ do - let inputs = defInputs + let inputs = defInputs shape = [2, 2, 2] vLogits = TF.constant shape (logits inputs) vTargets = TF.constant shape (targets inputs) tfLoss = TF.sigmoidCrossEntropyWithLogits vLogits vTargets ourLoss = V.fromList $ sigmoidXentWithLogits (logits inputs) (targets inputs) - + r <- run tfLoss assertAllClose r ourLoss @@ -101,7 +101,7 @@ testGradientAtZero = testCase "testGradientAtZero" $ do vLogits = TF.vector $ logits inputs vTargets = TF.vector $ targets inputs tfLoss = TF.sigmoidCrossEntropyWithLogits vLogits vTargets - + r <- run $ do l <- tfLoss TF.gradients l [vLogits] @@ -113,7 +113,7 @@ run = TF.runSession . TF.buildAnd TF.run main :: IO () -main = googleTest [ testLogisticOutput +main = googleTest [ testGradientAtZero + , testLogisticOutput , testLogisticOutputMultipleDim - , testGradientAtZero ]