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提供了实用且可复用的自适应行为实现基础。