Deploy custom Python ML models directly within SQL queries using InterSystems IRIS 2025.2
Welcome EAP Participants! The IntegratedML Custom Models will be General Availability (GA) for the InterSystems IRIS 2026.1 release. Until then, this repository will be the source of documentation and information about the feature.
- Read the EAP Guide - Understand the program, timeline, and expectations
- Install Custom Models - Complete installation in <30 minutes (target)
- Check Known Issues - Review current limitations before reporting bugs
- Review Roadmap - See what's coming from EAP to GA
Your feedback directly shapes the final product! Choose your preferred channel:
- Survey (recommended): Survey links provided by Data Platforms Product Team
- Email: thomas.dyar@intersystems.com
- GitHub Issues (if enabled): Technical bugs and feature requests
Response time: 1-2 business days during EAP
For questions or support, see EAP FAQ or email thomas.dyar@intersystems.com.
- Overview
- Key Features
- Demo Applications
- Quick Start
- Documentation
- Architecture
- Testing
- Development
- Contributing
- License
- Support
IntegratedML Custom Models extends InterSystems IRIS IntegratedML with a powerful new capability: deploy your own Python models directly within SQL queries. While IntegratedML has provided automated ML for years, this feature gives data scientists full controlβcustom preprocessing, any scikit-learn compatible model, and third-party libraries like Prophet or LightGBMβall executing in-database without data movement.
-- Train your custom Python model with a single SQL command
CREATE MODEL CreditRiskAssessment
PREDICTING (default_risk)
FROM CreditApplications
USING {
"model_name": "CustomCreditRiskClassifier",
"path_to_classifiers": "/opt/iris/mgr/python/custom_models/classifiers",
"user_params": {
"enable_debt_ratio": 1,
"enable_risk_scoring": 1
}
}
-- Get predictions instantly
SELECT customer_id,
PREDICT(CreditRiskAssessment) as risk_score
FROM NewApplications- SQL Integration: Deploy scikit-learn compatible models directly in SQL
- Low Latency: Sub-50ms prediction latency for real-time applications
- Custom Models: Use your own Python models with domain-specific logic
- In-Database Processing: Train and predict without data exports
- Scalable: Designed for production workloads
Financial risk modeling with custom feature engineering for loan default prediction.
- Model: Custom ensemble classifier
- Test Data: 10,000 records
- Training Time: ~2.3 seconds
Transaction fraud detection using ensemble methods.
- Model: Multi-model ensemble (Neural + Rules + Anomaly)
- Test Data: 25,000 transactions
- Latency: <50ms per prediction
Time-series forecasting combining Prophet with LightGBM.
- Model: Prophet + LightGBM hybrid
- Accuracy: 26.9% MAPE
- Features: Seasonality, holidays
Sequence analysis using custom similarity algorithms.
- Model: K-NN with custom distance metrics
- Test Data: 5,000 sequences
- Features: GC content, motif search
- InterSystems IRIS 2025.2+
- Python 3.8+
- Docker & Docker Compose
# Clone the repository
git clone https://github.com/intersystems/integratedml-custom-models.git
cd integratedml-custom-models
# Setup environment (installs dependencies + starts IRIS)
make setup
# Run all demos
make demos# Credit Risk Assessment
make demo-credit
# Fraud Detection
make demo-fraud
# Sales Forecasting
make demo-sales
# DNA Similarity
make demo-dnaThis project's documentation is organized into three main areas:
Essential guides for Early Access Program participants:
- EAP Guide - Program overview, timeline, feedback channels
- Installation Guide - Platform-specific setup (macOS primary, Linux/Windows secondary)
- Known Issues - Current limitations and workarounds
- EAP Roadmap - Features from EAP to GA (2026.1)
- EAP FAQ - Frequently asked questions
- Troubleshooting - Common issues and solutions
π Core Documentation (docs/)
Cross-cutting technical documentation for the entire project:
- Quick Start Guide - Get started in under 5 minutes
- User Guide - Step-by-step usage instructions
- Architecture - System design, base class hierarchy, integration patterns
- API Reference - Complete API documentation for all model classes
- Deployment - Production deployment strategies and configuration
π― Demo Applications (demos/)
Working examples with demo-specific setup instructions:
- Credit Risk - Financial risk modeling with custom feature engineering
- Fraud Detection - Transaction fraud detection using ensemble methods
- Sales Forecasting - Time-series forecasting with Prophet + LightGBM
- DNA Similarity - Sequence analysis with custom distance metrics
π Feature Specifications (specs/)
Design documents and implementation plans for new features:
- Feature specifications with user stories and acceptance criteria
- Implementation plans with architecture decisions
- Task breakdowns and validation results
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β SQL Interface β
β CREATE MODEL | TRAIN MODEL | VALIDATE | PREDICT() β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ
β IntegratedML Engine β
β β’ Model Management β’ Parameter Handling β’ Serialization β
βββββββββββββββββββββββ¬ββββββββββββββββββββββββββββββββββββββββ
β
βββββββββββββββββββββββΌββββββββββββββββββββββββββββββββββββββββ
β Custom Python Models β
β β’ Scikit-learn Compatible β’ Domain-Specific Logic β
β β’ Feature Engineering β’ Custom Algorithms β
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
# Run all tests
make test
# Run E2E test with enhanced data volumes
python tests/test_all_demos_e2e.py
# Run specific demo tests
pytest demos/credit_risk/tests/ -v
pytest demos/fraud_detection/tests/ -v| Demo | Data Volume | Training Time | Performance |
|---|---|---|---|
| Credit Risk | 10,000 records | 2.3s | 100% accuracy |
| Fraud Detection | 25,000 transactions | 11.7s | 192 flagged |
| Sales Forecasting | 365 days Γ 5 stores | 0.4s | 26.9% MAPE |
| DNA Similarity | 5,000 sequences | 1.7s | 50.5% accuracy |
integratedml-custom-models/
βββ demos/ # Demo applications
β βββ credit_risk/ # Credit risk assessment
β βββ fraud_detection/ # Fraud detection system
β βββ sales_forecasting/ # Time series forecasting
β βββ dna_similarity/ # DNA sequence analysis
βββ shared/ # Shared components
β βββ models/ # Base model classes
β βββ database/ # IRIS connection utilities
β βββ utils/ # Helper functions
βββ docker/ # Docker configuration
βββ notebooks/ # Jupyter notebooks
βββ tests/ # Test suites
βββ scripts/ # Utility scripts
- Extend the base model class:
from shared.models.base import IntegratedMLBaseModel
class MyCustomModel(IntegratedMLBaseModel):
def fit(self, X, y, **params):
# Your training logic
pass
def predict(self, X):
# Your prediction logic
pass- Deploy to IRIS:
CREATE MODEL MyModel
PREDICTING (target)
FROM MyTable
USING {
"model_name": "MyCustomModel",
"path_to_classifiers": "/path/to/models"
}We welcome contributions! Please see our Contributing Guide for details.
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
This project is licensed under the MIT License - see the LICENSE file for details.
For support with IntegratedML Custom Models: