Krzysztof Nawara

    Krzysztof Nawara

    1 year ago
    Hello! If prefect pipeline fails partially (when using Pipeline.run()) is it possible to retrieve _State_s and results for the tasks that executed successfully?
    Jim Crist-Harif

    Jim Crist-Harif

    1 year ago
    Yes. If a task (or tasks) fail in
    flow.run()
    , the
    flow.run()
    call will still return the flow state with a
    .result
    map of all task states (successful or failed).
    Chris White

    Chris White

    1 year ago
    Hi @Krzysztof Nawara! Yes, when running interactively you can retrieve all task states as follows:
    flow_state = flow.run()
    
    flow_state.result # a dictionary of Task -> State
    
    success_states = {t: state for t, state in flow_state.result.items() if state.is_successful()}
    Krzysztof Nawara

    Krzysztof Nawara

    1 year ago
    Thanks, I'm gonna try it out!