Skip to content

Commit 0aaed7b

Browse files
committed
start mlflow server
1 parent 953aea6 commit 0aaed7b

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

jupyter_scheduler/scheduler.py

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@
33
import random
44
import shutil
55
from typing import Dict, List, Optional, Type, Union
6+
import subprocess
67

78
import fsspec
89
import psutil
@@ -399,6 +400,22 @@ class Scheduler(BaseScheduler):
399400

400401
task_runner = Instance(allow_none=True, klass="jupyter_scheduler.task_runner.BaseTaskRunner")
401402

403+
def start_mlflow_server(self):
404+
subprocess.Popen(
405+
[
406+
"mlflow",
407+
"server",
408+
"--backend-store-uri",
409+
"./mlruns",
410+
"--default-artifact-root",
411+
"./mlartifacts",
412+
"--host",
413+
"0.0.0.0",
414+
"--port",
415+
"5000",
416+
]
417+
)
418+
402419
def __init__(
403420
self,
404421
root_dir: str,
@@ -414,6 +431,8 @@ def __init__(
414431
if self.task_runner_class:
415432
self.task_runner = self.task_runner_class(scheduler=self, config=config)
416433

434+
self.start_mlflow_server()
435+
417436
@property
418437
def db_session(self):
419438
if not self._db_session:

0 commit comments

Comments
 (0)