Welcome to the ML Engineer challenge at Applied Computing! This is designed to test your skills in building production-ready ML systems that go beyond just model development. You'll be building a complete MLOps pipeline with containerisation, testing, monitoring, and deployment capabilities.
You will build a Multi-Model Computer Vision API that serves different models for image classification, object detection, and image similarity search. The system must be production-ready with proper testing, monitoring, containerisation, and scalability.
- Multi-service architecture using Docker Compose
- API Gateway with rate limiting and authentication
- Model serving service with multiple model endpoints
- Background job processing for batch inference
- Redis cache for results and model metadata
- PostgreSQL database for storing inference logs and metrics
- Monitoring stack with Prometheus and Grafana (optional but preferred)
Build a multi-model system that can handle different computer vision tasks with advanced optimisation techniques. Note You don't have to build a new architecture, feel free to utilise any pre-built architecture to get your outputs.
-
Model Selection & Training
- Utilise 3 different models:
- Image Classification (ViT / ResNet / EfficientNet etc. on CIFAR-100)
- Object Detection (YOLO / DETR etc. on COCO subset)
- For Image classification only: fine-tune the model with the following techniques: mixed precision, gradient clipping, learning rate scheduling. Use the tiny-ImageNet dataset for this. To download the dataset, use the following utility script:
python ./scripts/download_datasets.py
- Implement custom data augmentation pipeline
- Utilise 3 different models:
-
Model Optimisation
- Apply quantization (INT8) to all models
- Convert models to ONNX and TensorRT formats
- Benchmark inference times across all formats
-
Model Validation
- Implement comprehensive model validation pipeline
- A/B testing framework for model comparison
- Model drift detection using statistical tests
- Performance regression testing
models/
directory with training scripts and model artifactsbenchmarks/
directory with performance comparison reports- Comprehensive model cards with metrics and limitations
Build a robust, scalable API system for serving ML models with proper error handling, validation, and monitoring.
-
FastAPI Application Structure
api/ βββ main.py βββ routers/ β βββ classification.py β βββ detection.py βββ models/ β βββ schemas.py β βββ responses.py βββ services/ β βββ model_service.py β βββ cache_service.py β βββ inference_service.py βββ middleware/ β βββ auth.py β βββ rate_limit.py β βββ monitoring.py βββ utils/ βββ image_processing.py βββ validators.py
-
API Endpoints
POST /api/v1/classify
- Image classificationPOST /api/v1/detect
- Object detectionPOST /api/v1/batch
- Batch processing endpointGET /api/v1/models
- Model metadata and healthGET /api/v1/health
- System health checkGET /api/v1/metrics
- Prometheus metrics endpoint
-
Advanced Features
- Rate limiting: Different limits per user tier
- Input validation: Comprehensive image validation (size, format, content)
- Async processing: Background jobs for large batch requests
- Model versioning: Support for multiple model versions
- Graceful degradation: Fallback mechanisms when models fail
-
Error Handling & Logging
- Structured logging with correlation IDs
- Custom exception handling with user-friendly messages
- Request/response logging for debugging
- Performance monitoring and alerting
- Complete FastAPI application with all endpoints
- Comprehensive API documentation (auto-generated + custom)
- Postman collection or OpenAPI spec for testing
Implement a complete testing pyramid with unit, integration, and end-to-end tests.
-
Unit Tests (target: >90% coverage)
- Model inference functions
- Image preprocessing utilities
- API route handlers
- Service layer functions
- Mock external dependencies
-
Integration Tests
- Database operations
- Model loading and inference
- API endpoint integration
-
Performance Tests
- Stress testing for model inference
- Memory usage profiling
-
Test Infrastructure
- Pytest configuration with fixtures
- Test database setup/teardown
- Mock services for external dependencies
- Continuous testing with GitHub Actions or similar
tests/
directory with complete test suite- Test configuration and fixtures
- Performance test reports
- CI/CD pipeline configuration
Create a production-ready containerised system with proper orchestration.
-
Docker Images
- Multi-stage builds for optimal image size
- Security best practices (non-root user, minimal base images)
- Optimized for caching layers
- Separate images for different services
-
Docker Compose Setup
services: api-gateway: # Nginx or Traefik ml-api: # FastAPI application worker: # Celery worker for background jobs redis: # Cache and message broker postgres: # Database prometheus: # Metrics collection grafana: # Monitoring dashboard (optional)
-
Service Configuration
- Environment-based configuration
- Health checks for all services
- Proper resource limits
- Volume management for persistent data
- Network configuration and service discovery
Dockerfile
for each servicedocker-compose.yml
for local developmentdocker-compose.prod.yml
for production- Documentation for deployment and scaling
ml-engineer-challenge/
βββ README.md # Complete setup and usage guide
βββ requirements.txt # Python dependencies
βββ docker-compose.yml # Service orchestration
βββ Dockerfile # Main application container
βββ api/ # FastAPI application
βββ models/ # Model training and artifacts
βββ tests/ # Complete test suite
βββ monitoring/ # Prometheus, Grafana configs
βββ scripts/ # Utility scripts
βββ docs/ # Additional documentation
βββ .github/workflows/ # CI/CD pipeline
-
README.md with:
- Architecture overview and design decisions
- Setup and installation instructions
- API usage examples
- Performance benchmarks
- Known limitations and future improvements
-
API Documentation
- Complete endpoint documentation
- Request/response examples
- Error handling guide
- Authentication guide
-
Technical ReadMe.md (PDF or Markdown):
- Model selection and optimization rationale
- Performance benchmarking results
- System architecture decisions
- Scalability considerations
- Code Quality: PEP 8 compliance, type hints, docstrings
- Test Coverage: Minimum 85% for critical paths
- Documentation: Comprehensive and clear
- Performance: Sub-second inference for single images
- Security: No hardcoded secrets, proper input validation
- Scalability: Design for horizontal scaling
- Code quality, architecture, and best practices
- Model optimization and performance
- System scalability and reliability
- Testing coverage and quality
- Containerization and orchestration
- Monitoring and observability
- Error handling and resilience
- Model selection and optimization
- Performance benchmarking
- MLOps pipeline design
- Technical depth and innovation
- Documentation clarity
- Code readability
- Technical explanations
- Design decision rationale
-
Set up your development environment
git clone <your-repo> cd ml-engineer-challenge pip install -r requirements.txt
-
Download required datasets
# Download just tiny ImageNet python scripts/setup/download_datasets.py --dataset tiny_imagenet # Download all datasets (including tiny ImageNet) python scripts/setup/download_datasets.py --dataset all # Specify custom data directory python scripts/setup/download_datasets.py --dataset tiny_imagenet --data-dir /custom/path
-
Start the development stack
docker-compose up -d
-
Run the test suite
pytest tests/ -v --cov=api
Good luck! This challenge will test your ability to build production-ready ML systems. Focus on creating a system that could actually be deployed and maintained in a real production environment.
Questions? Feel free to make reasonable assumptions and document them in your README. We're looking for engineering judgment as much as technical skills.