Compare commits

..

No commits in common. "4d70607765056d6235962b7e5e80a6e04d571a85" and "72a372df0aafa4cbe491beef37e32189d08908b0" have entirely different histories.

2 changed files with 2 additions and 51 deletions

22
Jenkinsfile vendored
View File

@ -1,28 +1,10 @@
pipeline {
agent any
parameters {
string(name: 'KAGGLE_USERNAME', defaultValue: '', description: 'Kaggle username')
password(name: 'KAGGLE_KEY', defaultValue:'', description: 'Kaggle Key')
}
stages {
stage('Git Checkout') {
stage('Stage 1') {
steps {
git "https://git.wmi.amu.edu.pl/s464914/ium_464914.git"
}
}
stage('Cleanup') {
steps {
sh 'rm -rf artifacts'
echo 'Test!'
}
}
}
stage('Build') {
withEnv(["KAGGLE_USERNAME=${params.KAGGLE_USERNAME}",
"KAGGLE_KEY=${params.KAGGLE_KEY}" ]) {
sh 'bash ./get_dataset.sh'
}
}
}

View File

@ -1,31 +0,0 @@
#!/bin/bash
pip install kaggle --upgrade
kaggle datasets download -d nasa/meteorite-landings
unzip -o meteorite-landings.zip
###Zmienne###
train_ratio=0.8
test_val_ratio=0.5
##Przetwrazanie pliku##
shuf meteorite-landings.csv -o shuffled-meteorite-landings.csv
total_lines=$(wc -l < shuffled-meteorite-landings.csv)
train_lines=$(echo $total_lines*$train_ratio| bc)
train_lines=$(echo "($train_lines+0.5)/1" | bc )
test_lines=$(echo "($total_lines-$train_lines)*$test_val_ratio" | bc)
test_lines=$(echo "($test_lines+0.5)/1" | bc )
validation_lines=$(echo $total_lines-$train_lines-$test_lines | bc)
head -n "$train_lines" shuffled-meteorite-landings.csv > "meteorite_train.csv"
tail -n $((test_lines+validation_lines)) shuffled-meteorite-landings.csv | head -n "$test_lines" > "meteorite_test.csv"
tail -n "$validation_lines" shuffled-meteorite-landings.csv > "meteorite_validation.csv"
mkdir -p artifacts
mv meteorite-landings.csv shuffled-meteorite-landings.csv meteorite_test.csv meteorite_train.csv meteorite_validation.csv artifacts/