-
Notifications
You must be signed in to change notification settings - Fork 43
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Save and Load a Trained Model #20
Comments
Hi, can you assign this to me, please? I'm hoping a simple 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 |
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
fileRequired functionality for
save
function:takes single string argument, which is path to save model, along with filename for example:
If path not specified in argument, utilize default path and default name to save in working directory. And print/log of absolute path for the file.
identify type of model saving strategy to use, i.e. whether use
pickle or Keras
to save model.Required functionality for
load
function:takes single string argument, which is path of saved model file:
on the basis of file extension use appropriate loading strategy either
pickle or Keras
load functionsreturn the
model
.The text was updated successfully, but these errors were encountered: