Skip to content
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

Lab9: Can't run python api_server/app.py #43

Open
astrogopher opened this issue Dec 3, 2021 · 0 comments
Open

Lab9: Can't run python api_server/app.py #43

astrogopher opened this issue Dec 3, 2021 · 0 comments

Comments

@astrogopher
Copy link

astrogopher commented Dec 3, 2021

I've been following along with the course, and on lab 9 section "Serving predictions from a web server" when I go to call

python api_server/app.py

I get the following error:

`(fsdl-text-recognizer-2021) astrogopher@astrogopher lab9 % python api_server/app.py
Traceback (most recent call last):
File "api_server/app.py", line 14, in
model = ParagraphTextRecognizer()

File "/Users/astrogopher/fsdl-text-recognizer-2021-labs/lab9/text_recognizer/paragraph_text_recognizer.py", line 35, in init
checkpoint_path=CONFIG_AND_WEIGHTS_DIRNAME / "model.pt", args=args, model=model

File "/Users/astrogopher/opt/miniconda3/envs/fsdl-text-recognizer-2021/lib/python3.6/site-packages/pytorch_lightning/core/saving.py", line 135, in load_from_checkpoint
checkpoint = pl_load(checkpoint_path, map_location=lambda storage, loc: storage)

File "/Users/astrogopher/opt/miniconda3/envs/fsdl-text-recognizer-2021/lib/python3.6/site-packages/pytorch_lightning/utilities/cloud_io.py", line 32, in load
return torch.load(f, map_location=map_location)

File "/Users/astrogopher/opt/miniconda3/envs/fsdl-text-recognizer-2021/lib/python3.6/site-packages/torch/serialization.py", line 595, in load
return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)

File "/Users/astrogopher/opt/miniconda3/envs/fsdl-text-recognizer-2021/lib/python3.6/site-packages/torch/serialization.py", line 764, in _legacy_load
magic_number = pickle_module.load(f, **pickle_load_args)
_pickle.UnpicklingError: invalid load key, 'v'.
`

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

No branches or pull requests

1 participant