Beispiel #1
0
    def test_input_dag_linear(self):
        #  A
        # / \
        # B  C
        # /
        # D
        couler.dag(
            [
                [lambda: job_a(message="A")],
                [
                    lambda: job_a(message="A"),
                    lambda: job_b(message="B"),
                ],  # A -> B
                [
                    lambda: job_a(message="A"),
                    lambda: job_c(message="C"),
                ],  # A -> C
                [
                    lambda: job_b(message="B"),
                    lambda: job_d(message="D"),
                ],  # B -> D
            ]
        )

        self.check_argo_yaml("dag_golden_1.yaml")
Beispiel #2
0
def diamond():
    couler.dag([
        [lambda: job_a(message="A")],
        [lambda: job_a(message="A"), lambda: job_b(message="B")],  # A -> B
        [lambda: job_a(message="A"), lambda: job_c(message="C")],  # A -> C
        [lambda: job_b(message="B"), lambda: job_d(message="D")],  # B -> D
        [lambda: job_c(message="C"), lambda: job_d(message="D")],  # C -> D
    ])
Beispiel #3
0
def diamond():
    couler.dag([
        [lambda: job(name="A")],
        [lambda: job(name="A"), lambda: job(name="B")],  # A -> B
        [lambda: job(name="A"), lambda: job(name="C")],  # A -> C
        [lambda: job(name="B"), lambda: job(name="D")],  # B -> D
        [lambda: job(name="C"), lambda: job(name="D")],  # C -> D
    ])