11import time , warnings , sys , os .path as osp
2+
3+ from ..dss_plugin_mlflow import MLflowHandle
4+
25from .dataset import DSSDataset , DSSDatasetListItem , DSSManagedDatasetCreationHelper
36from .modelcomparison import DSSModelComparison
47from .jupyternotebook import DSSJupyterNotebook , DSSJupyterNotebookListItem
@@ -1581,7 +1584,7 @@ def list_hive_tables(self, hive_database):
15811584 """
15821585 connection_name = "@virtual(hive-jdbc):" + hive_database
15831586 ret = self .client ._perform_json ("GET" , "/projects/%s/datasets/tables-import/actions/list-tables" % (self .project_key ),
1584- params = {"connectionName" : connection_name } )
1587+ params = {"connectionName" : connection_name } )
15851588
15861589 def to_schema_table_pair (x ):
15871590 return {"schema" :x .get ("databaseName" , None ), "table" :x ["table" ]}
@@ -1590,14 +1593,21 @@ def to_schema_table_pair(x):
15901593 ########################################################
15911594 # App designer
15921595 ########################################################
1593-
15941596 def get_app_manifest (self ):
15951597 raw_data = self .client ._perform_json ("GET" , "/projects/%s/app-manifest" % self .project_key )
15961598 return DSSAppManifest (self .client , raw_data , self .project_key )
15971599
1598- ########################################################
15991600 # MLflow experiment tracking
16001601 ########################################################
1602+ def setup_mlflow (self , managed_folder = "mlflow_artifacts" , host = None ):
1603+ """
1604+ Setup the dss-plugin for MLflow
1605+
1606+ :param str managed_folder: managed folder where artifacts are stored
1607+ :param str host: setup a custom host if the backend used is not DSS
1608+ """
1609+ return MLflowHandle (client = self .client , project_key = self .project_key , managed_folder = managed_folder , host = host )
1610+
16011611 def clean_experiment_tracking_db (self ):
16021612 """
16031613 Cleans the experiments, runs, params, metrics, tags, etc. for this project
0 commit comments