Skip to content

A boilerplate service for recommendation using vowpal wabbit (reinforcement learning algorithm)

Notifications You must be signed in to change notification settings

carlosbertoncelli/recommendation-service

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

1 Commit
 
 
 
 
 
 
 
 

Repository files navigation

Vowpal Wabbit Microservice with FastAPI

Python FastAPI Vowpal Wabbit SQLAlchemy Docker

This project creates a microservice for generic item recommendations using Vowpal Wabbit and FastAPI. The service exposes two endpoints, one for training and one for prediction. All events are logged and persisted to an SQLite database.

Project Structure

/vw_recommendation /app init.py main.py models.py vw_model.py database.py logger.py /logs Dockerfile requirements.txt

Setup Instructions

  1. Clone the repository:
git clone https://github.com/cabjr/recommendation-service
  1. Navigate to the project directory:
cd recommendation-service
  1. Install the dependencies:
pip install -r requirements.txt
  1. Run the server:
uvicorn app.main:app --reload

The application will be accessible at localhost:8000.

API Documentation

FastAPI automatically generates a Swagger UI documentation for all the endpoints. After running the server, the API documentation is accessible at localhost:8000/docs.

Logging

All the events are logged into a file inside the /logs directory.

Database

The application uses SQLite for data persistence, and all events (like training and prediction) are stored in the database. SQLAlchemy is used as the ORM for handling database operations.

About

A boilerplate service for recommendation using vowpal wabbit (reinforcement learning algorithm)

Topics

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published