File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change 22import os
33import random
44import shutil
5+ import subprocess
56from typing import Dict , Optional , Type , Union
67
78import fsspec
@@ -342,6 +343,22 @@ class Scheduler(BaseScheduler):
342343
343344 task_runner = Instance (allow_none = True , klass = "jupyter_scheduler.task_runner.BaseTaskRunner" )
344345
346+ def start_mlflow_server (self ):
347+ subprocess .Popen (
348+ [
349+ "mlflow" ,
350+ "server" ,
351+ "--backend-store-uri" ,
352+ "./mlruns" ,
353+ "--default-artifact-root" ,
354+ "./mlartifacts" ,
355+ "--host" ,
356+ "0.0.0.0" ,
357+ "--port" ,
358+ "5000" ,
359+ ]
360+ )
361+
345362 def __init__ (
346363 self ,
347364 root_dir : str ,
@@ -357,6 +374,8 @@ def __init__(
357374 if self .task_runner_class :
358375 self .task_runner = self .task_runner_class (scheduler = self , config = config )
359376
377+ self .start_mlflow_server ()
378+
360379 @property
361380 def db_session (self ):
362381 if not self ._db_session :
You can’t perform that action at this time.
0 commit comments