-
Notifications
You must be signed in to change notification settings - Fork 34
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
- Loading branch information
1 parent
d9d3bf5
commit e8f9f09
Showing
9 changed files
with
296 additions
and
54 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,23 +1,14 @@ | ||
from pathlib import Path | ||
|
||
from kedro.config import ConfigLoader | ||
from kedro.framework.context import KedroContext | ||
|
||
from kedro_mlflow.framework.context.config import KedroMlflowConfig | ||
|
||
|
||
# this could be a read-only property in the context | ||
# with a @property decorator | ||
# but for consistency with hook system, it is an external function | ||
def get_mlflow_config(project_path=None, env="local"): | ||
if project_path is None: | ||
project_path = Path.cwd() | ||
project_path = Path(project_path) | ||
conf_paths = [ | ||
str(project_path / "conf" / "base"), | ||
str(project_path / "conf" / env), | ||
] | ||
config_loader = ConfigLoader(conf_paths=conf_paths) | ||
conf_mlflow_yml = config_loader.get("mlflow*", "mlflow*/**") | ||
conf_mlflow = KedroMlflowConfig(project_path=project_path) | ||
def get_mlflow_config(context: KedroContext): | ||
|
||
conf_mlflow_yml = context.config_loader.get("mlflow*", "mlflow*/**") | ||
conf_mlflow = KedroMlflowConfig(context.project_path) | ||
conf_mlflow.from_dict(conf_mlflow_yml) | ||
return conf_mlflow |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.