{"id":29795487,"url":"https://github.com/ubisoft/ubisoft-laforge-brownbuild","last_synced_at":"2026-03-06T07:02:19.926Z","repository":{"id":40342714,"uuid":"379710240","full_name":"ubisoft/ubisoft-laforge-brownbuild","owner":"ubisoft","description":null,"archived":false,"fork":false,"pushed_at":"2022-05-13T21:41:09.000Z","size":1822,"stargazers_count":3,"open_issues_count":2,"forks_count":4,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-08-20T11:21:30.047Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ubisoft.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-06-23T19:32:57.000Z","updated_at":"2023-07-12T00:28:25.000Z","dependencies_parsed_at":"2022-08-09T17:41:13.966Z","dependency_job_id":null,"html_url":"https://github.com/ubisoft/ubisoft-laforge-brownbuild","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/ubisoft/ubisoft-laforge-brownbuild","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fubisoft-laforge-brownbuild","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fubisoft-laforge-brownbuild/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fubisoft-laforge-brownbuild/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fubisoft-laforge-brownbuild/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ubisoft","download_url":"https://codeload.github.com/ubisoft/ubisoft-laforge-brownbuild/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ubisoft%2Fubisoft-laforge-brownbuild/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":30164895,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-03-06T04:43:31.446Z","status":"ssl_error","status_checked_at":"2026-03-06T04:40:30.133Z","response_time":250,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2025-07-28T04:11:09.980Z","updated_at":"2026-03-06T07:02:19.907Z","avatar_url":"https://github.com/ubisoft.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Brown Build code \n\nThis projects aims at identifying brown builds (unreliable builds) from the CI \nbuild jobs. In this folder, you'll find the source code to extract words from \nbuild jobs' log files and to create process the extracted vocabulary and \nclassify the jobs using a XGBoost model.\n\n## Requirements\n\nTo run the scripts, you need to have Golang installed and Python 3.\n\nFor Python, the requirements are provided in the file `requirements.txt`.\nRun the following line for installing the requirements:\n\n```\npip install -r requirements.txt\n```\n\n\n## Dataset\nTo be able to run the script, you should have a folder containing job logs with \ntitle:\n\n{builddate}\\_{buildid}\\_{commitid}\\_{classification}\\_{buildname}.log \n\n- {builddate} is the date at which the build was started in the following format YYYY\\_MM\\_DD\\_HH\\_MM\\_SS \n- {buildid} is the id of the build job\n- {commitid} is the cl / commit hash that was built \n- {classification} shows if the build failed (1) or succeeded (0) \n- {buildname} is the name of the build job\n\nA dataset already scrapted is provided with this project. You can find it under \n`graphviz/`. Five zip are provided and all the job logs of those 5 zips should be \nput in a same directory, for example, in `./dataset/graphviz/`.\n\nCaution: unzipped, `graphviz.zip` contains 37GB of data.\n\n## Vocabulary extraction\nThe vocabulary extraction is done using the `main_extract.go` file. The \ncommand line to use is the following:\n\n```\ngo run main_extract.go -proc 5 -path ./dataset/graphviz/ -out ./dataset/graphviz_extracted/\n```\n\nOutput:\n\n```\nDone ./dataset/graphviz_extracted/\n---  1h22m30.5163144s  ---\n```\n## Model creation and evaluation\n\n### Simple cross validation run \nTo create the brown build detection prototype and test it on your dataset using \ncross validation, use the following command line. The example is given using \nthe graphviz dataset.\n\n```\npython main_process.py -d ./dataset/graphviz_extracted/\n```\n\nThe output should look like this:\n\nOutput:\n\n```\nExperiment: {'path_data': './dataset/graphviz_extracted/'}\nLoad  experiments/default/data.p ... (computing) ...Done in 374.79 sec\nLoad  experiments/default/sets.p ... (computing) ...Done in 12.12 sec\nLoad  experiments/default/vectors.p ... (computing) ...Done in 121.72 sec\nRun          | F1-Score     Precision    Recall       Specificity  |\n--------------------------------------------------------------------\nRANDOM50     | 10.4         13.1         50.0         50.0         |\nRANDOMB      | 6.5          13.1         13.1         86.9         |\nALWAYSBROWN  | 11.6         13.1         100          0            |\nXGB          | 60.0         60.0         60.0         96.7         |\n===== TOTAL TIME:  509.37 sec =====\n```\n\n\n### 10fold cross validation run # Brown Build code \n\nThis projects aims at identifying brown builds (unreliable builds) from the CI \nbuild jobs. In this folder, you'll find the source code to extract words from \nbuild jobs' log files and to create process the extracted vocabulary and \nclassify the jobs using a XGBoost model.\n\n## Requirements\n\nTo run the scripts, you need to have Golang installed and Python 3.\n\nFor Python, the requirements are provided in the file `requirements.txt`.\nRun the following line for installing the requirements:\n\n```\npip install -r requirements.txt\n```\n\n\n## Dataset\nTo be able to run the script, you should have a folder containing job logs with \ntitle:\n\n{builddate}\\_{buildid}\\_{commitid}\\_{classification}\\_{buildname}.log \n\n- {builddate} is the date at which the build was started in the following format YYYY\\_MM\\_DD\\_HH\\_MM\\_SS \n- {buildid} is the id of the build job\n- {commitid} is the cl / commit hash that was built \n- {classification} shows if the build failed (1) or succeeded (0) \n- {buildname} is the name of the build job\n\nA dataset already scrapted is provided with this project. You can find it under \n`dataset/graphviz.zip`. Extract the zip in the dataset directory.\n\n## Vocabulary extraction\nThe vocabulary extraction is done using the `main_extract.exe` file. The \ncommand line to use is the following:\n\n```\n./main_extract.exe -proc 5 -path ./dataset/graphviz/ -out ./dataset/graphviz_extracted/\n```\n\nThis executable was build on a Windows machine, so if it is not working for you \nmachine or if you want to run the source code itself, the go file is also \nprovided. To run the go file, use the following command line:\n```\ngo run main_extract.go -proc 5 -path ./dataset/graphviz/ -out ./dataset/graphviz_extracted/\n```\n\nOutput (in both cases):\n\n```\nDone ./dataset/graphviz_extracted/\n---  1h22m30.5163144s  ---\n```\n## Model creation and evaluation\n\n### Simple cross validation run \nTo create the brown build detection prototype and test it on your dataset using \ncross validation, use the following command line. The example is given using \nthe graphviz dataset.\n\n```\npython main_process.py -d ./dataset/graphviz_extracted/\n```\n\nThe output should look like this:\n\nOutput:\n\n```\nExperiment: {'path_data': './dataset/graphviz_extracted/'}\nLoad  experiments/default/data.p ... (computing) ...Done in 374.79 sec\nLoad  experiments/default/sets.p ... (computing) ...Done in 12.12 sec\nLoad  experiments/default/vectors.p ... (computing) ...Done in 121.72 sec\nRun          | F1-Score     Precision    Recall       Specificity  |\n--------------------------------------------------------------------\nRANDOM50     | 10.4         13.1         50.0         50.0         |\nRANDOMB      | 6.5          13.1         13.1         86.9         |\nALWAYSBROWN  | 11.6         13.1         100          0            |\nXGB          | 60.0         60.0         60.0         96.7         |\n===== TOTAL TIME:  509.37 sec =====\n```\n\n\n### 10fold cross validation run \nIf you want to use the 10fold cross validation as shown in the paper, use:\n\n```\npython main_process.py -d ./dataset/graphviz_extracted/ --10fold\n``` \n\nOutput:\n\n```\nExperiment: {'path_data': './dataset/graphviz_extracted/'}\nLoad  experiments/default/data.p ... (computing) ...Done in 375.12 sec\nLoad  experiments/default/sets_10fold.p ... (computing) ...Done in 119.29 sec\nLoad  experiments/default/vectors_10fold_run1_turn1.p ... (computing) ...Done in 106.1 sec\nLoad  experiments/default/vectors_10fold_run1_turn2.p ... (computing) ...Done in 107.34 sec\nLoad  experiments/default/vectors_10fold_run2_turn1.p ... (computing) ...Done in 146.73 sec\nLoad  experiments/default/vectors_10fold_run2_turn2.p ... (computing) ...Done in 145.48 sec\nLoad  experiments/default/vectors_10fold_run3_turn1.p ... (computing) ...Done in 140.68 sec\nLoad  experiments/default/vectors_10fold_run3_turn2.p ... (computing) ...Done in 140.43 sec\nLoad  experiments/default/vectors_10fold_run4_turn1.p ... (computing) ...Done in 133.3 sec\nLoad  experiments/default/vectors_10fold_run4_turn2.p ... (computing) ...Done in 135.65 sec\nLoad  experiments/default/vectors_10fold_run5_turn1.p ... (computing) ...Done in 122.81 sec\nLoad  experiments/default/vectors_10fold_run5_turn2.p ... (computing) ...Done in 123.76 sec\nLoad  experiments/default/vectors_10fold_run6_turn1.p ... (computing) ...Done in 141.75 sec\nLoad  experiments/default/vectors_10fold_run6_turn2.p ... (computing) ...Done in 143.56 sec\nLoad  experiments/default/vectors_10fold_run7_turn1.p ... (computing) ...Done in 128.52 sec\nLoad  experiments/default/vectors_10fold_run7_turn2.p ... (computing) ...Done in 125.67 sec\nLoad  experiments/default/vectors_10fold_run8_turn1.p ... (computing) ...Done in 155.09 sec\nLoad  experiments/default/vectors_10fold_run8_turn2.p ... (computing) ...Done in 157.36 sec\nLoad  experiments/default/vectors_10fold_run9_turn1.p ... (computing) ...Done in 144.89 sec\nLoad  experiments/default/vectors_10fold_run9_turn2.p ... (computing) ...Done in 143.88 sec\nLoad  experiments/default/vectors_10fold_run10_turn1.p ... (computing) ...Done in 131.99 sec\nLoad  experiments/default/vectors_10fold_run10_turn2.p ... (computing) ...Done in 138.7 sec\nRun          | F1-Score     Precision    Recall       Specificity  |\n--------------------------------------------------------------------\nRANDOM50     | 10.4         13.1         50.0         50.0         |\nRANDOMB      | 6.5          13.1         13.1         86.9         |\nALWAYSBROWN  | 11.6         13.1         100          0            |\nXGB          | 51.6         46.9         57.3         90.5         |\n===== TOTAL TIME:  3317.96 sec =====\n```\n\n### Additional parameters\nAdditional parameters are available to choose the Experiment set-up, which must be added after `python main_process.py`:\n- `-d \u003cstr\u003e` / `--path_data \u003cstr\u003e`: [mandatory] \n\n  Path to the extracted dataset.\n  \n- `--setting_name \u003cstr\u003e`: [optional]\n\n  Setting name. Will be used as directory name to save the pickle files. \n  (Default= 'default')\n  \n- `--ngram \u003clist\u003e`: [optional]\n\n  List of values N to consider (only values 1 and 2 are available with this extraction set-up)\n  (Default= [2])\n  \n- `--oversampling \u003cbool\u003e`: [optional]\n\n  Bool value. If True, the training set is oversampled.\n  (Default= True)\n  \n- `--fail_mask \u003cstr\u003e`: [optional]\n\n  String value. Indicates which mask to apply (possible values: Train, None or All)\n  (Default= 'Train')\n  \n- `--kbest_thresh \u003cint\u003e`: [optional]\n\n  Int value. K value for the K best feature selection.\n  (Default= 300)\n  \n- `--alpha \u003cint\u003e`: [optional]\n\n  Int value (between 0 and 100, multiples of 10). Weight of model 1 in prediction \n  (and 100-alpha is weight of model 2)\n  (Default= 70)\n  \n- `--beta \u003cint\u003e`: [optional]\n\n  Int value (between 10 and 90, multiples of 10). Threshold for prediction brown.\n  (Default= 10)\n  \n- `--10fold`: [optional]\n\n  If in the command, does the 10fold cross validation. If not, does simple cross validation.\n  \n- `--recompute`: [optional]\n\n  In in the command, does not use the previously computed pickles, recomputes everything.\n\n\n### Feature selection\n\nAn example of features selected are shown in the file `feature_extracted.txt`.\nThe 300 selected features are ordered by alphabetic order.\n\n\n© [2020] Ubisoft Entertainment. All Rights Reserved\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fubisoft-laforge-brownbuild","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fubisoft%2Fubisoft-laforge-brownbuild","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fubisoft%2Fubisoft-laforge-brownbuild/lists"}