Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Revert --quiet #1

Open
wants to merge 6 commits into
base: travis
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion tensorflow_probability/python/mcmc/hmc.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,7 +134,7 @@ def step_size_simple_update_fn(step_size_var, kernel_results):
tf.log(target_rate), log_mean_accept_ratio.dtype),
-decrement_multiplier / (1. + decrement_multiplier),
increment_multiplier)

a = True
def build_assign_op():
if mcmc_util.is_list_like(step_size_var):
return [
Expand Down
1 change: 1 addition & 0 deletions tensorflow_probability/python/mcmc/hmc_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,7 @@
def run_in_graph_mode_only(__unused__=None, config=None, use_gpu=True): # pylint: disable=invalid-name,unused-argument
"""Execute the decorated test in graph mode only."""
assert not __unused__, 'Add () after run_in_graph_mode_only.'
b = False
def decorator(f):
def decorated(self, **kwargs):
with context.graph_mode():
Expand Down
10 changes: 6 additions & 4 deletions testing/oss_lints.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,18 +28,20 @@ if [[ ${SHARD} != 0 ]]; then
fi

get_changed_py_files() {
# grep --quiet forces exit status 0 even if no matches are found
# Need to fetch the base branch in case it is not master.
git remote set-branches --add origin ${TRAVIS_BRANCH}
git fetch --depth=20 --quiet
git diff \
--name-only \
--diff-filter=AM ${TRAVIS_BRANCH}...HEAD \
| grep --quiet '^tensorflow_probability.*\.py$'
--diff-filter=AM origin/${TRAVIS_BRANCH}...HEAD \
| grep '^tensorflow_probability.*\.py$' || true
}

# Run lints on added/changed python files.
changed_py_files=$(get_changed_py_files)
if [[ -n "${changed_py_files}" ]]; then
echo "Running pylint on ${changed_py_files}"
pylint -j2 --rcfile=testing/pylintrc ${changed_py_files})
pylint -j2 --rcfile=testing/pylintrc ${changed_py_files}
else
echo "No files to lint."
fi
5 changes: 4 additions & 1 deletion testing/oss_tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,11 @@ shard_tests=$(bazel query 'tests(//tensorflow_probability/...)' |
# (short, moderate, long or eternal)
# --test_tag_filters -- skip tests whose 'tags' arg (if present) includes any
# of the comma-separated entries
# --action_env -- specify environment vars to pass through to action
# environment. (We need these in order to run inside a virtualenv.)
# See https://github.com/bazelbuild/bazel/issues/6648 and b/121259040.
echo "${shard_tests}" | xargs bazel test --copt=-O3 --copt=-march=native \
--noincompatible_strict_action_env \
--test_tag_filters=-gpu,-requires-gpu-sm35 \
--test_timeout 300,450,1200,3600 --build_tests_only \
--action_env=PATH --action_env=LD_LIBRARY_PATH \
--test_output=errors