Added CUTOFF parameter

This commit is contained in:
s444380 2022-03-27 12:25:33 +02:00
parent ae8779f171
commit e9ce9ea17f
2 changed files with 9 additions and 3 deletions

10
Jenkinsfile vendored
View File

@ -12,6 +12,11 @@ pipeline {
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
name: 'KAGGLE_KEY'
)
string(
defaultValue: "260000",
description: 'Use CUTOFF random examples from dataset',
name: 'CUTOFF'
)
}
stages {
stage('Hello') {
@ -27,8 +32,9 @@ pipeline {
stage("Download data") {
steps {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
sh "./download_data.sh"
"KAGGLE_KEY=${params.KAGGLE_KEY}",
"CUTOFF=%{params.CUTOFF}"]) {
sh "./download_data.sh $CUTOFF"
archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true
}
}

View File

@ -2,7 +2,7 @@
kaggle datasets download -d AnalyzeBoston/crimes-in-boston
unzip crimes-in-boston.zip
shuf crime.csv > crime.shuf
shuf crime.csv | head -n $1 > crime.shuf
head -n 30000 crime.shuf > crime.test
head -n 60000 crime.shuf | tail -n 30000 > crime.dev
tail -n +60001 crime.shuf > crime.train