openreplay/ee/recommendation
dependabot[bot] 804e4ba0c2
chore(deps): bump the pip group across 4 directories with 11 updates
Bumps the pip group with 7 updates in the /ee/connectors/deploy directory:

| Package | From | To |
| --- | --- | --- |
| [certifi](https://github.com/certifi/python-certifi) | `2022.09.24` | `2024.7.4` |
| [idna](https://github.com/kjd/idna) | `3.4` | `3.7` |
| [requests](https://github.com/psf/requests) | `2.28.1` | `2.32.2` |
| [urllib3](https://github.com/urllib3/urllib3) | `1.26.12` | `1.26.19` |
| [snowflake-connector-python](https://github.com/snowflakedb/snowflake-connector-python) | `3.0.4` | `3.13.1` |
| [pycryptodomex](https://github.com/Legrandin/pycryptodome) | `3.18.0` | `3.19.1` |
| [redshift-connector](https://github.com/aws/amazon-redshift-python-driver) | `2.0.915` | `2.1.7` |

Bumps the pip group with 3 updates in the /ee/intelligent_search directory: [certifi](https://github.com/certifi/python-certifi), [requests](https://github.com/psf/requests) and [pydantic](https://github.com/pydantic/pydantic).
Bumps the pip group with 1 update in the /ee/quickwit directory: [requests](https://github.com/psf/requests).
Bumps the pip group with 6 updates in the /ee/recommendation directory:

| Package | From | To |
| --- | --- | --- |
| [requests](https://github.com/psf/requests) | `2.31.0` | `2.32.2` |
| [urllib3](https://github.com/urllib3/urllib3) | `2.0.7` | `2.2.2` |
| [pydantic](https://github.com/pydantic/pydantic) | `2.6.3` | `2.11.5` |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) | `1.4.1.post1` | `1.5.1` |
| [mlflow](https://github.com/mlflow/mlflow) | `2.11.1` | `2.20.3` |
| [python-multipart](https://github.com/Kludex/python-multipart) | `0.0.6` | `0.0.18` |



Updates `certifi` from 2022.09.24 to 2024.7.4
- [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2024.07.04)

Updates `idna` from 3.4 to 3.7
- [Release notes](https://github.com/kjd/idna/releases)
- [Changelog](https://github.com/kjd/idna/blob/master/HISTORY.rst)
- [Commits](https://github.com/kjd/idna/compare/v3.4...v3.7)

Updates `requests` from 2.28.1 to 2.32.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.32.2)

Updates `urllib3` from 1.26.12 to 1.26.19
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.12...1.26.19)

Updates `snowflake-connector-python` from 3.0.4 to 3.13.1
- [Release notes](https://github.com/snowflakedb/snowflake-connector-python/releases)
- [Commits](https://github.com/snowflakedb/snowflake-connector-python/compare/v3.0.4...v3.13.1)

Updates `pycryptodomex` from 3.18.0 to 3.19.1
- [Release notes](https://github.com/Legrandin/pycryptodome/releases)
- [Changelog](https://github.com/Legrandin/pycryptodome/blob/master/Changelog.rst)
- [Commits](https://github.com/Legrandin/pycryptodome/compare/v3.18.0...v3.19.1)

Updates `redshift-connector` from 2.0.915 to 2.1.7
- [Release notes](https://github.com/aws/amazon-redshift-python-driver/releases)
- [Changelog](https://github.com/aws/amazon-redshift-python-driver/blob/master/CHANGELOG.md)
- [Commits](https://github.com/aws/amazon-redshift-python-driver/compare/v2.0.915...v2.1.7)

Updates `certifi` from 2023.7.22 to 2024.7.4
- [Commits](https://github.com/certifi/python-certifi/compare/2022.09.24...2024.07.04)

Updates `requests` from 2.31.0 to 2.32.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.32.2)

Updates `pydantic` from 2.3.0 to 2.4.0
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.3.0...v2.4.0)

Updates `requests` from 2.31.0 to 2.32.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.32.2)

Updates `requests` from 2.31.0 to 2.32.2
- [Release notes](https://github.com/psf/requests/releases)
- [Changelog](https://github.com/psf/requests/blob/main/HISTORY.md)
- [Commits](https://github.com/psf/requests/compare/v2.28.1...v2.32.2)

Updates `urllib3` from 2.0.7 to 2.2.2
- [Release notes](https://github.com/urllib3/urllib3/releases)
- [Changelog](https://github.com/urllib3/urllib3/blob/main/CHANGES.rst)
- [Commits](https://github.com/urllib3/urllib3/compare/1.26.12...1.26.19)

Updates `pydantic` from 2.6.3 to 2.11.5
- [Release notes](https://github.com/pydantic/pydantic/releases)
- [Changelog](https://github.com/pydantic/pydantic/blob/main/HISTORY.md)
- [Commits](https://github.com/pydantic/pydantic/compare/v2.3.0...v2.4.0)

Updates `scikit-learn` from 1.4.1.post1 to 1.5.1
- [Release notes](https://github.com/scikit-learn/scikit-learn/releases)
- [Commits](https://github.com/scikit-learn/scikit-learn/compare/1.4.1.post1...1.5.1)

Updates `mlflow` from 2.11.1 to 2.20.3
- [Release notes](https://github.com/mlflow/mlflow/releases)
- [Changelog](https://github.com/mlflow/mlflow/blob/master/CHANGELOG.md)
- [Commits](https://github.com/mlflow/mlflow/compare/v2.11.1...v2.20.3)

Updates `python-multipart` from 0.0.6 to 0.0.18
- [Release notes](https://github.com/Kludex/python-multipart/releases)
- [Changelog](https://github.com/Kludex/python-multipart/blob/master/CHANGELOG.md)
- [Commits](https://github.com/Kludex/python-multipart/compare/0.0.6...0.0.18)

---
updated-dependencies:
- dependency-name: certifi
  dependency-version: 2024.7.4
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: idna
  dependency-version: '3.7'
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: requests
  dependency-version: 2.32.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: urllib3
  dependency-version: 1.26.19
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: snowflake-connector-python
  dependency-version: 3.13.1
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: pycryptodomex
  dependency-version: 3.19.1
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: redshift-connector
  dependency-version: 2.1.7
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: certifi
  dependency-version: 2024.7.4
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: requests
  dependency-version: 2.32.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: pydantic
  dependency-version: 2.4.0
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: requests
  dependency-version: 2.32.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: requests
  dependency-version: 2.32.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: urllib3
  dependency-version: 2.2.2
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: pydantic
  dependency-version: 2.11.5
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: scikit-learn
  dependency-version: 1.5.1
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: mlflow
  dependency-version: 2.20.3
  dependency-type: direct:production
  dependency-group: pip
- dependency-name: python-multipart
  dependency-version: 0.0.18
  dependency-type: direct:production
  dependency-group: pip
...

Signed-off-by: dependabot[bot] <support@github.com>
2025-05-28 15:02:24 +00:00
..
core chore(recommendations): python modules updated and added airflow dag to save sessions features (#1979) 2024-04-24 15:10:18 +02:00
ml_service chore(recommendations): python modules updated and added airflow dag to save sessions features (#1979) 2024-04-24 15:10:18 +02:00
ml_trainer chore(recommendations): python modules updated and added airflow dag to save sessions features (#1979) 2024-04-24 15:10:18 +02:00
utils chore(recommendations): python modules updated and added airflow dag to save sessions features (#1979) 2024-04-24 15:10:18 +02:00
.gitignore feat(recommendations): Added services recommendation (ml_service) and trainer (ml_trainer) (#1275) 2023-06-07 15:58:33 +02:00
Dockerfile feat(recommendations): Added services recommendation (ml_service) and trainer (ml_trainer) (#1275) 2023-06-07 15:58:33 +02:00
README.md feat(recommendations): Added services recommendation (ml_service) and trainer (ml_trainer) (#1275) 2023-06-07 15:58:33 +02:00
requirements_base.txt chore(deps): bump the pip group across 4 directories with 11 updates 2025-05-28 15:02:24 +00:00

Recommendations

index

  1. Build image
    1. Recommendations service image
    2. Trainer service image
  2. Trainer
    1. Env params
  3. Recommendations
    1. Env params

Build image

In order to build both recommendation image and trainer image, first a base image should be created by running the following command:

docker build -t recommendations_base .

which will add the files from core and utils which are common between ml_service and ml_trainer and will install common dependencies.

Recommendations service image

Inside ml_service run docker build to create the recommendation service image

cd ml_service/
docker build -t recommendations .
cd ../

Trainer service image

Inside ml_trainer run docker build to create the recommendation service image

cd ml_trainer/
docker build -t trainer .
cd ../

Trainer service

The trainer is an orchestration service which is in charge of training models and saving models into S3. This is made using Directed Acyclic Graphs (DAGs) in Airflow for orchestration and MLflow as a monitoring service for training model that creates a registry over S3.

Trainer env params

 pg_host=
 pg_port=
 pg_user=
 pg_password=
 pg_dbname=
 pg_host_ml=
 pg_port_ml=
 pg_user_ml=
 pg_password_ml=
 pg_dbname_ml='mlruns'
 PG_POOL='true'
 MODELS_S3_BUCKET= #'s3://path/to/bucket'
 pg_user_airflow=
 pg_password_airflow=
 pg_dbname_airflow='airflow'
 pg_host_airflow=
 pg_port_airflow=
 AIRFLOW_HOME=/app/airflow
 airflow_secret_key=
 airflow_admin_password=
 crons_train='0 0 * * *'

Recommendation service

The recommendation service is a FastAPI server that uses MLflow to read models from S3 and serve them, it also takes feedback from user and saves it into postgres for retraining purposes.

Recommendation env params

 pg_host=
 pg_port=
 pg_user=
 pg_password=
 pg_dbname=
 pg_host_ml=
 pg_port_ml=
 pg_user_ml=
 pg_password_ml=
 pg_dbname_ml='mlruns'
 PG_POOL='true'
 API_AUTH_KEY=