Closed Thilakraj1998 closed 3 years ago
Hi, can you assign this to me, please?
I'm hoping a simple pickle.dumps('my_model.pkl')
does the job. The final addition would look something like this:
def save(self, path_pref='./'):
final_path = os.path.join(path_pref, 'my_model.pkl')
pickle.dump(self.model, open(final_path, 'wb'))
# print(final_path)
return final_path
Is this fine?
Can I work on this issue?
Hi, I have updated my fork of this repo as per the changes made to the issue. I have done it using pickle and h5 files and also included type checking for Keras models in the case of .h5 files.
Also, a doubt, I don't see TensorFlow or Keras in the requirements.txt
so how do we load the .h5 file? Should I add TensorFlow to the requirements.txt
file?
Add functionality to save and load a trained model by using pickle or Keras function for appropriate model type, i.e. either Sci-kit learn model or Tensorflow model .
file to refer : https://github.com/blobcity/autoai/blob/main/blobcity/store/Model.py
Add function
save
andload
in theModel.py
file Required functionality forsave
function:takes single string argument, which is path to save model, along with filename for example:
pickle or Keras
to save model.Required functionality for
load
function:takes single string argument, which is path of saved model file:
pickle or Keras
load functionsmodel
.