Skip to content

[WIP] Attempt to pickle model#81

Open
shuttle1987 wants to merge 2 commits into
masterfrom
serialize-models
Open

[WIP] Attempt to pickle model#81
shuttle1987 wants to merge 2 commits into
masterfrom
serialize-models

Conversation

@shuttle1987
Copy link
Copy Markdown
Member

Closes the issue about model serialization #76

@shuttle1987
Copy link
Copy Markdown
Member Author

shuttle1987 commented Aug 11, 2018

Currently pickling fails with this error:

  File "/home/janis/persephone-web-API/pipfileenv/lib/python3.5/site-packages/connexion/decorators/decorator.py", line 44, in wrapper
    response = function(request)
  File "/home/janis/persephone-web-API/pipfileenv/lib/python3.5/site-packages/connexion/decorators/parameter.py", line 207, in wrapper
    return function(**kwargs)
  File "/home/janis/persephone-web-API/persephone_api/api_endpoints/model.py", line 98, in post
    models_storage_path=Path(flask.current_app.config['MODELS_PATH'])
  File "/home/janis/persephone-web-API/persephone_api/api_endpoints/model.py", line 46, in create_RNN_CTC_model
    pickle.dump(model, pickle_file, protocol=4)
TypeError: cannot serialize '_io.TextIOWrapper' object

@shuttle1987
Copy link
Copy Markdown
Member Author

This PR may not end up being necessary when persephone-tools/persephone#197 is merged in the upstream Persephone library.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant