fix model.py

This commit is contained in:
Krzysztof Raczyński 2024-05-13 20:10:55 +02:00
parent 43c26e6d65
commit 40d06776f5
2 changed files with 8 additions and 13 deletions

19
Jenkinsfile vendored
View File

@ -1,21 +1,21 @@
pipeline { pipeline {
agent { agent {
dockerfile true dockerfile true
} }
parameters { parameters {
string( string(
defaultValue: '10000', defaultValue: '10000',
name: 'CUTOFF', name: 'CUTOFF',
description: 'Liczba wierszy do obcięcia ze zbioru danych') description: 'Liczba wierszy do obcięcia ze zbioru danych')
string( string(
defaultValue: '', defaultValue: '',
name: 'KAGGLE_USERNAME', name: 'KAGGLE_USERNAME',
description: 'Kaggle username') description: 'Kaggle username')
password( password(
defaultValue: '', defaultValue: '',
name: 'KAGGLE_KEY', name: 'KAGGLE_KEY',
description: 'Kaggle API key') description: 'Kaggle API key')
} }
stages { stages {
@ -28,7 +28,7 @@ pipeline {
stage('Download') { stage('Download') {
steps { steps {
withEnv([ withEnv([
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}", "KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
"KAGGLE_KEY=${env.KAGGLE_KEY}" "KAGGLE_KEY=${env.KAGGLE_KEY}"
]) { ]) {
sh "bash ./create-dataset.sh ${params.CUTOFF}" sh "bash ./create-dataset.sh ${params.CUTOFF}"
@ -44,10 +44,5 @@ pipeline {
archiveArtifacts artifacts: 'car_prices_predict_model.h5, predicted_selling_prices.csv', onlyIfSuccessful: true archiveArtifacts artifacts: 'car_prices_predict_model.h5, predicted_selling_prices.csv', onlyIfSuccessful: true
} }
} }
stage('Archive Results') {
steps {
archiveArtifacts artifacts: 'data/*', onlyIfSuccessful: true
}
}
} }
} }

View File

@ -30,4 +30,4 @@ model.compile(optimizer='adam', loss='mean_squared_error')
model.fit(X_train, y_train, epochs=20, batch_size=32) model.fit(X_train, y_train, epochs=20, batch_size=32)
model.save('car_prices_predict_model.h5') model.save('./car_prices_predict_model.h5')