Loading dataset script update
This commit is contained in:
parent
d84f6f6f43
commit
58f3c22b6e
32
Jenkinsfile
vendored
32
Jenkinsfile
vendored
@ -1,34 +1,22 @@
|
||||
node {
|
||||
// stage('Preparation') {
|
||||
// properties ([
|
||||
// parameters([
|
||||
// string(
|
||||
// defaultValue:'mateuszogrodowczyk',
|
||||
// description: 'Kaggle username',
|
||||
// name: 'KAGGLE_USERNAME',
|
||||
// trim: false
|
||||
// ),
|
||||
// password(
|
||||
// description: 'Kaggle access token retrieved from kaggle.json file - https://github.com/Kaggle/kaggle-api#api-credentials',
|
||||
// name: 'KAGGLE_KEY'
|
||||
// )
|
||||
// ])
|
||||
// ])
|
||||
// }
|
||||
|
||||
stage('checkout: Check out from version control') {
|
||||
git 'https://git.wmi.amu.edu.pl/s478841/ium_478841.git'
|
||||
}
|
||||
stage('Install depends.') {
|
||||
sh 'pip install --user -r requirements.txt'
|
||||
}
|
||||
stage('Prepare dataset') {
|
||||
stage('sh: Shell script') {
|
||||
withEnv([
|
||||
"KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
|
||||
"KAGGLE_KEY=${params.KAGGLE_KEY}"
|
||||
]) {
|
||||
sh 'echo Welcome: $KAGGLE_USERNAME'
|
||||
sh 'kaggle datasets list'
|
||||
}
|
||||
|
||||
sh 'chmod u+x ./load_data.sh'
|
||||
sh './load_data.sh'
|
||||
}
|
||||
}
|
||||
post {
|
||||
always {
|
||||
archiveArtifacts artifacts: 'avocado.data*', onlyIfSuccessful: true
|
||||
}
|
||||
}
|
||||
}
|
||||
|
14
load_data.sh
14
load_data.sh
@ -1 +1,13 @@
|
||||
figlet "Load data"
|
||||
figlet "Welcome $KAGGLE_USERNAME"
|
||||
|
||||
rm -r avocado.data*
|
||||
|
||||
kaggle datasets download -d neuromusic/avocado-prices
|
||||
unzip -o avocado-prices.zip
|
||||
|
||||
tail -n +2 avocado.csv | shuf > avocado_shuf.csv
|
||||
head -n 14000 avocado_shuf.csv > avocado.data.train
|
||||
tail -n +14001 avocado_shuf.csv | head -n 2249 > avocado.data.valid
|
||||
tail -n 2000 avocado_shuf.csv > avocado.data.test
|
||||
|
||||
wc -l avocado.data* > results.txt
|
Loading…
Reference in New Issue
Block a user