Week 4

Week 4 Progress Report: Testing, CI/CD & Deployment Setup #

Executive Summary #

This week focused on hardening our system for deployment by implementing comprehensive testing, establishing a CI/CD pipeline, and deploying the full Kolobok application to Yandex Cloud.

We introduced rigorous testing across backend APIs, ML components, and user-facing interfaces (Telegram bot and web UI). GitHub Actions was configured for CI, allowing for automated linting, test execution, and image building on every PR to main. A lightweight CD system was also added, automatically deploying the updated backend to our staging server.

Thanks to this effort, the Kolobok system is now verifiably functional, resilient to regression, and ready for external pilot testing.


Testing Strategy #

We structured our testing strategy around four pillars: backend unit testing, API integration, ML model validation, and end-user interaction coverage.

Backend (FastAPI) #

  • Tools: unittest, httpx
  • Coverage: 100% overall
  • Tests written:
    • Input validation (bad image, invalid tokens)
    • Response formatting for successful and failed inferences
    • Token authentication & permissions

API Integration Tests #

  • End-to-end test cases simulating:
    • Base64 image upload β†’ inference β†’ JSON response
    • Token failure handling
    • Spike-only and tread-only photo behavior
  • Tools: requests, pytest, custom mock images

Telegram Bot & Frontend Testing #

Telegram Bot #

  • Covered flows:

    • Image sent too early
    • Cancel operation
    • Prediction correction
    • Token missing from config
  • Manual testing was conducted

Web Platform #

  • Covered flows:

    • File drag/drop
    • Predict + correct
    • Network error fallback
    • Invalid file warning
  • Testing via browser devtools and form mocking

Machine Learning Validation #

  • Tread Depth:
    • Average error: 0.62mm (on synthetic test set)
    • Real-tire test batch: 83% within 1.0mm
  • Spike Classifier:
    • FP+FN: ~7.4
    • ROC AUC: 0.91
  • OCR (GPT-4o):
    • Strict match: 100% on test set
    • Format compliance: 100%

Model interface was tested by simulating raw API calls and observing prediction JSON structure.


CI/CD Setup #

CI Configuration #

CI is set up via GitHub Actions:

  • Triggers: PR/push to main
  • Steps:
    • Install dependencies
    • Run formatting/linting
    • Run tests (pytest)

Environment Setup #

We successfully deployed our application to Yandex Cloud (using free trial plan).

Note: our service requires high computing power, which implies huge costs. We will power on the service only during demo.

Staging Details #

  • Services exposed:
    • /api/v1/analyze_tread
    • /api/v1/identify_tire

Stack Summary #

ComponentTechnology
BackendFastAPI + Docker
Botpython-telegram-bot
ML ModelsPyTorch, callable endpoints
DeploymentGitHub Actions + Docker Compose
MonitoringLogs + manual probes

Code Coverage Report #

We have implemented autolinting and autotesting for ML backend and JS frontend parts of our codebase. Current state of the codebase coverage:

ServiceStatus
Backend (linting)βœ… 100%
Backend (tests)βœ… 100%
Frontend (tests)βœ… 100%

PM Team Vibe Check #

Team MemberStatusNote
Nikita M.βœ… EngagedCoordinating next week’s strategy
Nikita Z.βœ… MotivatedFinalized model testing and validation
Vlad S.βœ… EnergizedResolved Docker network bug
Sergey A.βœ… PositiveLed coverage push for backend
Ekaterina P.βœ… FocusedFinished test loop for frontend
Darya S.βœ… ProductiveValidated bot UX with edge cases
Dmitry T.βœ… CuriousOpened PR for synthetic validation overlay tool

Team Contributions #

Team MemberContributions
Nikita MenshikovWrote the report, pitched CI/CD planning, ran team vibe check
Nikita ZagainovAdded tests to ML pipeline, facilitate logging in the backend, conducted experiments on enhancing tread depth recognition
Dmitry TetkinAssisted research on how synthetic dataset influence precision, helped integration synthetic data into pipeline, developed MacOS desktop app
Vladislav StrelkovBuilt full CI pipeline, assisted in depth evaluation research
Sergey AitovBuilt OCR MVP
Ekaterina PetrovaEnhanced bot logging and authentification, assisted in shaping the final version of the pipeline
Darya StepanovaWebpage frontend and backend huge update

Confirmation of System Operability #

  • βœ… All tests passing locally and in CI
  • βœ… Docker builds succeed for all services