Skip to content

Commit 2705845

Browse files
author
Valentin Thorey
committed
Merge branch 'feature/mlflow-experiment-tracking' into feature/sc-77250-reload-mlflow-artifact-registry
2 parents 09c622b + 79b0f4c commit 2705845

File tree

2 files changed

+36
-29
lines changed

2 files changed

+36
-29
lines changed

dataikuapi/dss/project.py

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1582,7 +1582,7 @@ def list_hive_tables(self, hive_database):
15821582
"""
15831583
connection_name = "@virtual(hive-jdbc):" + hive_database
15841584
ret = self.client._perform_json("GET", "/projects/%s/datasets/tables-import/actions/list-tables" % (self.project_key),
1585-
params = {"connectionName": connection_name} )
1585+
params={"connectionName": connection_name} )
15861586

15871587
def to_schema_table_pair(x):
15881588
return {"schema":x.get("databaseName", None), "table":x["table"]}
@@ -1591,13 +1591,11 @@ def to_schema_table_pair(x):
15911591
########################################################
15921592
# App designer
15931593
########################################################
1594-
15951594
def get_app_manifest(self):
15961595
raw_data = self.client._perform_json("GET", "/projects/%s/app-manifest" % self.project_key)
15971596
return DSSAppManifest(self.client, raw_data, self.project_key)
15981597

1599-
########################################################
1600-
# MLflow
1598+
# MLflow experiment tracking
16011599
########################################################
16021600
def setup_mlflow(self, managed_folder="mlflow_artifacts", host=None):
16031601
"""
@@ -1608,6 +1606,14 @@ def setup_mlflow(self, managed_folder="mlflow_artifacts", host=None):
16081606
"""
16091607
return MLflowHandle(client=self.client, project_key=self.project_key, managed_folder=managed_folder, host=host)
16101608

1609+
def clean_experiment_tracking_db(self):
1610+
"""
1611+
Cleans the experiments, runs, params, metrics, tags, etc. for this project
1612+
1613+
This call requires an API key with admin rights
1614+
"""
1615+
self.client._perform_raw("DELETE", "/api/2.0/mlflow/clean-db/%s" % self.project_key)
1616+
16111617

16121618
class TablesImportDefinition(object):
16131619
"""

setup.py

Lines changed: 26 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -4,30 +4,31 @@
44

55
VERSION = "9.0.0"
66

7-
long_description = (open('README').read() +
8-
'\n\n' + open('HISTORY.txt').read())
7+
long_description = (open('README').read() + '\n\n' +
8+
open('HISTORY.txt').read())
99

1010
setup(
11-
name='dataiku-api-client',
12-
version=VERSION,
13-
license="Apache Software License",
14-
packages=["dataikuapi", "dataikuapi.dss", "dataikuapi.apinode_admin", "dataikuapi.fm"],
15-
description="Python API client for Dataiku APIs",
16-
long_description=long_description,
17-
author="Dataiku",
18-
author_email="support@dataiku.com",
19-
url="https://www.dataiku.com",
20-
download_url = "https://github.com/dataiku/dataiku-api-client-python/tarball/" + VERSION,
21-
classifiers = [
22-
'Development Status :: 5 - Production/Stable',
23-
'Intended Audience :: Developers',
24-
'License :: OSI Approved :: Apache Software License',
25-
'Topic :: Software Development :: Libraries',
26-
'Programming Language :: Python',
27-
'Operating System :: OS Independent'
28-
],
29-
install_requires = [
30-
"requests>=2,<2.22",
31-
"python-dateutil"
32-
]
33-
)
11+
name='dataiku-api-client',
12+
version=VERSION,
13+
license="Apache Software License",
14+
packages=["dataikuapi", "dataikuapi.dss", "dataikuapi.apinode_admin", "dataikuapi.fm",
15+
"dataikuapi.dss_plugin_mlflow"],
16+
description="Python API client for Dataiku APIs",
17+
long_description=long_description,
18+
author="Dataiku",
19+
author_email="support@dataiku.com",
20+
url="https://www.dataiku.com",
21+
download_url="https://github.com/dataiku/dataiku-api-client-python/tarball/" + VERSION,
22+
classifiers=[
23+
'Development Status :: 5 - Production/Stable',
24+
'Intended Audience :: Developers',
25+
'License :: OSI Approved :: Apache Software License',
26+
'Topic :: Software Development :: Libraries',
27+
'Programming Language :: Python',
28+
'Operating System :: OS Independent'
29+
],
30+
install_requires=[
31+
"requests>=2,<2.22",
32+
"python-dateutil"
33+
]
34+
)

0 commit comments

Comments
 (0)