Clone this repo:
  1. 899f13f Add more imports required for tests by Paul Hobbs · 6 weeks ago firmware-scarlet-10388.B master release-R65-10323.B
  2. 07f0089 Use absolute imports by Paul Hobbs · 6 weeks ago
  3. 58a69f0 Add route for classifying CLs in a build by Paul Hobbs · 6 weeks ago
  4. 10ce327 Added GBM model evaluation functions by Paul Hobbs · 6 weeks ago
  5. 0288996 notebooks: Got 0.89 AUC with GBM by Paul Hobbs · 6 weeks ago

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