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

kedro-mlflow is broken with kedro==0.18.1 #309

Closed
Galileo-Galilei opened this issue May 12, 2022 · 1 comment
Closed

kedro-mlflow is broken with kedro==0.18.1 #309

Galileo-Galilei opened this issue May 12, 2022 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@Galileo-Galilei
Copy link
Owner

Description

The plugin does not work with projects created with kedro==0.18.1

Context

Try to launch kedro run in a project with kedro==0.18.1 and kedro-mlflow installed.

Steps to Reproduce

conda create -n temp python=3.8 -y
conda activate temp
pip install kedro==0.18.1 kedro-mlflow==0.9.0
kedro new --starter=pandas-iris
cd pandas-iris
kedro mlflow init
kedro run

Expected Result

This should run the pipeleine and log the parameters.

Actual Result

This raises the following error:

AttributeError: module 'kedro.framework.session.session' has no attribute '_active_session'

Your Environment

Include as many relevant details about the environment in which you experienced the bug:

  • kedro and kedro-mlflow version used (pip show kedro and pip show kedro-mlflow): kedro==0.18.1 and kedro-mlflow<=0.9.0
  • Python version used (python -V): All
  • Operating system and version: All

Does the bug also happen with the last version on master?

Yes

Solution

Currently, kedro-mlflow uses the private _active_session global variable to access the configuration inside a hook.

With kedro==0.18.1, this private attribute was removed and the new recommandation is to use the after_context_created hook.

Retrieving the configuration and set it up should be moved to this new hook:

mlflow_config = get_mlflow_config()
mlflow_config.setup()

@Galileo-Galilei
Copy link
Owner Author

Closed by #313

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
Status: ✅ Done
Development

No branches or pull requests

1 participant