add CUTOFF parameter
This commit is contained in:
parent
ee709e639c
commit
f5cc717ffb
14
Jenkinsfile
vendored
14
Jenkinsfile
vendored
@ -12,7 +12,12 @@ node {
|
|||||||
defaultValue: '',
|
defaultValue: '',
|
||||||
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: '117926',
|
||||||
|
description: 'Number of positions to be saved',
|
||||||
|
name: 'CUTOFF',
|
||||||
|
trim: false)
|
||||||
])
|
])
|
||||||
])
|
])
|
||||||
}
|
}
|
||||||
@ -28,12 +33,13 @@ node {
|
|||||||
checkout scmGit(branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452662/ium_452662']])
|
checkout scmGit(branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[url: 'https://git.wmi.amu.edu.pl/s452662/ium_452662']])
|
||||||
}
|
}
|
||||||
stage('Cut data') {
|
stage('Cut data') {
|
||||||
|
withEnv(["CUTOFF=${params.CUTOFF}"]) {
|
||||||
sh '''kaggle datasets download -d aleksandrglotov/car-prices-poland
|
sh '''kaggle datasets download -d aleksandrglotov/car-prices-poland
|
||||||
unzip -o car-prices-poland.zip
|
unzip -o car-prices-poland.zip
|
||||||
wc -l Car_Prices_Poland_Kaggle.csv
|
wc -l Car_Prices_Poland_Kaggle.csv
|
||||||
head -n 11793 Car_Prices_Poland_Kaggle.csv > cars_test.csv
|
head -n $(($CUTTOFF / 10)) Car_Prices_Poland_Kaggle.csv > cars_test.csv
|
||||||
head -n 23586 Car_Prices_Poland_Kaggle.csv | tail -11793 > cars_dev.csv
|
head -n $(($CUTTOFF / 5)) Car_Prices_Poland_Kaggle.csv | tail $(($CUTTOFF / -10)) > cars_dev.csv
|
||||||
head -n 117926 Car_Prices_Poland_Kaggle.csv | tail -94340 > cars_train.csv'''
|
head -n $(($CUTTOFF) Car_Prices_Poland_Kaggle.csv | tail $(($CUTTOFF * (-4 / 5) )) > cars_train.csv'''}
|
||||||
}
|
}
|
||||||
stage('Save data into artifacts') {
|
stage('Save data into artifacts') {
|
||||||
archiveArtifacts artifacts: '*.csv', followSymlinks: false
|
archiveArtifacts artifacts: '*.csv', followSymlinks: false
|
||||||
|
Loading…
Reference in New Issue
Block a user