Philip MacMenamin
07/29/2021, 6:02 PMwith Flow() as f:
big_obj = gen_obj1()
big_obj2 = gen_obj2(big_obj) #never need to use big_obj again, want to reclaim memory
big_obj3 = gen_obj3(big_obj2) # finished with big_obj2
...etc
what's the canonical way of freeing up these objects within the flow, once they've been consumed and are no longer needed?Kevin Kho
Philip MacMenamin
07/29/2021, 6:06 PMKevin Kho
@task
def abc():
result = SomeResult()
df = ...
result.write(df, location = "xxx")
return result.location
You also don’t need the result interface to do this. The downstream task would then:
@task
def bcd(location):
result = SomeResult()
df = result.read(location = "xxx")
return
Philip MacMenamin
07/29/2021, 6:10 PM