Change experiment name

This commit is contained in:
Tomasz Ziętkiewicz 2021-05-26 22:29:51 +02:00
parent 6875182306
commit 0a26997cd5

View File

@ -21,7 +21,7 @@ logging.basicConfig(level=logging.WARN)
logger = logging.getLogger(__name__) logger = logging.getLogger(__name__)
mlflow.set_tracking_uri("http://172.17.0.1:5000") mlflow.set_tracking_uri("http://172.17.0.1:5000")
mlflow.set_experiment("s123456") mlflow.set_experiment("s123456-new")
def eval_metrics(actual, pred): def eval_metrics(actual, pred):
rmse = np.sqrt(mean_squared_error(actual, pred)) rmse = np.sqrt(mean_squared_error(actual, pred))
@ -94,6 +94,6 @@ if __name__ == "__main__":
# There are other ways to use the Model Registry, which depends on the use case, # There are other ways to use the Model Registry, which depends on the use case,
# please refer to the doc for more information: # please refer to the doc for more information:
# https://mlflow.org/docs/latest/model-registry.html#api-workflow # https://mlflow.org/docs/latest/model-registry.html#api-workflow
mlflow.sklearn.log_model(lr, "wines-model", registered_model_name="ElasticnetWineModel", signature=signature) mlflow.sklearn.log_model(lr, "wines-model", registered_model_name="ElasticnetWineModel_s123456", signature=signature)
else: else:
mlflow.sklearn.log_model(lr, "model", signature=signature) mlflow.sklearn.log_model(lr, "model", signature=signature)