Case Study
A Deep Dive into XFactr.ai's Production-Grade MLOps Platform: Features, Benefits, and Impact on Energy Savings
In the world of energy management, proving your efficiency upgrades to work isn’t just nice it’s mandatory. Enter our latest project: a fully productionized energybaseline prediction and MLOps platform built for enterprise-scale Measurement & Verification (M&V). This isn’t a one-off model; it’s a repeatable, auditable system that crunches pre-ECM (Energy Conservation Measure) data across diverse buildings, delivering defensible predictions every time.
We tackled this using Snowflake-native pipelines, stateless features, time-smart ML training, and ONNX for seamless Python-to-.NET deployment. The result? High-
stakes energy analytics that scale without breaking a sweat.
The Real-World Headaches We Solved
Our challenges included:
- High-variance building types with unpredictable energy patterns.
- Stateless inference demands (no peeking at history at runtime).
- Zero governance manual Jupyter notebooks.
- Messy time-series data gaps, irregularities; you name it.
- Cross-language deployment without lock-in.
A Modular Architecture That Just Works
- Deterministic data ingestion and validation.
- Enforced feature contracts for training and inference.
- Time-aware training on isolated pre-ECM windows.
- Centralized model registry with versioning.
- Multi-algorithm benchmarking (CatBoost, LightGBM, XGBoost).
- A single ONNX “master model” for all inferences.
- Event-driven CI/CD via Snowflake Tasks and GitHub Actions.
No more siloed experiments—this is true for MLOps.
Problem Statement
Accurate energy baseline modeling is foundational for quantifying ECM savings. However, conventional approaches fail to meet enterprise requirements due to data variability, model fragility, and deployment complexity.
Key Technical Challenges
- High variance in load profiles across building typologies.
- Requirement for stateless inference (no historical context at runtime)
- Limited traceability between models, features, and training data
- Manual, notebook-driven retraining pipelines lacking governance
- Need for language-agnostic model deployment
Solution Architecture Overview
Platform Capabilities
- Deterministic data ingestion and validation
- Feature contracts enforced at training and inference time
- Time-aware model training using pre-ECM data isolation
- Multi-algorithm model benchmarking
- Centralized model registry and versioning
- Unified ONNX master model for inference
- Event-driven orchestration and CI/CD automation
Data Engineering & Validation Layer
- Timestamp column auto-detection
- Expected cadence enforcement (hourly resolution)
- Gap detection and missing interval analysis
- Per-column and per-period completeness profiling
- Pre-ECM time window isolation
Feature Engineering Strategy
Design Constraints
- Stateless – No rolling windows, lag features, or historical aggregates
- Deterministic – Identical transformations during training and inference
- Portable – Computable in Python and .NET without dependency drift
Feature Taxonomy
- Ambient air temperature
- Relative humidity
Temporal Encodings:
- Hour of day
- Day of week
- Cyclical day-of-year (sine/cosine encoding)
- Work-hours indicator
- Weekend flag
- Temperature × work-hours interaction
- Encoded seasonal index
Feature Taxonomy
Training Methodology
- Models trained exclusively on pre-ECM data
- Temporal train/test split (no random shuffling)
-
Multiple gradient-boosting algorithms evaluated per building:
- CatBoost
- LightGBM
- XGBoost
-
Primary Metric: Mean Absolute Percentage Error (MAPE)
- Directly interpretable for energy deviation analysis
- Robust across varying load magnitudes
- Secondary Metric: R² (diagnostic only)
Outputs
For each building:
- Best-performing model artifact
- Feature schema and scaler
- Feature Training metadata (date ranges, metrics)schema and scaler
Model Governance & Registry
- Version-controlled model lifecycle management
- Explicit linkage between data, features, metrics, and artifacts
- Governance-ready auditability for compliance and reporting
Master Model & ONNX Deployment
- building_index used as a routing key
- Named feature inputs enforcing strict feature contracts
- Unified inference interface for all buildings
- building_index
- meteorological features
- temporal encodings
- operational indicators
- Baseline energy prediction
- Building index echo
- One deployable artifact
- Zero runtime dependency on Python
- Consistent inference across environments
Orchestration & MLOps Automation
- ata ingestion
- Feature engineering
- Model training
- Master model packaging
- GitHub Actions trigger pipeline updates
- Automated validation and deployment
- Safe rollback through version control
Client-Side Inference (.NET)
- ONNX Runtime (CPU)
- Compatible with .NET Core
- Windows, Linux, macOS support
- Named-parameter inference API
- Client computes features locally
- Features passed to ONNX runtime
- Stateless baseline prediction returned
Business & Technical Outcomes
- High-fidelity baseline predictions
- Automated, defensible ECM savings calculations
- Linear scalability across large portfolios
- Reduced model ops and deployment overhead
- Regulatory- and audit-ready ML system
Extensibility & Future Enhancements
Identified Accuracy Levers
- Occupancy signals
- Building geometry metadata
- Equipment and asset profiles
- Solar orientation and exposure
These can be integrated via the existing feature engineering pipeline.
Energy baselines are the foundation of proving savings from efficiency upgrades—but traditional methods crumble under enterprise scale. XFactr.ai delivers a battle-tested MLOps platform that automates accurate, auditable predictions across diverse buildings using Snowflake-native pipelines and ONNX deployment. Visit xfactr.ai to transform M&V workflows.
The Pain: Fragile Models, Manual Chaos
XFactr.ai's Core Solution
- Automated ingestion + validation (gaps, cadence, pre-ECM isolation)
- Stateless features: Weather, temporal encodings, physics interactions
- Multi-algorithm benchmarking (CatBoost, LightGBM, XGBoost)
- Single ONNX “master model” routed by building_index
- MAPE-driven model selection
- Full ML Registry lineage
- Event-driven CI/CD via Tasks + GitHub Actions
Real Deployment: .NET Ready
- Defensible savings calculations for audits
- Linear scalability across buildings
- 70% ops reduction via automation
- Future-proof: Add occupancy, geometry via same pipeline