From 7f7daee6545ab52988f1341e7b093259add3dd79 Mon Sep 17 00:00:00 2001 From: Haiyin Zhang Date: Thu, 26 May 2022 20:48:42 +0200 Subject: [PATCH 1/2] Update README.md --- README.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index 35b92af..ab1e368 100644 --- a/README.md +++ b/README.md @@ -40,15 +40,15 @@ hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,\ deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,\ randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,\ missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,\ -forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,\ +forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,\ dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch \ ---output-format=json:report.json,text:report.txt,colorized \ +--output-format=text:report.txt,colorized \ --reports=y \ ``` [For Windows Users]: ``` -pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=json:report.json,text:report.txt,colorized --reports=y +pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=text:report.txt,colorized --reports=y ``` Or place a [`.pylintrc` configuration file](https://github.com/Hynn01/dslinter/blob/main/docs/pylint-configuration-examples/pylintrc-with-only-dslinter-settings/.pylintrc) which contains above settings in the folder where you run your command on, and run: ``` @@ -141,7 +141,7 @@ poetry run pytest . - **W5517 | gradient-clear-pytorch | Gradient Clear Checker(PyTorch)**: The loss_fn.backward() and optimizer.step() should be used together with optimizer.zero_grad(). If the `.zero_grad()` is missing in the code, the rule is violated. -- **W5518 | data-leakage-scikitlearn | Data Leakage Checker(ScikitLearn)**: All scikit-learn estimators should be used inside Pipelines, to prevent data leakage between training and test data. +- **W5518 | pipeline-not-used-scikitlearn | Pipeline Checker(ScikitLearn)**: All scikit-learn estimators should be used inside Pipelines, to prevent data leakage between training and test data. - **W5519 | dependent-threshold-scikitlearn | Dependent Threshold Checker(TensorFlow)**: If threshold-dependent evaluation(e.g., f-score) is used in the code, check whether threshold-indenpendent evaluation(e.g., auc) metrics is also used in the code. From 2c64699b3a825a2fb492e73382e1cac3d895b36c Mon Sep 17 00:00:00 2001 From: Haiyin Zhang Date: Thu, 26 May 2022 20:49:49 +0200 Subject: [PATCH 2/2] Update STEPS_TO_FOLLOW.md --- STEPS_TO_FOLLOW.md | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/STEPS_TO_FOLLOW.md b/STEPS_TO_FOLLOW.md index 6f5ee9f..02b5d4f 100644 --- a/STEPS_TO_FOLLOW.md +++ b/STEPS_TO_FOLLOW.md @@ -27,15 +27,15 @@ hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,\ deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,\ randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,\ missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,\ -forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,\ +forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,\ dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch \ ---output-format=json:report.json,text:report.txt,colorized \ +--output-format=text:report.txt,colorized \ --reports=y \ ``` [For Windows Users]: ``` -pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=json:report.json,text:report.txt,colorized --reports=y +pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=text:report.txt,colorized --reports=y ``` ## For Notebook: @@ -67,13 +67,13 @@ hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,\ deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,\ randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,\ missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,\ -forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,\ +forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,\ dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch \ ---output-format=json:report.json,text:report.txt,colorized \ +--output-format=text:report.txt,colorized \ --reports=y \ ``` [For Windows Users]: ``` -pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,data-leakage-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=json:report.json,text:report.txt,colorized --reports=y +pylint --load-plugins=dslinter --disable=all --enable=import,unnecessary-iteration-pandas,unnecessary-iteration-tensorflow,nan-numpy,chain-indexing-pandas,datatype-pandas,column-selection-pandas,merge-parameter-pandas,inplace-pandas,dataframe-conversion-pandas,scaler-missing-scikitlearn,hyperparameters-scikitlearn,hyperparameters-tensorflow,hyperparameters-pytorch,memory-release-tensorflow,deterministic-pytorch,randomness-control-numpy,randomness-control-scikitlearn,randomness-control-tensorflow,randomness-control-pytorch,randomness-control-dataloader-pytorch,missing-mask-tensorflow,missing-mask-pytorch,tensor-array-tensorflow,forward-pytorch,gradient-clear-pytorch,pipeline-not-used-scikitlearn,dependent-threshold-scikitlearn,dependent-threshold-tensorflow,dependent-threshold-pytorch --output-format=text:report.txt,colorized --reports=y ```