wooden-dusk-90720
02/25/2023, 4:20 AMclass LinearFlow(FlowSpec):
@step
def start(self):
self.next(self.a)
@step
def a(self):
self.my_gigantic_var = 'xxx'
self.next(self.b)
@step
def b(self):
do_stuff(self.my_gigantic_var)
self.next(self.end)
@step
def end(self):
pass
Assuming step b does not modify my_gigantic_var, will my_gigantic_var be serialized as an artifact again when step b ends? As additional context, I noticed that my flow is getting OOM errors after do_stuff has completed, which I'm guessing is due to serializing the artifactsstraight-shampoo-11124
02/25/2023, 4:26 AMmy_gigantic_var in b to see if it has changed. It has some overhead so you need to adjust @resources accordingly when dealing with gigantic artifactswooden-dusk-90720
02/25/2023, 4:27 AM@resources again even if i specified it via @batch?straight-shampoo-11124
02/25/2023, 4:28 AMmemory is high enoughwooden-dusk-90720
02/25/2023, 4:29 AMmy_gigantic_var before calling end() thenwooden-dusk-90720
02/25/2023, 4:30 AMend()? i never have anything in therestraight-shampoo-11124
02/25/2023, 4:37 AMwooden-dusk-90720
02/25/2023, 4:38 AMArtifacts are loaded lazily so if you don’t use it, it doesn’t make a differencewell i'm using it in step
b but not end. Are you saying it's not going to be serialized between ``b`` and ``end`?`straight-shampoo-11124
02/25/2023, 4:38 AMend or not. It’s useful that all flows have an unambiguous beginning and end, which is why those two steps existstraight-shampoo-11124
02/25/2023, 4:40 AMwooden-dusk-90720
02/25/2023, 4:43 AMself.next(self.end) that will avoid the check (and thus re-serialization) to see if it has changed right?victorious-lawyer-58417
02/25/2023, 4:51 AMb so it’s unavoidable if you use the artifact in bwooden-dusk-90720
02/25/2023, 4:53 AM@step
def b(self):
do_stuff(self.my_gigantic_var)
delattr(self, "my_gigantic_var")
self.next(self.end)
how come this doesn't avoid the check? it shouldn't know to check my_gigantic_var since it's gone from selfvictorious-lawyer-58417
02/25/2023, 4:54 AMvictorious-lawyer-58417
02/25/2023, 4:55 AM