Make sure you have the following installed before proceeding:
- Python (>=3.8)
- Pip (latest version)
- Virtual Environment (
venv
) - ZenML
- MLflow
Create a new folder to contain the project and navigate into it:
mkdir price_predictor_system
cd price_predictor_system
python3 -m venv vnv
python -m venv vnv
source vnv/bin/activate
vnv\Scripts\activate
Once activated, you should see (vnv)
at the beginning of your terminal prompt.
Make sure you have a requirements.txt
file with the necessary dependencies. Install them using:
pip install -r requirements.txt
zenml
mlflow
pandas
numpy
scikit-learn
matplotlib
ZenML requires specific integrations for MLflow. Install them using:
zenml integration install mlflow -y
ZenML requires a stack configuration for MLflow experiment tracking and model deployment. Run the following commands:
zenml experiment-tracker register mlflow_tracker --flavor=mlflow
zenml model-deployer register mlflow --flavor=mlflow
zenml stack register local-mlflow-stack -a default -o default -d mlflow -e mlflow_tracker --set
To run the project, execute the following command:
python run_deployment.py
Make sure the virtual environment is activated before running any command.
- Always activate the virtual environment before running the project.
- Ensure that all dependencies are installed correctly.
- If you encounter any errors, check the installed packages using:
pip list