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 {
agent {
dockerfile true
agent {
dockerfile true
}
parameters {
string(
defaultValue: '10000',
name: 'CUTOFF',
name: 'CUTOFF',
description: 'Liczba wierszy do obcięcia ze zbioru danych')
string(
defaultValue: '',
name: 'KAGGLE_USERNAME',
name: 'KAGGLE_USERNAME',
description: 'Kaggle username')
password(
defaultValue: '',
name: 'KAGGLE_KEY',
description: 'Kaggle API key')
name: 'KAGGLE_KEY',
description: 'Kaggle API key')
}
stages {
@ -28,7 +28,7 @@ pipeline {
stage('Download') {
steps {
withEnv([
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
"KAGGLE_USERNAME=${env.KAGGLE_USERNAME}",
"KAGGLE_KEY=${env.KAGGLE_KEY}"
]) {
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
}
}
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.save('car_prices_predict_model.h5')
model.save('./car_prices_predict_model.h5')