This commit is contained in:
parent
8479ef553b
commit
e1827f7ddd
@ -33,6 +33,11 @@ pipeline {
|
||||
build job: 's444417-evaluation/master', wait: false
|
||||
}
|
||||
}
|
||||
stage('Archive mlflow') {
|
||||
steps {
|
||||
sh 'cd ./lab8'
|
||||
}
|
||||
}
|
||||
}
|
||||
options {
|
||||
copyArtifactPermission('s444417-evaluation');
|
||||
|
@ -10,7 +10,7 @@ import mlflow.keras
|
||||
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')
|
||||
|
||||
# train params
|
||||
@ -108,14 +108,14 @@ def train():
|
||||
mlflow.log_param('learning rate', learning_rate)
|
||||
mlflow.log_metric('val loss', min(hist["val_loss"]))
|
||||
|
||||
# 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
|
||||
#
|
||||
# if tracking_url_type_store != "file":
|
||||
# mlflow.keras.log_model(linear_model, "linear-model", registered_model_name="HousePriceLinear", signature=signature)
|
||||
# else:
|
||||
# mlflow.keras.log_model(linear_model, "model", signature=signature)
|
||||
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
|
||||
|
||||
if tracking_url_type_store != "file":
|
||||
mlflow.keras.log_model(linear_model, "linear-model", registered_model_name="HousePriceLinear", signature=signature)
|
||||
else:
|
||||
mlflow.keras.log_model(linear_model, "model", signature=signature)
|
||||
|
||||
if __name__ == '__main__':
|
||||
train()
|
@ -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]
|
||||
expected: [110. 25.2 60. 70. 100. 110. 520. 18. 77. 32. ]
|
||||
predictions: [188.40611, 79.26458, 79.07924, 79.702156, 249.17542, -1.7695923, 54.21414, 78.15069, 114.4659, 248.62257]
|
||||
expected: [ 74. 140. 35. 42. 260. 15. 25. 190. 40. 200.]
|
Loading…
Reference in New Issue
Block a user