diff --git a/Jenkinsfile b/Jenkinsfile index 20fa9f4..517a38d 100644 --- a/Jenkinsfile +++ b/Jenkinsfile @@ -28,15 +28,8 @@ pipeline { stages { stage('Run create-dataset script') { steps { - withEnv (["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}", "KAGGLE_KEY=${params.KAGGLE_KEY}"]) { - sh 'chmod +x create-dataset.py' - sh 'python3 ./create-dataset.py $KAGGLE_USERNAME' - } - } - } - stage('Archive Artifacts') { - steps { - archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true + sh 'chmod +x create-dataset.py' + sh 'python3 ./create-dataset.py $KAGGLE_USERNAME' } } } diff --git a/create-dataset.py b/create-dataset.py index d507f48..a4e6edc 100644 --- a/create-dataset.py +++ b/create-dataset.py @@ -93,24 +93,6 @@ def main(): os.system("rm -rf data/*") - df = load_data("creditcard.csv") - df = normalize_data(df) - - undersample_data, X_undersample, y_undersample = create_undersample_data(df) - X_train_undersample, X_test_undersample, y_train_undersample, y_test_undersample = ( - split_undersample_data(X_undersample, y_undersample) - ) - save_undersample_data( - undersample_data, - X_train_undersample, - X_test_undersample, - y_train_undersample, - y_test_undersample, - ) - - X_train, X_test, y_train, y_test = split_whole_data(df) - save_whole_data(df, X_train, X_test, y_train, y_test) - if __name__ == "__main__": main()