Skip to content

Commit

Permalink
🐛 Stop converting the reserved 'databricks' tracking uri keyword to a…
Browse files Browse the repository at this point in the history
… filepath (#248)
  • Loading branch information
Galileo-Galilei committed Oct 8, 2021
1 parent 8475853 commit 319b1ea
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 0 deletions.
4 changes: 4 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,10 @@

## [Unreleased]

### Fixed

- :bug: The reserved keyword "databricks" is no longer converted to a local filepath before setting the ``MLFLOW_TRACKING_URI`` to enable integration with databricks managed platform. ([#248](https://github.com/Galileo-Galilei/kedro-mlflow/issues/124))

## [0.7.5] - 2021-09-21

### Added
Expand Down
5 changes: 5 additions & 0 deletions kedro_mlflow/config/kedro_mlflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -156,6 +156,11 @@ def _validate_uri(cls, uri, values):
str -- A valid mlflow_tracking_uri
"""

# this is a special reserved keyword for mlflow which should not be converted to a path
# se: https://mlflow.org/docs/latest/tracking.html#where-runs-are-recorded
if uri == "databricks":
return uri

# if no tracking uri is provided, we register the runs locally at the root of the project
pathlib_uri = PurePath(uri)

Expand Down
9 changes: 9 additions & 0 deletions tests/config/test_kedro_mlflow_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,15 @@ def test_kedro_mlflow_config_validate_uri_local(kedro_project_with_mlflow_conf,
) # relative


def test_kedro_mlflow_config_validate_uri_databricks(kedro_project_with_mlflow_conf):
# databricks is a reseved keyword which should not be modified
config_uri = KedroMlflowConfig._validate_uri(
uri="databricks", values={"project_path": kedro_project_with_mlflow_conf}
)

assert config_uri == "databricks"


def test_from_dict_to_dict_idempotent(kedro_project_with_mlflow_conf):
config = KedroMlflowConfig(project_path=kedro_project_with_mlflow_conf)
original_config_dict = config.dict()
Expand Down

0 comments on commit 319b1ea

Please sign in to comment.