itay livni
10/10/2019, 8:50 PMpass on a if else branch?Jeremiah
pass happens? You can absolutely make a task that does nothing but pass, in which case it will return a Success state to any downstream tasks containing no result.itay livni
10/11/2019, 12:05 AMJeremiah
x_lst.value_count().max()). In Prefect, task results are not known until the flow is run, and consequently all operations — including things like some_str is "short" — must happen inside the run() method of a Task object.Jeremiah
ifelse, you’re saying “if the first task evaluates True, run the second task; otherwise run the third task”:
ifelse(conditional_task, true_task, false_task)Jeremiah
Jeremiah
another_task_on_true_branch.set_upstream(true_task)
another_task_on_false_branch.set_upstream(false_task)Jeremiah
itay livni
10/11/2019, 3:32 AMtermsense_stat_response["min_num_term_senses"]>1 has to be a task? Here is an implementation of what I am trying to do in an aws state machineitay livni
10/11/2019, 3:33 AMitay livni
10/11/2019, 3:35 AMJeremiah
Task. In this case, you could use an ifelse to run task1 if the condition is true, or task2 if the condition is false. You could also call task2.set_upstream(task1). This way task 2 will always run, but task 1 will only run if the condition is met.