- Advanced Batch Processing API β Hig## π Previous Releases
- π Unified CLI Interface β New main.py with interactive mode selection between GUI and API
- π§ Enhanced API Integration β Complete REST API server with health checks for all modules
- π― Improved Error Handling β Robust error handling and comprehensive logging across all components
- π Better System Integration β Seamless switching between web interface and API server modes
- Interactive CLI Mode β Choose between GUI, API, or system info with simple menu
- Direct Mode Selection β Launch specific modes directly via command line flags
- Version Display β Easy version checking with --version flag
- System Analysis β Built-in hardware and software analysis tools
- Enhanced Logging β Comprehensive logging across all components
kolosal AutoML streamlines the entire machineβlearning lifecycleβfrom data ingestion to model deployment. Now featuring a modern Gradio-powered web interface, intelligent preprocessing, stateβofβtheβart hyperβparameter optimisation, deviceβaware acceleration, and firstβclass experiment tracking.
- Unified CLI Interface with interactive mode selection
- Gradio-powered UI with intuitive tabbed interface
- Real-time data visualization and comprehensive data previews
- Interactive model training with progress tracking
- Dedicated inference server for production deployments
- Sample dataset integration with popular ML datasets
- Secure model management with encryption support
- Multiβtask support: classification, regression, clustering
- Seamless integration with scikitβlearn, XGBoost, LightGBM & CatBoost
- Automated model selection & tuning
Classification | Regression |
---|---|
Logistic Regression | Linear Regression |
Random Forest Classifier | Random Forest Regressor |
Gradient Boosting Classifier | Gradient Boosting Regressor |
XGBoost Classifier | XGBoost Regressor |
LightGBM Classifier | LightGBM Regressor |
CatBoost Classifier | CatBoost Regressor |
Support Vector Classifier | Support Vector Regressor |
Neural Network | Neural Network |
- Grid Search, Random Search, Bayesian Optimisation
- ASHT (Adaptive SurrogateβAssisted Hyperβparameter Tuning)
- HyperX (metaβoptimiser for large search spaces)
- Autoβscaling & encoding
- Robust missingβvalue & outlier handling
- Feature selection / extraction pipelines
- Incremental Learning with partial_fit support
- Deviceβaware config & adaptive batching
- Advanced Batch Processing with priority queues
- Dynamic Memory Management with optimization
- Asynchronous Processing for non-blocking operations
- Quantisation & parallel execution
- Memoryβefficient data loaders
- Realβtime learning curves & metric dashboards
- Performance Analytics with detailed insights
- Job Status Monitoring for async operations
- Builtβin experiment tracker
- Performance comparison across models
- Feature importance visualizations
- Python 3.10 or newer
Option 1 β Fast Setup with UV π₯ (Recommended)
# 1. Clone the repository
git clone https://github.com/KolosalAI/kolosal_automl.git
cd kolosal_automl
# 2. Install uv (if not already installed)
# macOS/Linux:
curl -LsSf https://astral.sh/uv/install.sh | sh
# Windows:
powershell -c "irm https://astral.sh/uv/install.ps1 | iex"
# 3. Create and activate virtual environment with dependencies
uv venv
# Activate virtual environment
# Windows:
.venv\Scripts\activate
# macOS/Linux:
source .venv/bin/activate
# 4. Install dependencies ultra-fast with uv
uv pip install -r requirements.txt
# Optional: Install GPU-accelerated packages
uv pip install xgboost lightgbm catboost
git clone https://github.com/KolosalAI/kolosal_automl.git
cd kolosal_automl
python -m venv venv && source venv/bin/activate # create & activate venv
pip install --upgrade pip
pip install -r requirements.txt
Tip: For GPUβaccelerated algorithms (XGBoost, LightGBM, CatBoost) install the respective extras:
uv pip install xgboost lightgbm catboost # or with pip: pip install xgboost lightgbm catboost
The main entry point for kolosal AutoML system:
# Interactive mode (recommended for first-time users)
python main.py
# Launch Gradio web interface directly
python main.py --mode gui
# Start API server directly
python main.py --mode api
# Show version
python main.py --version
# Show system information
python main.py --system-info
# Show help
python main.py --help
--mode {gui,api,interactive} Mode to run (default: interactive)
--version Show version and exit
--system-info Show system information and exit
--no-banner Skip the banner display
--help Show help message and exit
# Interactive mode - choose what to run
python main.py
# Launch web interface in inference-only mode
python main.py --mode gui --inference-only
# Start API server with custom host/port
python main.py --mode api --host 0.0.0.0 --port 8080
# Quick system check
python main.py --system-info --no-banner
Launch the full-featured web interface:
# Using uv (recommended)
uv run python app.py
# Or with standard Python
python app.py
# Launch in inference-only mode
uv run python app.py --inference-only
# Custom host and port
uv run python app.py --host 0.0.0.0 --port 8080
# Create public shareable link
uv run python app.py --share
Available Web Interface Options:
--inference-only
: Run in inference-only mode (no training capabilities)--model-path
: Path to pre-trained model file (for inference-only mode)--config-path
: Path to model configuration file--host
: Host address (default: 0.0.0.0)--port
: Port number (default: 7860)--share
: Create a public Gradio link
Start the REST API server:
# Using uv (recommended)
uv run python start_api.py
# Or using the CLI
python main.py --mode api
# Or directly
uv run python modules/api/app.py
- API Server: http://localhost:8000
- Interactive Docs: http://localhost:8000/docs
- API Health: http://localhost:8000/health
- Batch Processing API:
/api/batch
- High-performance batch operations with adaptive sizing - Async Inference:
/api/inference/predict/async
- Non-blocking predictions with job tracking - Performance Metrics:
/api/inference/metrics
- Real-time performance analytics - Health Monitoring: Complete health checks for all API components
from modules.engine.train_engine import MLTrainingEngine
from modules.engine.inference_engine import InferenceEngine
from modules.engine.batch_processor import BatchProcessor
from modules.configs import MLTrainingEngineConfig, TaskType, OptimizationStrategy, BatchProcessorConfig
from sklearn.model_selection import train_test_split
from sklearn.ensemble import RandomForestClassifier
# Load your data
# X, y = load_your_data()
# X_train, X_test, y_train, y_test = train_test_split(X, y, test_size=0.2, random_state=42)
# Configure the training engine
config = MLTrainingEngineConfig(
task_type=TaskType.CLASSIFICATION,
optimization_strategy=OptimizationStrategy.HYPERX,
cv_folds=5,
test_size=0.2,
)
engine = MLTrainingEngine(config)
best_model, metrics = engine.train_model(
model=RandomForestClassifier(),
model_name="RandomForest",
param_grid={
"n_estimators": [50, 100, 200],
"max_depth": [None, 5, 10],
},
X=X_train,
y=y_train,
)
engine.save_model(best_model)
# π Advanced Batch Processing
batch_config = BatchProcessorConfig(
initial_batch_size=32,
max_batch_size=128,
enable_priority_queue=True,
enable_adaptive_batching=True
)
batch_processor = BatchProcessor(batch_config)
batch_processor.start(lambda batch: best_model.predict(batch))
# Async prediction with priority
future = batch_processor.enqueue_predict(X_test[0:1], priority=BatchPriority.HIGH)
predictions = future.result()
- Upload your CSV, Excel, Parquet, or JSON files
- Or try built-in sample datasets (Iris, Titanic, Boston Housing, etc.)
- View comprehensive data previews with statistics and visualizations
- Explore missing values, data types, and feature distributions
- Select task type (Classification/Regression)
- Choose optimization strategy (Random Search, Grid Search, Bayesian, HyperX)
- Configure cross-validation settings
- Set preprocessing options (normalization, feature selection)
- Enable advanced features (quantization, early stopping)
- Select your target column
- Choose from multiple algorithms (Random Forest, XGBoost, Neural Networks, etc.)
- Monitor training progress in real-time
- View training metrics and feature importance
- Make predictions on new data
- Compare model performance across different algorithms
- Visualize results with confusion matrices and residual plots
- Test with external datasets
- Save trained models with optional encryption
- Load previously saved models
- Export models in multiple formats (Pickle, Joblib, ONNX)
- Secure model deployment with access controls
- Dedicated inference endpoint for production use
- Real-time predictions with minimal latency
- Support for encrypted model files
- RESTful API compatibility
from modules.configs import MLTrainingEngineConfig, BatchProcessorConfig, InferenceEngineConfig
# Training Configuration
training_config = MLTrainingEngineConfig(
task_type=TaskType.CLASSIFICATION,
optimization_strategy=OptimizationStrategy.BAYESIAN,
cv_folds=5,
test_size=0.2,
random_state=42,
enable_quantization=True,
batch_size=64,
n_jobs=-1,
feature_selection=True,
early_stopping=True,
early_stopping_rounds=10,
)
# π Batch Processing Configuration
batch_config = BatchProcessorConfig(
initial_batch_size=16,
max_batch_size=256,
batch_timeout=0.01,
enable_priority_queue=True,
enable_adaptive_batching=True,
enable_monitoring=True,
max_retries=3,
processing_strategy=BatchProcessingStrategy.ADAPTIVE
)
# π Enhanced Inference Configuration
inference_config = InferenceEngineConfig(
enable_batching=True,
max_batch_size=128,
batch_timeout=0.02,
enable_request_deduplication=True,
max_cache_entries=2000,
cache_ttl_seconds=7200,
enable_quantization=True,
max_concurrent_requests=200,
enable_throttling=True
)
The web interface includes several popular datasets for quick experimentation:
- Iris: Classic flower classification dataset
- Titanic: Passenger survival classification
- Boston Housing: House price regression
- Wine Quality: Wine rating prediction
- Diabetes: Medical classification dataset
- Car Evaluation: Multi-class classification
kolosal_automl/
βββ π main.py # π Main CLI entry point
βββ π app.py # Gradio web interface
βββ π§ start_api.py # π API server launcher
βββ π§ͺ test_api.py # π API testing script
βββ π modules/
β βββ π __init__.py
β βββ π configs.py # Configuration management
β βββ π api/ # REST API endpoints
β β βββ π __init__.py
β β βββ π app.py # Main API application
β β βββ π data_preprocessor_api.py
β β βββ π device_optimizer_api.py
β β βββ π inference_engine_api.py
β β βββ π model_manager_api.py
β β βββ π quantizer_api.py
β β βββ π train_engine_api.py
β β βββ π batch_processor_api.py # π Batch processing API
β β βββ π README.md # π API documentation
β βββ π engine/ # Core ML engines
β β βββ π __init__.py
β β βββ π batch_processor.py # π Advanced batch processing
β β βββ π data_preprocessor.py
β β βββ π inference_engine.py
β β βββ π lru_ttl_cache.py
β β βββ π quantizer.py
β β βββ π train_engine.py
β βββ π optimizer/ # Optimization algorithms
β β βββ π __init__.py
β β βββ π configs.py
β β βββ π device_optimizer.py # Device optimization
β β βββ π model_manager.py # Secure model management
β βββ π static/ # Static assets
β βββ π utils/ # Utility functions
βββ π temp_data/ # Temporary data storage
βββ π tests/ # Test suites
β βββ π .gitignore
β βββ π env/ # Test environments
β βββ π functional/ # Functional tests
β βββ π integration/ # Integration tests
β βββ π templates/ # Test templates
β β βββ π .gitattributes
β β βββ π .gitignore
β βββ π unit/ # Unit tests
βββ π .gitignore
βββ π app.py # Alternative app launcher
βββ π compose.yaml # Docker Compose configuration
βββ π Dockerfile # Docker containerization
βββ π CLI_USAGE.md # π CLI usage documentation
βββ π kolosal_api.log # API logging
βββ π LICENSE # MIT License
βββ π pyproject.toml # π Project configuration
βββ π README.md # Project documentation
βββ π requirements.txt # Dependencies
File | Status |
---|---|
tests/functional/test/app_api.py | β FAILED |
tests/functional/test/quantizer_api.py | β FAILED |
tests/functional/test/data_preprocessor_api.py | β FAILED |
tests/functional/test/device_optimizer_api.py | β FAILED |
tests/functional/test/inference_engine_api.py | β FAILED |
tests/functional/test/train_engine_api.py | β FAILED |
tests/functional/test/model_manager_api.py | β FAILED |
File | Status |
---|---|
tests/unit/test/batch_processor.py | β PASSED |
tests/unit/test/data_preprocessor.py | β FAILED |
tests/unit/test/device_optimizer.py | β FAILED |
tests/unit/test/inference_engine.py | β FAILED |
tests/unit/test/lru_ttl_cache.py | β PASSED |
tests/unit/test/model_manager.py | β FAILED |
tests/unit/test/optimizer_asht.py | β FAILED |
tests/unit/test/optimizer_hyperx.py | β PASSED |
tests/unit/test/quantizer.py | β FAILED |
tests/unit/test/train_engine.py | β FAILED |
Run all tests:
pytest -vv
- π Advanced Batch Processing System β High-performance batch processor with adaptive sizing, priority queues, and memory optimization
- β‘ Asynchronous Job Management β Non-blocking task execution with comprehensive job tracking and status monitoring
- π§ Enhanced Inference Engine β Dynamic batching, request deduplication, comprehensive caching, and performance analytics
- π Real-time Performance Monitoring β Detailed metrics collection with insights for optimization
- π§ Memory Optimization Framework β Advanced memory management with garbage collection and usage monitoring
- οΏ½ Robust Error Handling β Enhanced error recovery, retry mechanisms, and detailed error reporting
- Batch Processing API β Complete REST API for batch operations with configurable strategies
- Async Inference Endpoints β Non-blocking prediction requests with job tracking
- Enhanced Health Monitoring β Comprehensive health checks for all system components
- Performance Analytics β Real-time metrics with detailed performance insights
- Memory Management β Advanced memory optimization with automatic garbage collection
- Request Deduplication β Intelligent caching to avoid redundant computations
- Priority-based Processing β Handle high-priority requests with advanced queue management
- Adaptive Batch Sizing β Dynamic batch size adjustment based on system load
- Feature Importance Analysis β Built-in feature importance calculation for model interpretability
- Job Status Tracking β Complete async job lifecycle management with status monitoring
- Enhanced Documentation β Comprehensive API documentation with examples and use cases
- Performance Profiling β Detailed performance metrics and optimization recommendations
- π Gradio Web Interface β Complete redesign from Streamlit to Gradio
- π§ Enhanced UV Integration β Streamlined installation and dependency management
- π― Dedicated Inference Server β Production-ready inference endpoint
- π Advanced Data Visualization β Comprehensive data previews and analysis
- π Secure Model Management β Enhanced model encryption and access control
- Complete Test Suite & CI green β¨
- Enhanced Batch Processing with distributed computing support
- Advanced Async Operations with streaming and WebSocket support
- Docker Containerization for easy deployment
- Model Monitoring & drift detection with real-time alerts
- AutoML Pipeline with automated feature engineering
- Timeβseries & anomalyβdetection modules
- Cloudβnative deployment recipes (AWS, GCP, Azure)
- MLOps Integration with popular platforms
- Distributed Training with multi-node support
Purpose | Library |
---|---|
CLI Interface | argparse / subprocess π |
Web UI | Gradio |
Package Mgmt | UV |
API Server | FastAPI / Uvicorn π |
Batch Processing | Custom BatchProcessor π |
Async Jobs | asyncio / ThreadPoolExecutor π |
Data Ops | Pandas / NumPy |
Core ML | scikitβlearn |
Boosting | XGBoost / LightGBM / CatBoost |
Visuals | Matplotlib / Seaborn |
Serialisation | Joblib / Pickle |
Optimization | Optuna / Hyperopt |
Memory Mgmt | psutil / gc π |
- Menu-driven interface for mode selection
- Perfect for first-time users
- Built-in help and guidance
- Full-featured Gradio UI
- Visual data exploration and training
- Real-time progress monitoring
- Production-ready REST API
- Programmatic access to all features
- Comprehensive health monitoring
- Import modules directly in code
- Maximum flexibility and control
- Advanced customization options
- Batch Processing Integration π
The new Batch Processing system provides enterprise-grade performance for ML workloads:
from modules.engine.batch_processor import BatchProcessor
from modules.configs import BatchProcessorConfig, BatchProcessingStrategy, BatchPriority
# Configure high-performance batch processing
config = BatchProcessorConfig(
initial_batch_size=32,
max_batch_size=256,
enable_priority_queue=True,
enable_adaptive_batching=True,
enable_monitoring=True,
processing_strategy=BatchProcessingStrategy.ADAPTIVE
)
processor = BatchProcessor(config)
# Start processing with your ML model
processor.start(lambda batch: model.predict(batch))
# Submit high-priority requests
future = processor.enqueue_predict(
data,
priority=BatchPriority.HIGH,
timeout=30.0
)
result = future.result() # Get results asynchronously
- Adaptive Batch Sizing: Automatically adjusts batch size based on system load
- Priority Queues: Handle urgent requests with configurable priorities
- Memory Optimization: Intelligent memory management with garbage collection
- Performance Monitoring: Real-time metrics and performance analytics
- Error Recovery: Robust retry mechanisms and fault tolerance
- Async Processing: Non-blocking operations with future-based results
# Configure batch processor
curl -X POST "http://localhost:8000/api/batch/configure" \
-H "Content-Type: application/json" \
-d '{"max_batch_size": 128, "enable_priority_queue": true}'
# Submit batch processing job
curl -X POST "http://localhost:8000/api/batch/process-batch" \
-H "Content-Type: application/json" \
-d '{"items": [{"data": [1,2,3], "priority": "high"}]}'
# Monitor batch processor status
curl "http://localhost:8000/api/batch/status"
- Fork the repository
- Create a feature branch:
git checkout -b feature/amazing-feature
- Make your changes and add tests
- Verify tests pass:
uv run pytest -q
- Commit your changes:
git commit -m 'Add amazing feature'
- Push to the branch:
git push origin feature/amazing-feature
- Open a Pull Request
For comprehensive documentation and tutorials:
- CLI Usage Guide: CLI_USAGE.md π
- API Reference: modules/api/README.md π
- Batch Processing Guide: docs/engine/batch_processor_docs.md π
- Inference Engine Guide: docs/engine/inference_engine_docs.md π
- Device Optimizer Guide: docs/device_optimizer_docs.md
- Configuration Guide: docs/configuration.md
- Deployment Guide: docs/deployment.md
- Contributing Guide: CONTRIBUTING.md
Released under the MIT License. See LICENSE
for details.
Ready to explore advanced machine learning? Try our quickstart:
# Clone and setup
git clone https://github.com/KolosalAI/kolosal_automl.git
cd kolosal_automl
# Quick install with UV
curl -LsSf https://astral.sh/uv/install.sh | sh
uv venv && source .venv/bin/activate
uv pip install -r requirements.txt
# Launch with interactive CLI (NEW!)
python main.py
# Or directly launch the web interface
uv run python app.py
# Open http://localhost:7860 in your browser and start experimenting! π
-
π― Interactive CLI (Recommended)
python main.py # Choose from menu: Web Interface, API Server, or System Info
-
π Direct Web Interface
python main.py --mode gui # or: uv run python app.py
-
π§ API Server
python main.py --mode api # or: uv run python start_api.py
Built with β€οΈ by the kolosal AI Team
π Star us on GitHub | π Documentation | π Report Issues | π CLI Guide