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

Commit 3631ce2

Browse files
Amrit BavejaAmrit Baveja
authored andcommitted
added resuming a previous run to Run wrapper
1 parent 49a7d89 commit 3631ce2

File tree

4 files changed

+5
-4
lines changed

4 files changed

+5
-4
lines changed
-148 Bytes
Binary file not shown.
-151 Bytes
Binary file not shown.
-10.6 KB
Binary file not shown.

splicemachine/ml/zeppelin.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,11 @@ class Run:
1515

1616
"""
1717
An abstraction over MLFlow Runs, allowing you to do cross cell runs
18+
:param resume_run_uuid: a run uuid to resume a run with
1819
"""
1920

20-
def __init__(self):
21-
self.run_uuid = None
21+
def __init__(self, resume_run_uuid=None):
22+
self.run_uuid = resume_run_uuid
2223

2324
@staticmethod
2425
def handle_handlers(handler, *args, **kwargs):
@@ -29,7 +30,7 @@ def handle_handlers(handler, *args, **kwargs):
2930
elif handler == 'artifact':
3031
mlflow.log_artifact(*args, **kwargs)
3132
elif handler == 'spark_model':
32-
mlflow.spark.log_model(*args, **kwargs)
33+
mlflow.spark.log_model(args[0], 'pysparkmodel')
3334
else:
3435
raise Exception("Handler {0} not understood. Please use one in ['param', 'metric', 'artifact', 'spark_model']"
3536
)
@@ -415,4 +416,4 @@ def tree_json(tree):
415416

416417

417418

418-
419+

0 commit comments

Comments
 (0)