label-studio-ml-backend icon indicating copy to clipboard operation
label-studio-ml-backend copied to clipboard

How do I load model after the training is complete ?

Open arunhari82 opened this issue 2 years ago • 1 comments

fit method is being invoked every time a call is made and job results were successful but when the next prediction happens self.train_output is always blank. Any pointers on how to get self.train_output

arunhari82 avatar May 26 '23 21:05 arunhari82

Hi @arunhari82! The fit() method is designed to be called every time a training event is triggered. The self.train_output should be populated with the results of the training after the fit() method is called. If it's not, it might be due to the training not being successful or not being saved correctly.

You can try to debug this by adding some logging in your fit() method to check if the training is successful and if the results are being saved correctly. If the training is successful and the results are saved, but self.train_output is still empty in the next prediction, it might be due to the model not being loaded correctly.

You can also check if the model file specified in self.train_output['model_file'] exists and is accessible. If the file doesn't exist or can't be accessed, it might be the reason why self.train_output is empty in the next prediction.

If those suggestions don't quite fit what you're looking for, let me know a little more about your setup and I'd be happy to dive in further!

TylerConlee avatar Jul 20 '23 21:07 TylerConlee