- Set the environment variables given in the below table.
- Update the python environment in
.env
file - Install
poetry
if not already installed - Install the dependencies using poetry
poetry install
- Add
./src
to thePYTHONPATH
-export PYTHONPATH="${PYTHONPATH}:./src"
- Run
python src/main.py
orpoetry run python src/main.py
The following environment variables can be set:
Variable | Default Value | Description |
---|---|---|
MLFLOW_TRACKING_URI | https://mlflow.dc-mlops.co.uk |
The URI for the MLFlow tracking server. Use http://mlflow-tracking:80 for kind cluster |
MLFLOW_TRACKING_USERNAME | None | MLFlow tracking username. In kind cluster no need to set it as there is no authentication needed, but ensure that you set it on Production cluster. |
MLFLOW_TRACKING_PASSWORD | None | MLFlow tracking password. In kind cluster no need to set it as there is no authentication needed, but ensure that you set it on Production cluster. |
DEPLOY_MODEL_NAME | house_price_prediction_prod |
The name of the model to be deployed |
DEPLOY_MODEL_ALIAS | champion |
The alias for the deployed model |
Ensure that you have the project requirements already set up by following the Model image creation for deployment instructions
- Ensure
pytest
is installed.poetry install
will install it as a dev dependency. -
- For integration tests, set up the dependencies (MLFlow) by running,
docker-compose up -d
- For integration tests, set up the dependencies (MLFlow) by running,
- Run the tests with
poetry run pytest ./tests