Added CUTOFF parameter
This commit is contained in:
parent
ae8779f171
commit
e9ce9ea17f
10
Jenkinsfile
vendored
10
Jenkinsfile
vendored
@ -12,6 +12,11 @@ pipeline {
|
|||||||
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
description: 'Kaggle token taken from kaggle.json file, as described in https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||||
name: 'KAGGLE_KEY'
|
name: 'KAGGLE_KEY'
|
||||||
)
|
)
|
||||||
|
string(
|
||||||
|
defaultValue: "260000",
|
||||||
|
description: 'Use CUTOFF random examples from dataset',
|
||||||
|
name: 'CUTOFF'
|
||||||
|
)
|
||||||
}
|
}
|
||||||
stages {
|
stages {
|
||||||
stage('Hello') {
|
stage('Hello') {
|
||||||
@ -27,8 +32,9 @@ pipeline {
|
|||||||
stage("Download data") {
|
stage("Download data") {
|
||||||
steps {
|
steps {
|
||||||
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||||
"KAGGLE_KEY=${params.KAGGLE_KEY}"]) {
|
"KAGGLE_KEY=${params.KAGGLE_KEY}",
|
||||||
sh "./download_data.sh"
|
"CUTOFF=%{params.CUTOFF}"]) {
|
||||||
|
sh "./download_data.sh $CUTOFF"
|
||||||
archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true
|
archiveArtifacts artifacts: "crime.test, crime.dev, crime.train", onlyIfSuccessful: true
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -2,7 +2,7 @@
|
|||||||
|
|
||||||
kaggle datasets download -d AnalyzeBoston/crimes-in-boston
|
kaggle datasets download -d AnalyzeBoston/crimes-in-boston
|
||||||
unzip crimes-in-boston.zip
|
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 30000 crime.shuf > crime.test
|
||||||
head -n 60000 crime.shuf | tail -n 30000 > crime.dev
|
head -n 60000 crime.shuf | tail -n 30000 > crime.dev
|
||||||
tail -n +60001 crime.shuf > crime.train
|
tail -n +60001 crime.shuf > crime.train
|
||||||
|
Loading…
Reference in New Issue
Block a user