Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: dev: SDK-397: add dbtap config for mlflow cluster #313

Merged
merged 3 commits into from
Mar 30, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 12 additions & 4 deletions qds_sdk/engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,8 @@ def set_engine_config(self,
airflow_python_version=None,
is_ha=None,
enable_rubix=None,
mlflow_version=None):
mlflow_version=None,
mlflow_dbtap_id=None):
'''

Args:
Expand Down Expand Up @@ -79,7 +80,7 @@ def set_engine_config(self,
self.set_presto_settings(presto_version, custom_presto_config)
self.set_spark_settings(spark_version, custom_spark_config)
self.set_airflow_settings(dbtap_id, fernet_key, overrides, airflow_version, airflow_python_version)
self.set_mlflow_settings(mlflow_version)
self.set_mlflow_settings(mlflow_version, mlflow_dbtap_id)

def set_fairscheduler_settings(self,
fairscheduler_config_xml=None,
Expand Down Expand Up @@ -127,8 +128,10 @@ def set_airflow_settings(self,
self.airflow_settings['airflow_python_version'] = airflow_python_version

def set_mlflow_settings(self,
mlflow_version="1.5"):
mlflow_version="1.7",
mlflow_dbtap_id=None):
self.mlflow_settings['version'] = mlflow_version
self.mlflow_settings['dbtap_id'] = mlflow_dbtap_id

def set_engine_config_settings(self, arguments):
custom_hadoop_config = util._read_file(arguments.custom_hadoop_config_file)
Expand All @@ -150,7 +153,8 @@ def set_engine_config_settings(self, arguments):
airflow_version=arguments.airflow_version,
airflow_python_version=arguments.airflow_python_version,
enable_rubix=arguments.enable_rubix,
mlflow_version=arguments.mlflow_version)
mlflow_version=arguments.mlflow_version,
mlflow_dbtap_id=arguments.mlflow_dbtap_id)

@staticmethod
def engine_parser(argparser):
Expand Down Expand Up @@ -253,4 +257,8 @@ def engine_parser(argparser):
dest="mlflow_version",
default=None,
help="mlflow version for mlflow cluster", )
mlflow_settings_group.add_argument("--mlflow-dbtap-id",
dest="mlflow_dbtap_id",
default=None,
help="dbtap id for mlflow cluster", )

5 changes: 3 additions & 2 deletions tests/test_clusterv2.py
Original file line number Diff line number Diff line change
Expand Up @@ -548,7 +548,7 @@ def test_airflow_engine_config(self):

def test_mlflow_engine_config(self):
sys.argv = ['qds.py', '--version', 'v2', 'cluster', 'create', '--label', 'test_label',
'--flavour', 'mlflow', '--mlflow-version', '1.5']
'--flavour', 'mlflow', '--mlflow-version', '1.7', '--mlflow-dbtap-id', '-1']
Qubole.cloud = None
print_command()
Connection._api_call = Mock(return_value={})
Expand All @@ -557,7 +557,8 @@ def test_mlflow_engine_config(self):
{'engine_config':
{'flavour': 'mlflow',
'mlflow_settings': {
'version': '1.5'
'version': '1.7',
'dbtap_id': '-1'
}},
'cluster_info': {'label': ['test_label'], }})

Expand Down