diff --git a/.travis.yml b/.travis.yml index 13d9899e9..1f3b19ae6 100644 --- a/.travis.yml +++ b/.travis.yml @@ -56,6 +56,7 @@ matrix: - RAY_GCS_SERVICE_ENABLED=false install: - eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py` + - if [ $RAY_CI_ONLY_RLLIB_AFFECTED == "1" ]; then exit; fi - ./ci/travis/install-bazel.sh - ./ci/suppress_output ./ci/travis/install-dependencies.sh - export PATH="$HOME/miniconda/bin:$PATH" @@ -63,6 +64,7 @@ matrix: - ./ci/suppress_output ./ci/travis/install-cython-examples.sh - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=master bash)" script: + - if [ $RAY_CI_ONLY_RLLIB_AFFECTED == "1" ]; then exit; fi - ./ci/suppress_output bash src/ray/test/run_core_worker_tests.sh - ./ci/suppress_output bash streaming/src/test/run_streaming_queue_test.sh - ./java/test.sh @@ -76,6 +78,7 @@ matrix: - RAY_GCS_SERVICE_ENABLED=false install: - eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py` + - if [ $RAY_CI_ONLY_RLLIB_AFFECTED == "1" ]; then exit; fi - ./ci/travis/install-bazel.sh - ./ci/suppress_output ./ci/travis/install-dependencies.sh - export PATH="$HOME/miniconda/bin:$PATH" @@ -83,6 +86,7 @@ matrix: - ./ci/suppress_output ./ci/travis/install-cython-examples.sh - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=master bash)" script: + - if [ $RAY_CI_ONLY_RLLIB_AFFECTED == "1" ]; then exit; fi - export PATH="$HOME/miniconda/bin:$PATH" - ./ci/keep_alive bazel test --spawn_strategy=local --flaky_test_attempts=3 --nocache_test_results --test_verbose_timeout_warnings --progress_report_interval=100 --show_progress_rate_limit=100 --show_timestamps --test_output=errors --test_tag_filters=-jenkins_only python/ray/tests/... @@ -152,7 +156,6 @@ matrix: script: - if [ $RAY_CI_LINUX_WHEELS_AFFECTED != "1" ]; then exit; fi - # Explicitly sleep 60 seconds for logs to go through - ./ci/travis/test-wheels.sh || { cat /tmp/ray/session_latest/logs/* && sleep 60 && false; } cache: false @@ -318,7 +321,7 @@ matrix: install: - eval `python $TRAVIS_BUILD_DIR/ci/travis/determine_tests_to_run.py` - - if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_RLLIB_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi + - if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi - ./ci/travis/install-bazel.sh - ./ci/suppress_output ./ci/travis/install-dependencies.sh @@ -329,6 +332,8 @@ install: - eval "$(curl -sL https://raw.githubusercontent.com/travis-ci/gimme/master/gimme | GIMME_GO_VERSION=master bash)" script: + - if [ $RAY_CI_SERVE_AFFECTED != "1" ] && [ $RAY_CI_TUNE_AFFECTED != "1" ] && [ $RAY_CI_PYTHON_AFFECTED != "1" ]; then exit; fi + - export PATH="$HOME/miniconda/bin:$PATH" # raylet integration tests diff --git a/ci/travis/determine_tests_to_run.py b/ci/travis/determine_tests_to_run.py index bbdd1f13b..e653277f4 100644 --- a/ci/travis/determine_tests_to_run.py +++ b/ci/travis/determine_tests_to_run.py @@ -33,8 +33,9 @@ def list_changed_files(commit_range): if __name__ == "__main__": RAY_CI_TUNE_AFFECTED = 0 - RAY_CI_RLLIB_AFFECTED = 0 - RAY_CI_RLLIB_FULL_AFFECTED = 0 + RAY_CI_ONLY_RLLIB_AFFECTED = 0 # Whether only RLlib is affected. + RAY_CI_RLLIB_AFFECTED = 0 # Whether RLlib minimal tests should be run. + RAY_CI_RLLIB_FULL_AFFECTED = 0 # Whether full RLlib tests should be run. RAY_CI_SERVE_AFFECTED = 0 RAY_CI_JAVA_AFFECTED = 0 RAY_CI_PYTHON_AFFECTED = 0 @@ -129,10 +130,19 @@ if __name__ == "__main__": RAY_CI_STREAMING_PYTHON_AFFECTED = 1 RAY_CI_STREAMING_JAVA_AFFECTED = 1 + if not RAY_CI_TUNE_AFFECTED and not RAY_CI_SERVE_AFFECTED and \ + not RAY_CI_JAVA_AFFECTED and not RAY_CI_PYTHON_AFFECTED and not \ + RAY_CI_STREAMING_CPP_AFFECTED and \ + not RAY_CI_STREAMING_PYTHON_AFFECTED and \ + not RAY_CI_STREAMING_JAVA_AFFECTED: + RAY_CI_ONLY_RLLIB_AFFECTED = 1 + # Log the modified environment variables visible in console. for output_stream in [sys.stdout, sys.stderr]: _print = partial(print, file=output_stream) _print("export RAY_CI_TUNE_AFFECTED={}".format(RAY_CI_TUNE_AFFECTED)) + _print("export RAY_CI_ONLY_RLLIB_AFFECTED={}" + .format(RAY_CI_ONLY_RLLIB_AFFECTED)) _print("export RAY_CI_RLLIB_AFFECTED={}".format(RAY_CI_RLLIB_AFFECTED)) _print("export RAY_CI_RLLIB_FULL_AFFECTED={}".format( RAY_CI_RLLIB_FULL_AFFECTED)) diff --git a/rllib/policy/rnn_sequencing.py b/rllib/policy/rnn_sequencing.py index e55639fa2..a45c84845 100644 --- a/rllib/policy/rnn_sequencing.py +++ b/rllib/policy/rnn_sequencing.py @@ -158,7 +158,7 @@ def chop_into_sequences(episode_ids, _extra_padding=0): """Truncate and pad experiences into fixed-length sequences. - Arguments: + Args: episode_ids (list): List of episode ids for each step. unroll_ids (list): List of identifiers for the sample batch. This is used to make sure sequences are cut between sample batches.