Hey,
I use a very vanilla ML pipeline. I use the train function made available and its working well. My training function is iterative and thus can be interrupted at any point in time: How can I monitor time used to make sure that I don't overrun the 10min time limit?
Here is the Train call:
self.Train(self.DateRules.Every(DayOfWeek.Sunday), self.TimeRules.At(8 , 0), self.train)
The train function:
def train(self):
keep_training = 1
while keep_training:
#Train function call
#...
#check time spent ??? How???
#Update keep_training
I tried with a straightforward datetime delta but it doesn't seem to work:
def train(self):
start_time = datetime.now()
keep_training = 1
while keep_training:
#Train function call
#...
#time delta
train_time = datetime.now() - start_time
#Update keep_training
if train_time >= datetime.delta(minutes=9):
keep_training = 0
Thank you for any pointers or suggestions!