Thread
#flytekit
    Greg Gydush

    Greg Gydush

    5 months ago
    Happy Monday y’all! Was curious if the
    >>
    could be supported locally - I tried running a local execution this morning with that syntax and got a
    TypeError
    - I can file a bug report on GitHub if helpful!
    from flytekit import task, workflow
    
    
    @task
    def task_a(x: int) -> int:
        return x
    
    
    @task
    def task_b(x: int) -> int:
        return x
    
    
    @workflow
    def test(x: int) -> int:
        a = task_a(x=x)
        b = task_b(x=x)
        a >> b
        return a
    
    
    if __name__ == "__main__":
        test(x=1)
    When trying to run I get:
    TypeError: unsupported operand type(s) for >>: 'Promise' and 'Promise'
    Kevin Su

    Kevin Su

    5 months ago
    Yeah, you can do that in the task instead of workflow. For example,
    @task
    def task_c(x: int, y: int) -> int:
        return x >> y
    
    
    @workflow
    def test(x: int) -> int:
        a = task_a(x=x)
        b = task_b(x=x)
        return task_c(x=a, y=b)
    Greg Gydush

    Greg Gydush

    5 months ago
    Jay Ganbat

    Jay Ganbat

    5 months ago
    create_node
    works within the workflow locally, though not very elegant compared to
    >>
    Ketan (kumare3)

    Ketan (kumare3)

    5 months ago
    yes this should work locally
    this is a bug
    cc @Yee / @Eduardo Apolinario (eapolinario)
    can you please file it @Greg Gydush
    Greg Gydush

    Greg Gydush

    5 months ago