To easily use these models in a robust non-version-dependent way, an option to save/load model to/from json (either string or file) would be helpful.
E.g.
# save to json (can be stored anywhere, not just in file)
model_json = model.save_to_json()
# save to json file
with open(...) as f:
model.save_to_json_file(f) # create folder and parent folders if not exist
# load from json
model = Model.load_from_json(json)
# load from json file
with open(...) as f:
Model.load_from_json_file(f)
To easily use these models in a robust non-version-dependent way, an option to save/load model to/from json (either string or file) would be helpful.
E.g.