<commit_before>language: python
python:
  - "2.7"
  - "3.6"
env:
  global:
    - T2T_PROBLEM=algorithmic_reverse_binary40_test
    - T2T_DATA_DIR=/tmp/t2t-data
    - T2T_TRAIN_DIR=/tmp/t2t-train
  matrix:
    - TF_VERSION="1.4.*"
    - TF_VERSION="1.5.*"
    - TF_VERSION="1.6.0rc1"
matrix:
  exclude:
    - python: "3.6"
      env: TF_VERSION="1.4.*"
    - python: "3.6"
      env: TF_VERSION="1.6.0rc1"
before_install:
  - echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list
  - curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
  - sudo apt-get update -qq
  - sudo apt-get install -qq libhdf5-dev
  - sudo apt-get install -qq tensorflow-model-server
install:
  - pip install -q "tensorflow==$TF_VERSION"
  - pip install -q .[tests]
  # Make sure we have the latest version of numpy - avoid problems we were
  # seeing with Python 3
  - pip install -q -U numpy
script:
  # Check import
  - python -c "from tensor2tensor.models import transformer; print(transformer.Transformer.__name__)"

  # Run tests
  - pytest --ignore=tensor2tensor/utils/registry_test.py --ignore=tensor2tensor/problems_test.py --ignore=tensor2tensor/utils/trainer_lib_test.py --ignore=tensor2tensor/data_generators/algorithmic_math_test.py --ignore=tensor2tensor/bin/t2t_trainer_test.py
  - pytest tensor2tensor/utils/registry_test.py
  - pytest tensor2tensor/utils/trainer_lib_test.py

  # Run installed scripts
  - t2t-datagen 2>&1 | grep translate && echo passed
  - t2t-trainer --registry_help

  # Test --t2t_usr_dir
  - t2t-trainer --registry_help --t2t_usr_dir=./tensor2tensor/test_data/example_usr_dir 2>&1 | grep my_very_own_hparams && echo passed
<commit_msg>travis fix<commit_after>language: python
python:
  - "2.7"
  - "3.6"
env:
  global:
    - T2T_PROBLEM=algorithmic_reverse_binary40_test
    - T2T_DATA_DIR=/tmp/t2t-data
    - T2T_TRAIN_DIR=/tmp/t2t-train
  matrix:
    - TF_VERSION="1.4.*"
    - TF_VERSION="1.5.*"
    - TF_VERSION="1.6.0rc1"
matrix:
  exclude:
    - python: "3.6"
      env: TF_VERSION="1.4.*"
    - python: "3.6"
      env: TF_VERSION="1.6.0rc1"
before_install:
  - echo "deb [arch=amd64] http://storage.googleapis.com/tensorflow-serving-apt stable tensorflow-model-server tensorflow-model-server-universal" | sudo tee /etc/apt/sources.list.d/tensorflow-serving.list
  - curl https://storage.googleapis.com/tensorflow-serving-apt/tensorflow-serving.release.pub.gpg | sudo apt-key add -
  - sudo apt-get update -qq
  - sudo apt-get install -qq libhdf5-dev
  - sudo apt-get install -qq tensorflow-model-server
install:
  - pip install -q "tensorflow==$TF_VERSION"
  - pip install -q .[tests]
  # Make sure we have the latest version of numpy - avoid problems we were
  # seeing with Python 3
  - pip install -q -U numpy
script:
  # Check import
  - python -c "from tensor2tensor.models import transformer; print(transformer.Transformer.__name__)"

  # Run tests
  - pytest
     --ignore=tensor2tensor/utils/registry_test.py
     --ignore=tensor2tensor/utils/trainer_lib_test.py
     --ignore=tensor2tensor/visualization/visualization_test.py
     --ignore=tensor2tensor/problems_test.py
     --ignore=tensor2tensor/data_generators/algorithmic_math_test.py
     --ignore=tensor2tensor/rl/rl_trainer_lib_test.py
  - pytest tensor2tensor/utils/registry_test.py
  - pytest tensor2tensor/utils/trainer_lib_test.py
  - pytest tensor2tensor/visualization/visualization_test.py

  # Run installed scripts
  - t2t-datagen 2>&1 | grep translate && echo passed
  - t2t-trainer --registry_help

  # Test --t2t_usr_dir
  - t2t-trainer --registry_help --t2t_usr_dir=./tensor2tensor/test_data/example_usr_dir 2>&1 | grep my_very_own_hparams && echo passed

{'fraction_non_alphanumeric': 0.12263906856403622, 'fraction_numerical': 0.027166882276843468, 'mean_word_length': 3.469364161849711, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 7, 'https://': 2, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6757836', 'n_tokens_mistral': 1447, 'n_tokens_neox': 1398, 'n_words': 260}