Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel
perkzen 919ea0e8e9
Merge remote-tracking branch 'origin/main'
24 seconds ago
cbb543a2b0
fix: update config
1 month ago
c9915410c3
fix: pipeline
1 hour ago
c64acb8c96
action: fetch weather data
48 seconds ago
gx
a0ea3ddbb3
fix: great expectations
1 week ago
f461b600a2
feat: use model registry
1 week ago
ed51198250
chore: refactor
6 days ago
e91424a409
action: train model
29 minutes ago
src
b9c956c3f9
feat: add smooth transitions
54 seconds ago
b1e3704af5
fix: docker ignore
1 month ago
b851d16dd6
feat: update jobs
1 month ago
f461b600a2
feat: use model registry
1 week ago
9e082016b0
fix: docker
6 hours ago
d0b5baa24b
edit: README.md
1 month ago
90278304f8
chore: update readme
5 days ago
640829e3f0
fix: remove api key
6 days ago
8be035d609
feat: update models
3 weeks ago
b254c9a004
feat: use postgres
7 hours ago
b254c9a004
feat: use postgres
7 hours ago
d6f698d74d
feat: add pytest.ini
1 month ago
Storage Buckets
Data Pipeline
Legend
DVC Managed File
Git Managed File
Metric
Stage File
External File

README.md

You have to be logged in to leave a comment. Sign In

Bike Station Availability Prediction Service

Description

Web application for predicting the number of available bike stands at one of the MBajk bike stations. The prediction service is based on a recurrent neural network model (GRU). Its components are a FastAPI REST API and Next.js frontend.

This project implements machine learning pipelines for continuous data fetching and model training to ensure that the prediction models are constantly improving over time. It utilizes ONNX (Open Neural Network Exchange) Runtime for fast prediction performance and model quantization techniques to reduce model size without significantly impacting accuracy.

Project structure

├── README.md <- File containing project description and setup instructions
├── data
    ├── processed <- Processed data, prepared for training
    └── raw <- Raw downloaded data
├── models <- Trained and serialized models, model predictions, or summaries of models
├── notebooks <- Jupyter notebooks
├── reports <- Generated analysis files
    └── figures <- Generated graphs and images used in the analysis
├── pyproject.toml <- File defining dependencies, library versions, etc.
├── src <- Source code of the project
  ├── __init__.py <- Initializes the "src" directory as a Python module
  ├── data <- Scripts for data downloading, processing, etc.
  ├── models <- Scripts for training predictive models and using models for prediction
  ├── serve <- Scripts for serving models as web services
  ├── client <- Source code for the user interface
  ├── validation <- Scripts for data validation
  |── tests <- Tests for the project
  |── utils <- Utility functions
  └── visualization <- Scripts for visualization

ML Service environment variables example

WINDOW_SIZE=48
TOP_FEATURES=4
LAT=46.5547
LON=15.6466
MBAJK_API_KEY=<mbajk_api_key>
MLFLOW_TRACKING_URI=<mlflow_tracking_uri>
MLFLOW_TRACKING_USERNAME=<mlflow_tracking_username>
MLFLOW_TRACKING_PASSWORD=<mlflow_tracking_password>
DAGSHUB_USER_TOKEN=<dagshub_user_token>
TF_USE_LEGACY_KERAS=1

ML Client environment variables example

NEXT_PUBLIC_API_URL=<mbajk_api_key>
NEXT_PUBLIC_GOOGLE_MAPS_KEY=<google_maps_api_key>

Scripts

Python scripts that can be run are defined in the pyproject.toml file.

Script usage

To run a script, use the following command:

poetry run poe <script_name>

Makefile

The Makefile contains the most commonly used commands for the project. To run a command, use the following command:

Make commands:

  • build - Builds the Docker images for the project and runs them in docker-compose.
  • up - Starts the Docker containers.
  • down - Stops the Docker containers.
  • dev-server - Starts the development server for backend.
  • dev-client - Starts the development server for frontend.
  • dev - Starts the development server for backend and frontend.
  • test - Runs the tests for the project.
make <command_name>

Setup

  • Python 3.12
  • Poetry 1.8.2
  • Docker 25.0.0
  • Node.js 20.0.0
  • npm 10.0.0
Tip!

Press p or to see the previous file or, n or to see the next file

About

Web application for predicting the number of available bike stands at one of the MBajk bike stations.

Collaborators 1

Comments

Loading...