on ‎01-10-2024 05:00 PM
When using MLflow to log a model, be aware of warnings like the one below:
WARNING mlflow.utils.requirements_utils: The following packages were not found in the public PyPI package index as of 2022-12-21; if these packages are not present in the public PyPI index, you must install them manually before loading your model: {'spark-xgboost'}
This warning indicates that if certain package artifacts, such as spark-xgboost, are not available in PyPI, they won't be logged in the requirements.txt file. To recreate the model environment, these dependencies must be installed explicitly.
Here's an example:
%sh
git clone https://github.com/sllynn/spark-xgboost.git;
cd spark-xgboost;
pip install -e .