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 CLI does not work inside a subdirectory of the project for kedro≥0.19.4 #531

Closed
swertz opened this issue Mar 19, 2024 · 5 comments
Assignees
Labels
bug Something isn't working

Comments

@swertz
Copy link

swertz commented Mar 19, 2024

Description

Running kedro mlflow ui doesn't work.

Context

I have followed the 'Getting Started' guide in https://kedro-mlflow.readthedocs.io/en/stable/source/03_getting_started/index.html but cannot launch any of the MLFlow commands as indicated.

Steps to Reproduce

Simply install a recent version of Kedro-MLFlow:

pip install kedro-mlflow
kedro mlflow -h

Expected Result

The Kedro-MLflow commands should be available.

Actual Result

Usage: kedro [OPTIONS] COMMAND [ARGS]...
Try 'kedro -h' for help.

Error: No such command 'mlflow'.

Note that kedro info shows that the plugin is available:

Installed plugins:
kedro_mlflow: 0.12.1 (entry points:hooks,project)

Your Environment

  • kedro and kedro-mlflow version used (pip show kedro and pip show kedro-mlflow): 0.19.3 and 0.12.1.
    • I have also tried with kedro <0.19
  • Python version used (python -V): 3.10.11
  • Operating system and version: MacOS 14.3.1

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

Yes, same behaviour.

@Galileo-Galilei Galileo-Galilei self-assigned this Mar 19, 2024
@Galileo-Galilei Galileo-Galilei added the bug Something isn't working label Mar 19, 2024
@Galileo-Galilei
Copy link
Owner

Galileo-Galilei commented Mar 19, 2024

I think this is due to the recent changes to allow running the CLI anywhere inside a kedro project, not only at the root. This was released in 0.19.3. I'll publish a hotfix soon

EDIT: This commit is likely the root cause: kedro-org/kedro@a22bc32

EDIT 2 : This will be an issue in 0.19.4, but this is not merged yet. Still investigating...

@Galileo-Galilei
Copy link
Owner

I've tested the following script on Centos & Windows 11:

mamba create -n temp python=3.10 -y
mamba activate temp
pip install kedro==0.19.3 kedro_mlflow
kedro new --starter=spaceflights-pandas
cd spaceflights-pandas
kedro mlflow ui

and everything works fine. I can't test on a Mac right now. Can you try to check if it works for you?

One thing that happen sometimes is that you have a corrupted environment with incompatible packages versions. kedro run works and it only raises warnings, but I've already noticed that it breaks all CLI discovery. Can you check if you can use another plugin (e.g. kedro-viz) in your environment?

@swertz
Copy link
Author

swertz commented Mar 20, 2024

I have just tested again and everything works fine. Now I'm really confused why it didn't work yesterday... Sorry for the noise!

@Galileo-Galilei
Copy link
Owner

It is very likely that you were not running the command at the root of a kedro project, but this will be possible in 0.19.4!
I don't close the issue since I need to make the change before next release.

@Galileo-Galilei Galileo-Galilei changed the title Kedro mlflow CLI broken Kedro mlflow CLI does not work inside a subdirectory of the project for kedro≥0.19.4 Mar 23, 2024
Galileo-Galilei added a commit that referenced this issue Apr 17, 2024
…) (#539)

* ✨ Make project CLI init, ui and modelify work inside subdirectory (#531)

* add tests

* add changelog

* relax requirements

* fix typo in changelog
@Galileo-Galilei
Copy link
Owner

Closed by #539

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

2 participants