Compare commits

...

21 Commits

Author SHA1 Message Date
Adam Wojdyla
115b7b8a08 update learning
All checks were successful
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 14:44:38 +02:00
Adam Wojdyla
c7f12908b3 dvc remote update
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 14:14:40 +02:00
Adam Wojdyla
220b2c2b12 added data2
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 13:58:37 +02:00
Adam Wojdyla
cecb8f800f config
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 13:30:06 +02:00
Adam Wojdyla
88ebd38a32 add dvc data 2022-06-05 13:28:40 +02:00
Adam Wojdyla
9083a212ed dvc init2 2022-06-05 13:26:13 +02:00
Adam Wojdyla
0cb21dc295 dvc destroy
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 13:24:05 +02:00
Adam Wojdyla
b83a697a88 dvc push
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
2022-06-05 13:06:17 +02:00
Adam Wojdyla
4eebcf3933 dvc fix
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 13:03:38 +02:00
Adam Wojdyla
6a2732a5e4 fix
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
s444507-predict-s444356/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 12:55:32 +02:00
Adam Wojdyla
54c461f2d4 update
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 12:24:21 +02:00
Adam Wojdyla
ddf78ff1e6 jenkinsfile update
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 11:38:31 +02:00
Adam Wojdyla
7d2c98dd64 remove ssh package
Some checks failed
444507-training/pipeline/head This commit looks good
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
2022-06-05 11:21:02 +02:00
Adam Wojdyla
13bfb4a21c add data files
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 11:06:25 +02:00
Adam Wojdyla
61e258a345 remote update
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 11:03:23 +02:00
Adam Wojdyla
d3d8d5ba06 dvc lock
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 11:02:19 +02:00
Adam Wojdyla
d9b0675ec2 typo fix
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
2022-06-05 10:27:18 +02:00
Adam Wojdyla
b912e41f5d add remote passwd
Some checks failed
s444507-predict-s444356/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 10:26:32 +02:00
Adam Wojdyla
ff4660b61d force add remote
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
444507-training/pipeline/head This commit looks good
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
2022-06-05 10:18:56 +02:00
Adam Wojdyla
4a1a2bb1ba ssh client in dockerfile
Some checks failed
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
444507-training/pipeline/head This commit looks good
2022-06-05 10:14:49 +02:00
Adam Wojdyla
37127b1b05 Merge branch 'feature/dvc'
Some checks failed
444507-training/pipeline/head This commit looks good
s444507-dvc/pipeline/head There was a failure building this commit
s444507-predict-s444356/pipeline/head This commit looks good
s444507-evaluation/pipeline/head This commit looks good
2022-06-05 10:11:09 +02:00
13 changed files with 9301 additions and 57 deletions

View File

@ -1,6 +1,5 @@
[core]
remote = ium_ssh_remote
['remote "my_local_remote"']
url = /Users/adamwojdyla/Documents/Studia/Magisterskie/1_sem/IUM/ium_444507/dvcstore
['remote "ium_ssh_remote"']
url = ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl
url = ssh://tzietkiewicz.vm.wmi.amu.edu.pl:/home/ium-sftp
user = ium-sftp

2
.gitignore vendored
View File

@ -153,11 +153,9 @@ fabric.properties
# kaggle
kaggle.json
Car_Prices_Poland_Kaggle*.csv
CarPrices*
IUM08/*
.DS_store
*.db
mlruns
my_model
dvcstore
/prediction_results.csv

BIN
CarPrices_pytorch_model.pkl Normal file

Binary file not shown.

View File

@ -10,9 +10,9 @@ pipeline {
stages {
stage('DVC') {
steps {
checkout([$class: 'GitSCM', branches: [[name: '*/master']], extensions: [], userRemoteConfigs: [[credentialsId: 'S444507_cred', url: 'https://git.wmi.amu.edu.pl/s444507/ium_444507.git']]])
withCredentials(
[sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: '')]) {
sh 'dvc remote add -d ium_ssh_remote ssh://ium-sftp@tzietkiewicz.vm.wmi.amu.edu.pl/ium-sftp'
[sshUserPrivateKey(credentialsId: '48ac7004-216e-4260-abba-1fe5db753e18', keyFileVariable: 'IUM_SFTP_KEY', passphraseVariable: '', usernameVariable: 'USER')]) {
sh 'dvc remote modify --local ium_ssh_remote keyfile $IUM_SFTP_KEY'
sh 'dvc pull'
sh 'dvc repro'
@ -20,9 +20,4 @@ pipeline {
}
}
}
post {
success {
archiveArtifacts artifacts: 'prediction_results.csv, *.pkl', followSymlinks: false
}
}
}

4
data/.gitignore vendored
View File

@ -1 +1,5 @@
/prepared
/Car_Prices_Poland_Kaggle_test.csv
/Car_Prices_Poland_Kaggle_train.csv
/Car_Prices_Poland_Kaggle_dev.csv
/Car_Prices_Poland_Kaggle.csv

0
data/Car_Prices_Poland_Kaggle.csv.dvc Executable file → Normal file
View File

View File

@ -0,0 +1,4 @@
outs:
- md5: 099e43435758084862777c03cc2feb02
size: 1648018
path: Car_Prices_Poland_Kaggle_dev.csv

View File

@ -0,0 +1,4 @@
outs:
- md5: 099e43435758084862777c03cc2feb02
size: 1648018
path: Car_Prices_Poland_Kaggle_test.csv

View File

@ -0,0 +1,4 @@
outs:
- md5: 47632fa91312b676baf3053a7a1b4f2b
size: 6598832
path: Car_Prices_Poland_Kaggle_train.csv

View File

@ -9,38 +9,21 @@ stages:
- path: script_prepare.py
md5: f1dfe33a503f5acc687c53dee448f71b
size: 1899
outs:
- path: data/Car_Prices_Poland_Kaggle_dev.csv
md5: cf9355749edc79f588e264de5b2bf1f0
size: 1648309
- path: data/Car_Prices_Poland_Kaggle_test.csv
md5: cf9355749edc79f588e264de5b2bf1f0
size: 1648309
- path: data/Car_Prices_Poland_Kaggle_train.csv
md5: 8818f758e2de344a4b9ad712379b81e1
size: 6597472
train:
cmd: python3 lab05_deepLearning.py 50
cmd: python3 lab05_deepLearning.py 70
deps:
- path: data/Car_Prices_Poland_Kaggle_dev.csv
md5: cf9355749edc79f588e264de5b2bf1f0
size: 1648309
md5: 113fad808a17e2aa5131832ecaa2e640
size: 1647374
- path: data/Car_Prices_Poland_Kaggle_test.csv
md5: cf9355749edc79f588e264de5b2bf1f0
size: 1648309
md5: 113fad808a17e2aa5131832ecaa2e640
size: 1647374
- path: data/Car_Prices_Poland_Kaggle_train.csv
md5: 8818f758e2de344a4b9ad712379b81e1
size: 6597472
outs:
- path: CarPrices_pytorch_model.pkl
md5: cff6a79945bbf839058a4fd1b2dcc98f
size: 30039
- path: prediction_results.csv
md5: 62b9e54cdfebc7f1dfb060e18e9b8738
size: 585197
md5: dd41429d2b3285cc85b94a9b0ec8cf91
size: 6597186
evaluate:
cmd: python3 lab10_evaluate.py
deps:
- path: CarPrices_pytorch_model.pkl
md5: cff6a79945bbf839058a4fd1b2dcc98f
md5: a73485a169b6185b0161d75bc5c883a3
size: 30039

View File

@ -4,20 +4,13 @@ stages:
deps:
- data/Car_Prices_Poland_Kaggle.csv
- script_prepare.py
outs:
- data/Car_Prices_Poland_Kaggle_dev.csv
- data/Car_Prices_Poland_Kaggle_train.csv
- data/Car_Prices_Poland_Kaggle_test.csv
train:
cmd: python3 lab05_deepLearning.py 70
deps:
- data/Car_Prices_Poland_Kaggle_dev.csv
- data/Car_Prices_Poland_Kaggle_train.csv
- data/Car_Prices_Poland_Kaggle_test.csv
outs:
- CarPrices_pytorch_model.pkl
- prediction_results.csv
evaluate:
cmd: python3 lab10_evaluate.py
deps:
- CarPrices_pytorch_model.pkl
- CarPrices_pytorch_model.pkl

View File

@ -11,7 +11,12 @@ import torch.nn.functional as F
import pandas as pd
from sklearn import preprocessing
import sys
import os
path = '.'
files = os.listdir(".")
if not "Car_Prices_Poland_Kaggle.csv" in files:
path = "data"
class Model(nn.Module):
def __init__(self, input_dim):
@ -29,15 +34,15 @@ class Model(nn.Module):
def load_dataset_raw():
""" Load data from .csv file. """
cars = pd.read_csv('./Car_Prices_Poland_Kaggle.csv', usecols=[1, 4, 5, 6, 10], sep=',')
cars = pd.read_csv(f'{path}/Car_Prices_Poland_Kaggle.csv', usecols=[1, 4, 5, 6, 10], sep=',')
return cars
def load_dataset_files():
""" Load shuffled, splitted dev and train files from .csv files. """
cars_dev = pd.read_csv('./Car_Prices_Poland_Kaggle_dev.csv', usecols=[1, 4, 5, 6, 10], sep=',', names= [str(i) for i in range(5)])
cars_train = pd.read_csv('./Car_Prices_Poland_Kaggle_train.csv', usecols=[1, 4, 5, 6, 10], sep=',', names= [str(i) for i in range(5)])
cars_dev = pd.read_csv(f'{path}/Car_Prices_Poland_Kaggle_dev.csv', usecols=[1, 4, 5, 6, 10], sep=',', names= [str(i) for i in range(5)])
cars_train = pd.read_csv(f'{path}/Car_Prices_Poland_Kaggle_train.csv', usecols=[1, 4, 5, 6, 10], sep=',', names= [str(i) for i in range(5)])
return cars_dev, cars_train
@ -65,15 +70,6 @@ def prepare_labels_features(dataset):
return lab, feat
# def draw_plot(lbl):
# need to import matplotlib to work
# plt.hist(lbl, bins=[i for i in range(len(set(lbl)))], edgecolor="black")
# plt.xticks(np.arange(0, len(set(lbl)), 1))
# plt.show()
# Prepare dataset
print("Loading dataset...")
dev, train = load_dataset_files()

9264
prediction_results.csv Normal file

File diff suppressed because it is too large Load Diff