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 2
2
import os
3
3
import random
4
4
import shutil
5
+ import subprocess
5
6
from typing import Dict , Optional , Type , Union
6
7
7
8
import fsspec
@@ -342,6 +343,22 @@ class Scheduler(BaseScheduler):
342
343
343
344
task_runner = Instance (allow_none = True , klass = "jupyter_scheduler.task_runner.BaseTaskRunner" )
344
345
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
+
345
362
def __init__ (
346
363
self ,
347
364
root_dir : str ,
@@ -357,6 +374,8 @@ def __init__(
357
374
if self .task_runner_class :
358
375
self .task_runner = self .task_runner_class (scheduler = self , config = config )
359
376
377
+ self .start_mlflow_server ()
378
+
360
379
@property
361
380
def db_session (self ):
362
381
if not self ._db_session :
You can’t perform that action at this time.
0 commit comments