add uri
Some checks failed
s444417-training/pipeline/head There was a failure building this commit

This commit is contained in:
s444417 2022-05-14 12:12:20 +02:00
parent 8479ef553b
commit e1827f7ddd
3 changed files with 16 additions and 11 deletions

View File

@ -33,6 +33,11 @@ pipeline {
build job: 's444417-evaluation/master', wait: false build job: 's444417-evaluation/master', wait: false
} }
} }
stage('Archive mlflow') {
steps {
sh 'cd ./lab8'
}
}
} }
options { options {
copyArtifactPermission('s444417-evaluation'); copyArtifactPermission('s444417-evaluation');

View File

@ -10,7 +10,7 @@ import mlflow.keras
from urllib.parse import urlparse from urllib.parse import urlparse
# mlflow.set_tracking_uri('http://localhost:5000') mlflow.set_tracking_uri("http://172.17.0.1:5000")
mlflow.set_experiment('s444417') mlflow.set_experiment('s444417')
# train params # train params
@ -108,14 +108,14 @@ def train():
mlflow.log_param('learning rate', learning_rate) mlflow.log_param('learning rate', learning_rate)
mlflow.log_metric('val loss', min(hist["val_loss"])) mlflow.log_metric('val loss', min(hist["val_loss"]))
# signature = mlflow.models.signature.infer_signature(house_price_features, linear_model.predict(house_price_features)) signature = mlflow.models.signature.infer_signature(house_price_features, linear_model.predict(house_price_features))
#
# tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme tracking_url_type_store = urlparse(mlflow.get_tracking_uri()).scheme
#
# if tracking_url_type_store != "file": if tracking_url_type_store != "file":
# mlflow.keras.log_model(linear_model, "linear-model", registered_model_name="HousePriceLinear", signature=signature) mlflow.keras.log_model(linear_model, "linear-model", registered_model_name="HousePriceLinear", signature=signature)
# else: else:
# mlflow.keras.log_model(linear_model, "model", signature=signature) mlflow.keras.log_model(linear_model, "model", signature=signature)
if __name__ == '__main__': if __name__ == '__main__':
train() train()

View File

@ -1,2 +1,2 @@
predictions: [157.08437, 4.671051, 190.45694, 126.68617, 96.37216, 134.32784, 154.44032, -19.104736, 80.28882, 100.09464] predictions: [188.40611, 79.26458, 79.07924, 79.702156, 249.17542, -1.7695923, 54.21414, 78.15069, 114.4659, 248.62257]
expected: [110. 25.2 60. 70. 100. 110. 520. 18. 77. 32. ] expected: [ 74. 140. 35. 42. 260. 15. 25. 190. 40. 200.]