Add local server

TEST=None
BUG=None

Change-Id: Ie4960db1dcb60abde4dadb41b52ecad2d8c7732c
1 file changed
tree: 9370df5724e28140bce1d0e9bfed88ed7118e12c
  1. bin/
  2. creds/
  3. lib/
  4. model/
  5. notebooks/
  6. .gitignore
  7. app.yaml
  8. appengine_config.py
  9. deploy_app.py
  10. gunicorn.conf.py
  11. main.py
  12. Pipfile
  13. Pipfile.lock
  14. PRESUBMIT.cfg
  15. pytest.ini
  16. README.md
README.md

Bad CL Detector

https://chromium.googlesource.com/chromiumos/infra/bad_cl_detector

Purpose:

A system to detect if a given build failure is caused by bad CL.

Getting started

The virtualenv for this project is managed with pipenv. If you don't already have pipenv installed, you can install it with “pip install pipenv”.

Then run:

deactivate  # make sure you are not already in a virtualenv
pipenv --two install
protoc -I=lib/protos --python_out=lib/protos

You can fetch cidb credentials with “cros cidbcreds”. You will need to pass in the db credentials' path to the script.

Training & cross validation

Downloading training data, training a model and cross validating is done by one script:

pipenv run python lib/bad_cl_detector_driver.py --cred-dir=$CRED_DIR

Or, you can enter a virtualenv shell with “pipenv shell”, and then just run python lib/.

Currently this requires word2vec and word2int files to work. Making this self-contained is a work in progress.

Tests

Tests are run with pytest:

pipenv run pytest