Skip to content
This repository was archived by the owner on Apr 15, 2022. It is now read-only.

Commit 0bcea44

Browse files
committed
added run termination upon logging spark model
1 parent 3fde9b3 commit 0bcea44

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

splicemachine/ml/management.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,11 @@ def log_model(self, model, module):
107107
:param model: the fitted model/pipeline (in spark) to log
108108
:param module: the module that this is part of (mlflow.spark, mlflow.sklearn etc)
109109
"""
110+
try:
111+
mlflow.end_run()
112+
except:
113+
pass
114+
110115
with mlflow.start_run(run_uuid=self.active_run.info.run_uuid):
111116
module.log_model(model, "spark_model")
112117

0 commit comments

Comments
 (0)