Skip to content

monitor.ai: Non-intrusive monitoring for FDA-approved medical AI, helping healthcare organizations ensure safety and compliance without modifying validated models.

Notifications You must be signed in to change notification settings

realjules/monitor.legacy

Repository files navigation

Monitor.AI - ML Model Monitoring Platform

A comprehensive platform for monitoring and managing ML models with focus on compliance, reliability, and performance.

Repository Structure

monitor.ai/
├── core/                    # Core service implementations
│   ├── prediction_service/ # ML prediction service
│   ├── model_registry/     # Model versioning and management
│   ├── data_pipeline/      # Data processing and training pipelines
│   └── compliance/         # Compliance monitoring and auditing
├── services/               # Frontend and auxiliary services
│   └── frontend/          # React-based web interface
├── shared/                # Shared components and configurations
│   ├── api.Dockerfile     # Base API Dockerfile
│   └── model_registry.Dockerfile
├── infrastructure/        # Infrastructure as Code
│   ├── kubernetes/       # Kubernetes configurations
│   ├── terraform/        # Infrastructure provisioning
│   ├── monitoring/       # Monitoring stack (Prometheus/Grafana)
│   └── ci-cd/           # CI/CD configurations
└── tests/                # Test suites
    └── healthcare/       # Healthcare service tests

System Architecture

graph TD
    A[Prediction Service] --> B[Model Registry]
    A --> C[Data Pipeline]
    A --> D[Compliance Service]
    A --> E[Infrastructure]
    
    B -- "Model Versioning" --> C
    B -- "Model Validation" --> D
    C -- "Training Results" --> B
    C -- "Pipeline Logs" --> D
    E -- "Deploys" --> A
    E -- "Deploys" --> B
    E -- "Deploys" --> C
    E -- "Deploys" --> D
Loading

Quick Start

  1. Clone the Repository:
git clone https://github.com/realjules/monitor.ai.git
cd monitor.ai
  1. Set up Infrastructure:
# Create infrastructure using Terraform
cd infrastructure/terraform
terraform init
terraform apply

# Deploy Kubernetes components
cd ../kubernetes
kubectl apply -k base/
  1. Start Monitoring Stack:
# Install monitoring components
helm install prometheus prometheus-community/kube-prometheus-stack
helm install grafana grafana/grafana
  1. Start Core Services:
# Build and start all services
docker-compose up -d

# Start frontend development server
cd services/frontend
npm install
npm run dev

Core Components

Prediction Service

  • Provides ML-based predictions and analysis
  • Manages prediction requests and results
  • Tracks model performance and uncertainty
  • Integrates with all other services

Model Registry

  • Stores and versions ML models
  • Manages model metadata
  • Handles model deployment
  • Integrates with:
    • Data Pipeline (receives trained models)
    • Compliance (for model validation)
    • Infrastructure (for deployment)

Data Pipeline

  • Processes training data
  • Trains models
  • Validates results
  • Integrates with:
    • Model Registry (stores trained models)
    • Compliance (logs training activities)
    • Infrastructure (for compute resources)

Compliance Service

  • Monitors all activities
  • Enforces policies
  • Generates compliance reports
  • Integrates with:
    • Model Registry (validates models)
    • Data Pipeline (audits training)
    • Infrastructure (logs activities)

Infrastructure

  • Manages all infrastructure
  • Handles deployments
  • Monitors system health
  • Integrates with:
    • All other services
    • Cloud providers
    • Kubernetes clusters

Service Access Points

Frontend UI:     http://localhost:52209
Model Registry:  http://localhost:8000
Data Pipeline:   http://localhost:8080
Compliance:      http://localhost:8001
Grafana:         http://localhost:3000
Prometheus:      http://localhost:9090

Development Workflow

graph LR
    A[Data Pipeline] -- "Train Model" --> B[Model Registry]
    B -- "Validate" --> C[Compliance]
    C -- "Approve" --> D[Infrastructure]
    D -- "Deploy" --> E[Production]
Loading

Monitoring Architecture

graph TD
    A[Services] -- "Metrics" --> B[Prometheus]
    A -- "Logs" --> C[Elasticsearch]
    B -- "Visualize" --> D[Grafana]
    C -- "Analyze" --> D
    D -- "Alert" --> E[Alert Manager]
    E -- "Notify" --> F[Teams/Email/Slack]
Loading

Development

  1. Local Development Setup:
# Install dependencies
pip install -r requirements.txt
npm install --prefix services/frontend

# Start services in development mode
docker-compose -f docker-compose.dev.yml up
  1. Running Tests:
# Run all tests
python -m pytest tests/

# Run specific test suite
python -m pytest tests/healthcare/

Security Features

  • Regulatory compliance monitoring
  • Comprehensive audit logging
  • Role-based access control
  • Encrypted data storage and transmission
  • Regular security scanning
  • Performance monitoring and alerting

Contributing

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-feature)
  3. Commit your changes (git commit -m 'Add amazing feature')
  4. Push to the branch (git push origin feature/amazing-feature)
  5. Open a Pull Request

License

This project is licensed under the MIT License - see the LICENSE file for details

Releases

No releases published

Packages

No packages published

Contributors 2

  •  
  •