Skip to content

Commit

Permalink
Fixes #82: Split up quick and end-to-end tests
Browse files Browse the repository at this point in the history
Imported from GitHub PR #82

PiperOrigin-RevId: 239996667
  • Loading branch information
cweill committed Mar 25, 2019
1 parent cdf2c5f commit 91fdf06
Show file tree
Hide file tree
Showing 6 changed files with 42 additions and 15 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
[run]
branch = True
source = adanet
parallel = True

[report]
# Regexes for lines to exclude from consideration
Expand Down
33 changes: 24 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,25 @@ env:
global:
- CODECOV_TOKEN="0d2c482b-f42c-4d4c-b092-cb628ad20857"
- BAZEL_VERSION=0.20.0
- COVERAGE_PROCESS_START=$PWD/.coveragerc
matrix:
# We test against recent versions of TensorFlow and tf-nightly.
# If updating, also update TF_LATEST above
# TODO: Enable recent versions on release
- TF_VERSION="1.9.*"
- TF_VERSION="1.10.*"
- TF_VERSION="1.11.*"
- TF_VERSION="1.12.*"
- TF_VERSION="1.13.*"
- TF_VERSION="tf-nightly"

# Quick test suite.
- TF_VERSION="1.9.*" SUITE="quick"
- TF_VERSION="1.10.*" SUITE="quick"
- TF_VERSION="1.11.*" SUITE="quick"
- TF_VERSION="1.12.*" SUITE="quick"
- TF_VERSION="1.13.*" SUITE="quick"
- TF_VERSION="tf-nightly" SUITE="quick"

# E2E Tests.
- TF_VERSION="1.9.*" SUITE="e2e"
- TF_VERSION="1.10.*" SUITE="e2e"
- TF_VERSION="1.11.*" SUITE="e2e"
- TF_VERSION="1.12.*" SUITE="e2e"
- TF_VERSION="1.13.*" SUITE="e2e"
- TF_VERSION="tf-nightly" SUITE="e2e"
before_install:
- sudo apt-get -y install pkg-config zip g++ zlib1g-dev unzip
- wget https://github.com/bazelbuild/bazel/releases/download/"$BAZEL_VERSION"/bazel-"$BAZEL_VERSION"-installer-linux-x86_64.sh
Expand All @@ -32,9 +41,15 @@ addons:
install:
- pip install -r requirements.txt
- pip install numpy --upgrade
- pip install coverage-enable-subprocess
- ./oss_scripts/oss_pip_install.sh
script:
- nosetests
- |
if [ $SUITE == "e2e" ]; then
NOSE_EXCLUDE='.*workers.*' nosetests adanet/core/estimator_distributed_test.py
else
NOSE_EXCLUDE='.*nasnet.*.py|.*test_distributed_training.*' nosetests
fi
- cat /tmp/absl_testing/**/*.txt || true # Don't error if file does not exist.
after_success:
# Install codecov for tracking coverage over time.
Expand Down
18 changes: 16 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@ AdaNet provides the following AutoML features:
* Regression, binary and multi-class classification, and multi-head task support.
* A [`tf.estimator.Estimator`](https://www.tensorflow.org/guide/estimators) API for training, evaluation, prediction, and serving models.
* The [`adanet.AutoEnsembleEstimator`](https://github.com/tensorflow/adanet/blob/master/adanet/autoensemble/estimator.py) for learning to ensemble user-defined `tf.estimator.Estimators`.
* The ability to define subnetworks that change structure over time using [`tf.keras.layers`](https://www.tensorflow.org/guide/keras#functional_api) via the [`adanet.subnetwork` API](https://github.com/tensorflow/adanet/blob/master/adanet/subnetwork/generator.py).
* CPU, GPU, and TPU support.
* The ability to define subnetworks that change structure over time using [`tf.keras.layers`](https://www.tensorflow.org/guide/keras#functional_api) via the [`adanet.subnetwork` API](https://github.com/tensorflow/adanet/blob/master/adanet/core/subnetwork/generator.py).
* CPU and GPU support (TPU coming soon).
* [Distributed multi-server training](https://cloud.google.com/blog/products/gcp/easy-distributed-training-with-tensorflow-using-tfestimatortrain-and-evaluate-on-cloud-ml-engine).
* TensorBoard integration.

Expand Down Expand Up @@ -148,3 +148,17 @@ If you use this AdaNet library for academic research, you are encouraged to cite
## License

AdaNet is released under the [Apache License 2.0](LICENSE).

<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.css" integrity="sha384-dbVIfZGuN1Yq7/1Ocstc1lUEm+AT+/rCkibIcC/OmWo5f0EA48Vf8CytHzGrSwbQ" crossorigin="anonymous">
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/katex.min.js" integrity="sha384-2BKqo+exmr9su6dir+qCw08N2ZKRucY4PrGQPPWU1A7FtlCGjmEGFqXCv5nyM5Ij" crossorigin="anonymous"></script>
<script defer src="https://cdn.jsdelivr.net/npm/katex@0.10.1/dist/contrib/auto-render.min.js" integrity="sha384-kWPLUVMOks5AQFrykwIup5lo0m3iMkkHrD0uJ4H5cjeGihAutqP0yW0J6dpFiVkI" crossorigin="anonymous"></script>
<script>
document.addEventListener("DOMContentLoaded", function() {
renderMathInElement(document.body, {
delimiters: [
{left: "$$", right: "$$", display: true},
{left: "$", right: "$", display: false},
]
});
});
</script>
2 changes: 1 addition & 1 deletion adanet/core/estimator_distributed_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def test_distributed_training(self,
self._wait_for_processes(
worker_processes + evaluator_processes,
kill_processes=ps_processes,
timeout_secs=180)
timeout_secs=300)
finally:
for process in worker_processes + ps_processes + evaluator_processes:
try:
Expand Down
2 changes: 0 additions & 2 deletions oss_scripts/oss_pip_install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,6 @@
set -v # print commands as they're executed
set -e # fail and exit on any command erroring

BAZEL_VERSION=0.20.0

: "${TF_VERSION:?}"

if [[ "$TF_VERSION" == "tf-nightly" ]]
Expand Down
1 change: 0 additions & 1 deletion setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,3 @@ verbosity=3
rednose=1
with-coverage=1
cover-package=adanet
exclude=.*nasnet.*.py|.*estimator_distributed_test.py

0 comments on commit 91fdf06

Please sign in to comment.