added shell script, modified jenkinsfile, added pythorch model to the zad1
This commit is contained in:
parent
8d398871dc
commit
2602469bf5
20
Jenkinsfile
vendored
20
Jenkinsfile
vendored
@ -0,0 +1,20 @@
|
|||||||
|
pipeline {
|
||||||
|
agent any
|
||||||
|
stages {
|
||||||
|
stage('Clone repository') {
|
||||||
|
steps {
|
||||||
|
git branch: 'master', url: 'https://git.wmi.amu.edu.pl/s487176/ium_487176'
|
||||||
|
}
|
||||||
|
}
|
||||||
|
stage('Run script') {
|
||||||
|
steps {
|
||||||
|
sh 'sh getdata.sh'
|
||||||
|
}
|
||||||
|
post {
|
||||||
|
always {
|
||||||
|
archiveArtifacts artifacts: 'test.csv, train.csv, val.csv', allowEmptyArchive: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
22
getdata.sh
Normal file
22
getdata.sh
Normal file
@ -0,0 +1,22 @@
|
|||||||
|
wget -O wine.csv https://huggingface.co/datasets/mstz/wine/raw/main/Wine_Quality_Data.csv
|
||||||
|
|
||||||
|
num_rows=$(($(wc -l < wine.csv) - 1))
|
||||||
|
|
||||||
|
|
||||||
|
CUTOFF=${1:-num_rows}
|
||||||
|
|
||||||
|
train_size=$((CUTOFF * 80 / 100))
|
||||||
|
test_size=$((CUTOFF * 10 / 100))
|
||||||
|
|
||||||
|
header=$(head -n 1 wine.csv)
|
||||||
|
tail -n +2 wine.csv | shuf > shuffled_data.csv
|
||||||
|
echo "$header" > train.csv
|
||||||
|
head -n $train_size shuffled_data.csv >> train.csv
|
||||||
|
echo "$header" > val.csv
|
||||||
|
head -n $(($train_size + $test_size)) shuffled_data.csv | tail -n $test_size >> val.csv
|
||||||
|
echo "$header" > test.csv
|
||||||
|
tail -n $test_size shuffled_data.csv >> test.csv
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
rm shuffled_data.csv
|
59170
zad1.ipynb
59170
zad1.ipynb
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue
Block a user