和顺 / 衡律 返回所属 Agent
7.6

模型准入、漂移监测与版本替换

原能力

管理方法准入、漂移、暂停、替换和回滚,不因技术调用成功自动准入。(合同附件 R7 7.6)

首选项目

MLflow(Apache-2.0(开源仓库))。 MLflow

匹配范围

模型版本及漂移检测记录候选。

源码

MLflow · def set_registered_model_alias(

mlflow/tracking/client.py · 5602–5615 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
    def set_registered_model_alias(self, name: str, alias: str, version: str) -> None:
        """
        Set a registered model alias pointing to a model version.

        Args:
            name: Registered model name.
            alias: Name of the alias. Note that aliases of the format ``v<number>``, such as
                ``v9`` and ``v42``, are reserved and cannot be set.
            version: Registered model version number.

        .. code-block:: Python
            :caption: Example

            import mlflow

River · class ADWIN

river/drift/adwin.py · 7–20 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class ADWIN(DriftDetector):
    r"""Adaptive Windowing method for concept drift detection[^1].

    ADWIN (ADaptive WINdowing) is a popular drift detection method with mathematical guarantees.
    ADWIN efficiently keeps a variable-length window of recent items; such that it holds that
    there has no been change in the data distribution. This window is further divided into two
    sub-windows $(W_0, W_1)$ used to determine if a change has happened. ADWIN compares the average of
    $W_0$ and $W_1$ to confirm that they correspond to the same distribution. Concept drift is detected
    if the distribution equality no longer holds. Upon detecting a drift, $W_0$ is replaced by $W_1$ and a
    new $W_1$ is initialized. ADWIN uses a significance value $\delta=\in(0,1)$ to determine
    if the two sub-windows correspond to the same distribution.

    Parameters
    ----------

实现与验收要点

独立验证、准入、暂停、替换回滚和生效范围。