fix script 7

This commit is contained in:
Sheaza 2024-03-26 18:48:24 +01:00
parent c21a97aa41
commit c7dc76d113
2 changed files with 2 additions and 3 deletions

4
Jenkinsfile vendored
View File

@ -30,9 +30,9 @@ pipeline {
} }
stage('Download dataset') { stage('Download dataset') {
steps { steps {
withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}"]) { withEnv(["USERNAME=${params.USERNAME}", "API_KEY=${params.API_KEY}", "DATA_TRAIN_RATIO=${params.DATA_TRAIN_RATIO}", "CUTOFF=${params.CUTOFF}"]) {
sh "chmod +x download_dataset.sh" sh "chmod +x download_dataset.sh"
sh "./download_dataset.sh $DATA_TRAIN_RATIO" sh "./download_dataset.sh $DATA_TRAIN_RATIO" $CUTOFF
archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true archiveArtifacts artifacts: 'data.csv,train.csv,test.csv', onlyIfSuccessful: true
} }
} }

View File

@ -5,7 +5,6 @@ kaggle datasets download -d nikhil7280/student-performance-multiple-linear-regre
# change dataset name to data.csv # change dataset name to data.csv
mv Student_Performance.csv data.csv mv Student_Performance.csv data.csv
echo "$2"
# cut off rows # cut off rows
head -n "$2" data.csv > data.csv.tmp && mv data.csv.tmp data.csv head -n "$2" data.csv > data.csv.tmp && mv data.csv.tmp data.csv