和顺 / 衡律 返回所属 Agent
4.3

证据来源关系与独立性

原能力

识别共同上游、转述和依赖关系,避免把重复报道当作独立证据。(合同附件 R7 4.3)

首选项目

OpenLineage(Apache-2.0)。 OpenLineage

匹配范围

Run/Dataset 血缘与图路径追踪同源。

源码

OpenLineage · class RunEvent

client/python/src/openlineage/client/run.py · 102–115 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
class RunEvent(RedactMixin):
    eventType: RunState = attr.ib(validator=attr.validators.in_(list(RunState)))  # noqa:  N815
    eventTime: str = attr.ib()  # noqa:  N815
    run: Run = attr.ib()
    job: Job = attr.ib()
    producer: str = attr.ib()
    inputs: list[Dataset] | None = attr.ib(factory=list)
    outputs: list[Dataset] | None = attr.ib(factory=list)
    schemaURL: str = attr.ib(default=SCHEMA_URL)  # noqa: N815

    _skip_redact: ClassVar[list[str]] = ["eventType", "eventTime", "producer", "schemaURL"]

    @eventTime.validator
    def check(self, attribute: str, value: str) -> None:  # noqa: ARG002
  • # Copyright 2018-2026 contributors to the OpenLineage project
  • # SPDX-License-Identifier: Apache-2.0

NetworkX · def shortest_path(

networkx/algorithms/shortest_paths/generic.py · 43–56 行。 在 GitHub 查看源码 · 许可证与声明

源码片段
def shortest_path(G, source=None, target=None, weight=None, method="dijkstra"):
    """Compute shortest paths in the graph.

    Parameters
    ----------
    G : NetworkX graph

    source : node, optional
        Starting node for path. If not specified, compute shortest
        paths for each possible starting node.

    target : node, optional
        Ending node for path. If not specified, compute shortest
        paths to all possible nodes.

实现与验收要点

共同上游识别、独立性裁决和保留原材料。