How andreidonskoi/post_recsys works
This is a text-post recommendation service with a separate model-development workflow. In the live path, a request is checked for a known user, user-and-time features are built across posts, an A/B group selects a model, and scored posts are returned in the requested order. The README also describes offline feature creation and model training; the notebook contents were not sampled, so those stages are shown only at the documented level. The baseline endpoint is a separate random-post path.
Main entry points: service.py Recommendation endpoints · data_for_launch.py Launch data queries · get_predictions.py Post scoring and ranking · construct_user_dataframe.py User-post features
Components 14
Service API
- Recommendation endpoints
src/service/service.py - Response schemas
src/service/schema.py - Random baseline posts
src/service/service.py
Recommendation Features
- User-post features
src/features/construct_user_dataframe.py
Model Selection
- A/B assignment
src/models/model_loader.py - Post scoring and ranking
src/models/get_predictions.py - Model loading
src/models/model_loader.py - Control and test models
models - Model training
notebooks
Data and Development
- Launch data queries
src/data/data_for_launch.py - Database connection
src/service/connection.py - Offline feature creation
notebooks
Other components
- API client
- PostgreSQL
Connections 16
- API client → Recommendation endpoints: requests recommendations
README.md - Recommendation endpoints → Launch data queries: checks known users
src/service/service.py - Recommendation endpoints → User-post features: builds user features
src/service/service.py - Recommendation endpoints → A/B assignment: assigns experiment
src/service/service.py - Recommendation endpoints → Post scoring and ranking: requests ranked posts
src/service/service.py - Post scoring and ranking → Model loading: loads group model
src/models/get_predictions.py - Post scoring and ranking → Launch data queries: looks up post text
src/models/get_predictions.py - Model loading → Control and test models: loads model artifact
src/models/model_loader.py - User-post features → Launch data queries: uses user and post data
src/features/construct_user_dataframe.py - Launch data queries → Database connection: queries through
src/data/data_for_launch.py - Database connection → PostgreSQL: connects to
- Recommendation endpoints → Response schemas: declares response types
src/service/service.py - API client → Random baseline posts: requests random baseline
src/service/service.py - Random baseline posts → Launch data queries: selects post records
src/service/service.py - Offline feature creation → Model training: prepares training data
README.md - Model training → Control and test models: saves trained models
README.md