Machine learning enabled systems (MLS) often operate in settings where they regularly encounter uncertainties arising from changes in their surrounding environment. Without structured oversight, such changes can degrade model behavior, increase operational cost, and reduce the usefulness of deployed systems. Although Machine Learning Operations (MLOps) streamlines the lifecycle of ML models, it provides limited support for addressing runtime uncertainties that influence the longer term sustainability of MLS. To support continued viability, these systems need a mechanism that detects when execution drifts outside acceptable bounds and adjusts system behavior in response. Despite the growing interest in sustainable and self-adaptive MLS, there has been limited work towards exemplars that allow researchers to study these challenges in MLOps pipelines. This paper presents Harmonica, a self-adaptation exemplar built on the HarmonE approach, designed to enable the sustainable operation of such pipelines. Harmonica introduces structured adaptive control through MAPE-K loop, separating high-level adaptation policy from low-level tactic execution. It continuously monitors sustainability metrics, evaluates them against dynamic adaptation boundaries, and automatically triggers architectural tactics when thresholds are violated. We demonstrate the tool through case studies in time series regression and computer vision, examining its ability to improve system stability and reduce manual intervention. The results show that Harmonica offers a practical and reusable foundation for enabling adaptive behavior in MLS that rely on MLOps pipelines for sustained operation.
翻译:机器学习赋能系统(MLS)通常运行在持续面临环境变化所引发不确定性的场景中。若无结构化监管,此类变化可能导致模型性能退化、运营成本上升,并降低已部署系统的实用性。尽管机器学习运维(MLOps)能简化ML模型的生命周期管理,但其对解决影响MLS长期可持续性的运行时不确定性的支持有限。为维持系统持续可用性,需要一种能检测执行过程是否偏离可接受范围并相应调整系统行为的机制。尽管对可持续且自适应的MLS研究兴趣日益增长,但可供研究者在MLOps流程中系统性探究这些挑战的范例仍较为缺乏。本文提出Harmonica——一个基于HarmonE方法构建的自适应范例,旨在实现此类流程的可持续运行。Harmonica通过MAPE-K循环引入结构化自适应控制,将高层适应策略与低层战术执行相分离。该工具持续监测可持续性指标,依据动态适应边界进行评估,并在指标超出阈值时自动触发架构战术。我们通过时间序列回归和计算机视觉的案例研究展示该工具,检验其提升系统稳定性与减少人工干预的能力。结果表明,Harmonica为依赖MLOps流程持续运行的MLS提供了实用且可复用的自适应行为实现基础。