Hello,
I am trying to create a classifier which will classify popular Indian cars. I have trained it using resnet 50 and saved the model in google drive. When i am trying it to deploy to google app engine, I am not able to do so. It is failing with the below error.
You are using pip version 19.0.1, however version 19.0.2 is available.
You should consider upgrading via the ‘pip install --upgrade pip’ command.
Removing intermediate container 2496b626f1cc
—> a761bd747ac3
Step 6/9 : COPY app app/
—> 6cdefe0e5b2c
Step 7/9 : RUN python app/server.py
—> Running in 8538549d96a9
Traceback (most recent call last):
File “app/server.py”, line 40, in
learn = loop.run_until_complete(asyncio.gather(*tasks))[0]
File “/usr/local/lib/python3.6/asyncio/base_events.py”, line 484, in run_until_complete
return future.result()
File “app/server.py”, line 35, in setup_learner
learn.load(model_file_name)
File “/usr/local/lib/python3.6/site-packages/fastai/basic_train.py”, line 238, in load
state = torch.load(self.path/self.model_dir/f’{name}.pth’, map_location=device)
File “/usr/local/lib/python3.6/site-packages/torch/serialization.py”, line 368, in load
return _load(f, map_location, pickle_module)
File “/usr/local/lib/python3.6/site-packages/torch/serialization.py”, line 532, in _load
magic_number = pickle_module.load(f)
_pickle.UnpicklingError: invalid load key, ‘<’.
The command ‘/bin/sh -c python app/server.py’ returned a non-zero code: 1
ERROR
ERROR: build step 0 “gcr.io/cloud-builders/docker” failed: exit status 1
server.py is located at github
Any help would be appreciated.