forked from Galileo-Galilei/kedro-mlflow
-
Notifications
You must be signed in to change notification settings - Fork 0
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
…Galilei#30 Galileo-Galilei#31 Galileo-Galilei#72 Galileo-Galilei#29 Galileo-Galilei#62 - context access - kedro 16.5 - hook auto registration
- Loading branch information
1 parent
4c0b6a7
commit d691b96
Showing
17 changed files
with
303 additions
and
281 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,2 +1,2 @@ | ||
mlflow>=1.0.0, <2.0.0 | ||
kedro>=0.16.0, <=0.16.4 # 0.16.5 breaks pipeline_ml, template and hooks test | ||
kedro>=0.16.0, <=0.16.5 |
Oops, something went wrong.