nice-napkin-73411
10/24/2023, 12:11 AMimport time
@batch(cpu=8, memory=125000, use_tmpfs=True)
@step
def first_step(self):
start_time = time.time()
# df = blah##
# self.df = df
print("time for this step: {} seconds".format(time.time() - start_time))
#### takes 5 minutes between this print statement and to finally say "task is completed"
self.next(self.second_step)
@batch(cpu=8, memory=125000, use_tmpfs=True)
@step
def second_step(self):
start_time = time.time()
retrieved_df = self.df # this takes 10 minutes!!!
print("time for retrieving artifacts: {} seconds".format(time.time() - start_time))
self.next(self.second_step)victorious-lawyer-58417
10/24/2023, 1:28 AMself.df = df commented out in first_step above. Do you know how long it takes without the dataframe?
It'd be good to understand how much is baseline latency of launching the instances vs. processing the dataframenice-napkin-73411
10/24/2023, 1:56 AMvictorious-lawyer-58417
10/24/2023, 1:59 AMfirst_step
self.df = to_parquetbytes(df)
and then second_step
df = to_dataframe(self.df)nice-napkin-73411
10/24/2023, 1:59 AMvictorious-lawyer-58417
10/24/2023, 2:00 AM@resources(memory=) to make it worknice-napkin-73411
10/24/2023, 2:05 AMvictorious-lawyer-58417
10/24/2023, 2:06 AM@batch decoratornice-napkin-73411
10/24/2023, 2:06 AMambitious-bird-15073
10/24/2023, 2:31 AMnice-napkin-73411
10/24/2023, 5:26 AM