Closed Chouffe closed 2 years ago
Hi,
glad to see that you are trying the plugin, and sorry to hear that you are facing so many issues.
I think the issues #6 #7 and this one have all the same cause: your environment seems completely messed up and it breaks dependencies import.
Your stacktrace is showing a bunch of pkg_resources.ContextualVersionConflict
:
alembic
(you have 1.7.1
and your mlflow
version requires alembic<=1.4.1
), click
(you have click==8.0.1
while uvicorn
(an mlflow
dependency) requires click==7.*
These conflicts between the different versions of your package have likely raised some warning during their installation with pip and you ignored them. It may be ok most of the times, but kedro leverages setuptools
entrypoints
to add hooks and CLI command from plugins to their existing CLI, and setuptools
is much "stricter" about dependencies, and it fails at runtime. These dependencies conflicts completely messes up the whole kedro CLI mangement system (including kedro ipython
as you experienced in #7, but also very likely kedro viz
)
I can think of two cases in which such a situation arise:
pip
version (before october 2020) which has no dependency resolver. In this case, the install order of the package define which version of click will be installed , and if reinstalling a package with a new version beak an already installed dependency, it will just continue without any warning. This is a known bug in pip. To avoid this, either use a recent pip
or install the package manually by hand in the requirements and check out if one install tries to override a package already installed by a previous one.pip install --upgrade kedro-viz
after installing the requirements.txt file of the project, and it updates some important packages (e.g. kedro, mlflow, click) with new dependencies in conflict with the existing ones.Install a recent pip version and reinstall everything in a fresh conda environment to make it work:
conda create -n kmt python=3.7 -y
conda activate kmt
pip install --upgrade pip
pip install -e kedro-mlflow-tutorial/src # install the project as a package in editable mode, hence its src/requirements.txt
It seems that you did this in #7 and it solved your problem. Does this issue persist? If yes, can you give me:
pip freeze
of your environment (check that the version of kedro, mlflow and kedro-mlflow matches the one in the project requirements.txt
fileThanks for the thorough answer @Galileo-Galilei I was able to make it work. You are right that my conda environment was messed up.
When running
kedro mlflow ui
, here is the error message:It seems that the commands are not being registered properly then?