Closed Dekermanjian closed 1 year ago
Just in case anyone else has this same issue.
The conda.yaml file generated in the mlruns is not correct. You need to fix it so that the environment is set up properly when you are serving with MlFlow.
Here is what a working conda.yaml file looks like:
dependencies:
- python=3.9.16
- pip
- pip:
- -e /Path/kedro-mlflow-tutorial/src/.
Hi @Dekermanjian,
actually your solution will work only locally because anyone who wants to use your model will need face an error if he does not have the src
folder at the same path on his computer.
The recommended way to use it is to keep the conda.yml
from the tutorial, and to make the kedro_mlflow_tutorial==0.1
available for install. You have many way to do this:
kedro_mlflow_tutorial==0.1
on your enterprise package manager (private pypi / nexus, gitlab or github package mangers...). conda
will be able to fetch it and build the environment with no error-e /Path/kedro-mlflow-tutorial/src/
to install it, and then serve the model with the --no-conda flag
, e.g. mlflow models serve -m [model/path] --no-conda
kedro-mlflow-tutorial
on public PyPI). I don't do this for this tutroial because it is likely than different people experimenting with this tutorial will end up install the one on PyPI accidentallyDoes it make sense ?
@Galileo-Galilei Yes, this does make a lot of sense. Thank you very much for taking the time to explain the proper way to serve the model.
Hi,
I am learning how to use Kedro_mlflow using this tutorial. I was able to get through all of it until I got to the model serving section. I am running into a ResolvePackageNotFound error
Any help with this would be appreciated.