chelseatroy
01/10/2022, 6:24 PMKevin Kho
chelseatroy
01/10/2022, 6:29 PMfrom prefect.core.edge import Edge
from src.flows.prereview_engagement_feature_store_flow import *
print(flow.tasks)
assert get_last_executed_value in flow.tasks
assert update_last_executed_value in flow.tasks
assert extract_from_snowflake in flow.tasks
assert dataframe_to_feature_group in flow.tasks
assert len(flow.tasks) == 4
...
However it fails at the very first assertion. I have printed flow.tasks and I see as follows.
{<Task: get_last_executed_value>, <Task: extract_from_snowflake>, <Task: update_last_executed_value>, <Task: dataframe_to_feature_group>}
<Task: get_last_executed_value>
Kevin Kho
from prefect import Flow, task
@task
def abc(x):
return x+1
@task
def bcd(x):
return x
with Flow("..") as flow:
a = abc(1)
b = bcd(a)
from testing import *
assert a in flow
chelseatroy
01/10/2022, 6:34 PMtesting
come from? Because when I do that line it is telling me that's not a thing 😞Kevin Kho
testing.py
is the name of the file of my first file. So I am importing the Flow object and tasks from itchelseatroy
01/10/2022, 6:36 PMfrom src.flows.prereview_engagement_feature_store_flow import *
Kevin Kho
a
, the copy of the task, not abc()
, the task definitionchelseatroy
01/10/2022, 6:37 PMKevin Kho