Deployment Platform: Render ✅

Thanks. Will try it

Hello Anurag,

This is a great guide you have prepared. This was my first web deployment and deep learning model as I am new to this but enjoying it a lot.
Here is a link to my web app for classifying sports image: https://sports-image-classifier.onrender.com/

so I am getting this error
ERROR: Exception in ASGI application
and
AttributeError: ‘Conv2d’ object has no attribute ‘padding_mode’
my pip list is this

-pencv-contrib-python 4.2.0.34
absl-py 0.9.0
alabaster 0.7.12
anaconda-client 1.7.2
anaconda-project 0.8.3
argh 0.26.2
asn1crypto 1.3.0
astor 0.8.0
astroid 2.4.0
astropy 4.0.1.post1
atomicwrites 1.4.0
attrs 19.3.0
autopep8 1.4.4
Babel 2.8.0
backcall 0.1.0
backports.shutil-get-terminal-size 1.0.0
bcrypt 3.1.7
beautifulsoup4 4.9.0
bitarray 1.2.1
bkcharts 0.2
bleach 3.1.4
blis 0.2.4
bokeh 2.0.2
boto 2.49.0
Bottleneck 1.3.2
certifi 2020.4.5.1
cffi 1.14.0
chardet 3.0.4
click 7.1.2
cloudpickle 1.4.1
clyent 1.2.2
colorama 0.4.3
comtypes 1.1.7
contextlib2 0.6.0.post1
contextvars 2.4
cryptography 2.9.2
cycler 0.10.0
cymem 2.0.2
Cython 0.29.17
cytoolz 0.10.1
dask 2.16.0
dataclasses 0.7
decorator 4.4.2
defusedxml 0.6.0
diff-match-patch 20181111
distributed 2.16.0
docutils 0.16
entrypoints 0.3
et-xmlfile 1.0.1
fastai 1.0.59
fastcache 1.1.0
fastprogress 0.1.22
filelock 3.0.12
flake8 3.7.9
Flask 1.1.2
fsspec 0.7.1
future 0.18.2
gast 0.3.3
gevent 1.4.0
glob2 0.7
greenlet 0.4.15
grpcio 1.27.2
h5py 2.10.0
HeapDict 1.0.1
html5lib 1.0.1
hypothesis 5.11.0
idna 2.9
imageio 2.8.0
imagesize 1.2.0
immutables 0.11
importlib-metadata 1.5.0
intervaltree 3.0.2
ipykernel 5.1.4
ipython 7.13.0
ipython-genutils 0.2.0
ipywidgets 7.5.1
isort 4.3.21
itsdangerous 1.1.0
jdcal 1.4.1
jedi 0.15.2
Jinja2 2.11.2
joblib 0.14.1
json5 0.9.4
jsonschema 3.2.0
jupyter 1.0.0
jupyter-client 6.1.3
jupyter-console 6.1.0
jupyter-core 4.6.3
jupyterlab 1.2.6
jupyterlab-server 1.1.1
Keras-Applications 1.0.8
Keras-Preprocessing 1.1.0
keyring 21.1.1
kiwisolver 1.2.0
lazy-object-proxy 1.4.3
libarchive-c 2.9
llvmlite 0.32.1
locket 0.2.0
lxml 4.5.0
Markdown 3.1.1
MarkupSafe 1.1.1
matplotlib 3.1.3
mccabe 0.6.1
menuinst 1.4.16
mistune 0.8.4
mkl-fft 1.0.15
mkl-random 1.1.0
mkl-service 2.3.0
mock 4.0.2
more-itertools 8.2.0
mpmath 1.1.0
msgpack 1.0.0
multipledispatch 0.6.0
murmurhash 1.0.2
nbconvert 5.6.1
nbformat 5.0.6
networkx 2.4
nltk 3.4.5
nose 1.3.7
notebook 6.0.3
numba 0.49.1
numexpr 2.7.1
numpy 1.18.1
numpydoc 0.9.2
olefile 0.46
opencv-contrib-python 4.2.0.34
opencv-python 4.2.0.34
openpyxl 3.0.3
packaging 20.3
pandas 1.0.3
pandocfilters 1.4.2
paramiko 2.7.1
parso 0.5.2
partd 1.1.0
path 13.1.0
pathlib2 2.3.5
pathtools 0.1.2
patsy 0.5.1
pep8 1.7.1
pexpect 4.8.0
pickleshare 0.7.5
Pillow 7.1.2
pip 20.0.2
pkginfo 1.5.0.1
plac 0.9.6
pluggy 0.13.1
ply 3.11
preshed 2.0.1
prometheus-client 0.7.1
prompt-toolkit 3.0.4
protobuf 3.11.4
psutil 5.7.0
py 1.8.1
pycodestyle 2.5.0
pycosat 0.6.3
pycparser 2.20
pycrypto 2.6.1
pycurl 7.43.0.5
pydocstyle 4.0.1
pyflakes 2.1.1
Pygments 2.6.1
pylint 2.5.0
PyNaCl 1.3.0
pyodbc 4.0.0-unsupported
pyOpenSSL 19.1.0
pyparsing 2.4.7
pyreadline 2.1
pyrsistent 0.16.0
PySocks 1.7.1
pytest 5.4.2
pytest-arraydiff 0.3
pytest-astropy 0.8.0
pytest-astropy-header 0.1.2
pytest-doctestplus 0.5.0
pytest-openfiles 0.5.0
pytest-remotedata 0.3.2
python-dateutil 2.8.1
python-jsonrpc-server 0.3.4
python-language-server 0.31.10
pytz 2020.1
PyWavelets 1.1.1
pywin32 227
pywin32-ctypes 0.2.0
pywinpty 0.5.7
PyYAML 5.3.1
pyzmq 18.1.1
QDarkStyle 2.8.1
QtAwesome 0.7.0
qtconsole 4.7.4
QtPy 1.9.0
requests 2.23.0
rope 0.17.0
Rtree 0.9.4
ruamel-yaml 0.15.87
scikit-image 0.16.2
scikit-learn 0.22.1
scipy 1.4.1
seaborn 0.10.1
Send2Trash 1.5.0
setuptools 46.4.0.post20200518
simplegeneric 0.8.1
singledispatch 3.4.0.3
six 1.14.0
snowballstemmer 2.0.0
sortedcollections 1.1.2
sortedcontainers 2.1.0
soupsieve 2.0
spacy 2.1.8
Sphinx 3.0.3
sphinxcontrib-applehelp 1.0.2
sphinxcontrib-devhelp 1.0.2
sphinxcontrib-htmlhelp 1.0.3
sphinxcontrib-jsmath 1.0.1
sphinxcontrib-qthelp 1.0.3
sphinxcontrib-serializinghtml 1.1.4
sphinxcontrib-websupport 1.2.1
spyder 4.1.3
spyder-kernels 1.9.1
SQLAlchemy 1.3.16
srsly 0.1.0
statsmodels 0.11.0
sympy 1.5.1
tables 3.6.1
tblib 1.6.0
tensorboard 1.14.0
tensorflow 1.14.0
tensorflow-estimator 1.14.0
termcolor 1.1.0
terminado 0.8.3
testpath 0.4.4
thinc 7.0.8
toml 0.10.0
toolz 0.10.0
torch 1.0.0
torchvision 0.2.1
tornado 6.0.4
tqdm 4.46.0
traitlets 4.3.3
typed-ast 1.4.1
typing-extensions 3.7.4.1
ujson 1.35
unicodecsv 0.14.1
urllib3 1.25.8
wasabi 0.2.2
watchdog 0.10.2
wcwidth 0.1.9
webencodings 0.5.1
Werkzeug 1.0.1
wheel 0.34.2
widgetsnbextension 3.5.1
win-inet-pton 1.1.0
win-unicode-console 0.5
wincertstore 0.2
wrapt 1.11.2
xlrd 1.2.0
XlsxWriter 1.2.8
xlwings 0.19.0
xlwt 1.3.0
yapf 0.28.0
zict 2.0.0
zipp 3.1.0

and the requirements file is like this

aiofiles==0.4.0
aiohttp==3.5.4
asyncio==3.4.3
fastai==1.0.52
https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl
https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl
numpy==1.16.3
pillow~=6.0
python-multipart==0.0.5
starlette==0.12.0
uvicorn==0.7.1

how do I fix this?

Hi obiwan I hope you are well and having a beautiful day!

The basic requirement to getting a model working on render.com is to make sure you match the library versions in requirements.txt to the libraries on the platform you trained your model on.

A quick look at your requirements.txt shows that your numpy version should be 1.18.1 not 1.16.1.

The error you have is normally associated with a mismatch with torch and torchvision.

The versions on colab are:
torch==1.0.0
torchvision==0.2.1

replace the https lines with the above in your requirements.txt.

Check the other files, if they are used on colab make sure they match.

There are many posts on this thread showing people doing just that.

Also make sure that you run your notebook first and get the latest pip_list that your model works with and do the above steps immediately. As often there are minor changes in the libraries made by the creators, which breaks the library, but the library version number has not changed, this happens quite often, and can take a long time to resolve.

Hope this helps.

Cheers mrfabulous1 :smiley: :smiley:

This works absolute fine. Thanks a lot!
Now can I change the text " Use images of teddy bears, black bears, grizzly bears, or all three!"

and how do I do that?

Hi Anurag,

i am currently following below mentioned link to create deploy web app on render.
https://course.fast.ai/deployment_render.html#customize-the-app-for-your-model

I have trained my image classification model on Google Colab. It is mentioned in the link that i need to update something in Server.py where can i find that file?

I am trying to deploy a image regression model on render ,but getting this error


Can anyone please help me out in this.

Hi venus hope all is well!

This error often means that there is a problem with your model or accessing your model.

As you are using a large model, check your application and model works locally first then redeploy it.

The the errors reported are often better on your local machine than on render.

Cheers mrfabulous1 :smiley: :smiley:

Hi mrfabulous ,hope you are doing good too.
Thankyou for your inputs ,it really helped understanding the error.

1 Like

Help. How did you solve your problem? We used your code, but it still does not work and gives an error…

@app.route(’/analyze’, methods=[‘POST’])
async def analyze(request):
data = await request.form()
img_bytes = await (data[‘file’].read())
image = cv2.imdecode(np.fromstring(img_bytes, np.uint8), 1)
gray_image = cv2.cvtColor(image, cv2.COLOR_BGR2GRAY)
next_image = cv2.adaptiveThreshold(gray_image,255,cv2.ADAPTIVE_THRESH_GAUSSIAN_C, cv2.THRESH_BINARY,11,4)
prediction = learn.predict(img)[0]
return JSONResponse({‘result’: str(prediction)})

The following error was given:
“numpy.ndarray object has no attribute apply_tfms”

Hi mrfabulous1 or @anurag (or anyone else who can help!),

I had a similar error, and so I redeployed my model and the error was the same:

Jun 15 06:52:51 PM #11 2.632 return _load(f, map_location, pickle_module, **pickle_load_args)
Jun 15 06:52:51 PM #11 2.632 _pickle.UnpicklingError: invalid load key, ‘<’.
Jun 15 06:52:51 PM #11 2.632 magic_number = pickle_module.load(f, **pickle_load_args)
Jun 15 06:52:51 PM #11 ERROR: executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully
Jun 15 06:52:51 PM ------
Jun 15 06:52:51 PM error: exit status 1
Jun 15 06:52:51 PM > [6/6] RUN python app/server.py:
Jun 15 06:52:51 PM ------
Jun 15 06:52:51 PM error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully

By the way, I was able to get Jeremy’s bear model up and running. This problem only came when I changed the classes and the URL to use my data set.

Thanks in advance!
Chris

Hi cberkner Hope all is well!

Can you explain the exact steps in detail you took to accomplish the above?
ie. where and how you changed the settings.
Also what do you mean by dataset?

Cheers mrfabulous1 :grinning: :grinning:

@mrfabulous1 thanks…

  1. I ran my Gradient/Jupyter notebook on my data set, and got the learning model to produce a strong result (reached 96% accuracy after 5 epochs). I then ran the learn.export line of code.

  2. I renamed the export file on Gradient export2.pkl and downloaded that to my local machine’s Dropbox folder.

  3. I went to the dropbox site and generated a publicly accessible shared link to the Dropbox .pkl file (https://www.dropbox.com/s/0skqq5a5odp2byh/export2.pkl?dl=0)

  4. On my fastai-v3 Github repo that I had copied from Anurag, I changed the server.py file as follows:

export_file-Url = ‘https://www.dropbox.com/s/0skqq5a5odp2byh/export2.pkl?dl=0
export_file_name = ‘export2.pkl’

classes = [‘blue_jay’, ‘green_jay’, ‘stellars_jay’]

  1. I changed the text from bears to birds/jays in the index.html file:

    Classify Bird Images 🐻

Use images of blue jays, green jays, stellars jays, or all three!

  1. I merged these changes into the Master on my Github repo

  2. On Render, I tried both “Deploy latest commit” and “Clear build cache and deploy”, but both options produced the same error.

Thanks!

1 Like

Are the libraries in your requirements.txt on your repo the same version numbers as the Gradient/Jupyter notebook library versions you trained your model on.
If this is not the case the model generally does not work. Search this thread for ‘pip list’ and change the versions numbers in requirements.txt in you repo to match the Gradient/Jupyter notebook versions.

Also I would recommend just creating a virtual environment on your desktop and getting the model running there as its much easier to debug.

Cheers mrfabulous1 :grinning: :grinning:


Currently getting this error. Any help?

Thanks! I’m confused, though, because there is not a one-to-one correlation between the contents of !pip list from Gradient/Jupyter and what’s in the Github repo now. In fact, there are certain elements in the Github repo requirements file that are nowhere to be found in the pip list.

Here’s the requirements.txt:

aiofiles==0.4.0
aiohttp==3.5.4
asyncio==3.4.3
fastai==1.0.60
https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl 4
https://download.pytorch.org/whl/cpu/torchvision-0.3.0-cp37-cp37m-linux_x86_64.whl
numpy==1.16.3
pillow~=6.0
python-multipart==0.0.5
starlette==0.12.0
uvicorn==0.7.1

And here’s the !pip list:

asn1crypto 0.24.0
attrs 18.2.0
backcall 0.1.0
beautifulsoup4 4.7.1
bleach 3.1.0
Bottleneck 1.2.1
certifi 2018.11.29
cffi 1.11.5
chardet 3.0.4
conda 4.8.1
conda-package-handling 1.6.0
cryptography 2.3.1
cycler 0.10.0
cymem 2.0.2
cytoolz 0.9.0.1
dataclasses 0.6
decorator 4.3.0
dill 0.2.8.2
entrypoints 0.3
fastai 1.0.60
fastprogress 0.2.2
idna 2.8
ipykernel 5.1.0
ipython 7.2.0
ipython-genutils 0.2.0
ipywidgets 7.4.2
jedi 0.13.2
Jinja2 2.10
jsonschema 3.0.0a3
jupyter 1.0.0
jupyter-client 5.2.4
jupyter-console 6.0.0
jupyter-core 4.4.0
kiwisolver 1.0.1
MarkupSafe 1.1.0
matplotlib 3.0.2
mistune 0.8.4
mkl-fft 1.0.10
mkl-random 1.0.2
msgpack 0.6.0
msgpack-numpy 0.4.3.2
murmurhash 1.0.0
nb-conda 2.2.1
nb-conda-kernels 2.2.0
nbconvert 5.3.1
nbformat 4.4.0
notebook 5.7.4
numexpr 2.6.9
numpy 1.15.4
nvidia-ml-py3 7.352.0
olefile 0.46
packaging 19.0
pandas 0.23.4
pandocfilters 1.4.2
parso 0.3.1
pexpect 4.6.0
pickleshare 0.7.5
Pillow 5.4.1
pip 18.1
plac 0.9.6
preshed 2.0.1
prometheus-client 0.5.0
prompt-toolkit 2.0.7
ptyprocess 0.6.0
pycosat 0.6.3
pycparser 2.19
Pygments 2.3.1
pyOpenSSL 18.0.0
pyparsing 2.3.1
pyrsistent 0.14.9
PySocks 1.6.8
python-dateutil 2.7.5
pytz 2018.9
PyYAML 3.13
pyzmq 17.1.2
qtconsole 4.4.3
regex 2018.1.10
requests 2.21.0
ruamel-yaml 0.15.87
scipy 1.2.0
Send2Trash 1.5.0
setuptools 40.6.3
six 1.12.0
soupsieve 1.7.1
spacy 2.0.18
terminado 0.8.1
testpath 0.4.2
thinc 6.12.1
toolz 0.9.0
torch 1.4.0
torchvision 0.5.0
tornado 5.1.1
tqdm 4.29.1
traitlets 4.3.2
typing 3.6.4
ujson 1.35
urllib3 1.24.1
wcwidth 0.1.7
webencodings 0.5.1
wheel 0.32.3
widgetsnbextension 3.4.2
wrapt 1.10.11

By the way, I did try to set up a virtual env on my own machine, but I hit a problem with that as well. Life is rough for us newbies!

Thanks!

HI cberkner Hope you are having a wonderul day!

No need to be confused Python on Gradient has many libraries so when ever a newbie or experienced person logs in, they do not have to install every library themselves.

You are only concerned about the libraries in the repo, or any additional libraries your app uses. For example your repo has incorrect versions for the two libraries below.

As mentioned in other posts you need to change all the repo library versions to match the gradient versions you are using. Replace the two pytorch libraries as they are not the versions you trained your model on using Gradient (see your pip list). Also change any other libraries that do not match.

If your model is old I would train it again as I consider pip list and the model (.pkl file) a pair. You must do the two together just in case library changes are made by the owners.

What problem did you have when you tried a standalone virtual env?

Problems are good, which is why Jeremy wants us to go from model to application as it makes you learn loads of stuff. I had about forty problems on my first classifier from docker.com to github.com and it took about 2-4 weeks from watching the videos to deployment. Lol! :smiley:

Now I can deploy a simple classifier in about 15 - 30 mins.

Cheers mrfabulous1 :smiley: :smiley:

Thanks, but unfortunately it’s still not working after updating all of the library versions. My model is just a week old.

Here is the error output from Render:

Jun 19 03:47:15 PM #10 2.951 Traceback (most recent call last):
Jun 19 03:47:15 PM #10 2.951 File “app/server.py”, line 48, in
Jun 19 03:47:15 PM #10 2.951 learn = loop.run_until_complete(asyncio.gather(*tasks))[0]
Jun 19 03:47:15 PM #10 2.951 File “/usr/local/lib/python3.7/asyncio/base_events.py”, line 587, in run_until_complete
Jun 19 03:47:15 PM #10 2.951 return future.result()
Jun 19 03:47:15 PM #10 2.951 File “app/server.py”, line 35, in setup_learner
Jun 19 03:47:15 PM #10 2.951 learn = load_learner(path, export_file_name)
Jun 19 03:47:15 PM #10 2.951 File “/usr/local/lib/python3.7/site-packages/torch/serialization.py”, line 529, in load
Jun 19 03:47:15 PM #10 2.951 File “/usr/local/lib/python3.7/site-packages/fastai/basic_train.py”, line 618, in load_learner
Jun 19 03:47:15 PM #10 2.951 state = torch.load(source, map_location=‘cpu’) if defaults.device == torch.device(‘cpu’) else torch.load(source)
Jun 19 03:47:15 PM #10 2.951 magic_number = pickle_module.load(f, **pickle_load_args)
Jun 19 03:47:15 PM #10 2.951 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
Jun 19 03:47:15 PM #10 2.951 File “/usr/local/lib/python3.7/site-packages/torch/serialization.py”, line 692, in _legacy_load
Jun 19 03:47:16 PM #10 ERROR: executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully
Jun 19 03:47:15 PM #10 2.951 _pickle.UnpicklingError: invalid load key, ‘<’.
Jun 19 03:47:16 PM > [6/6] RUN python app/server.py:
Jun 19 03:47:16 PM ------
Jun 19 03:47:16 PM ------
Jun 19 03:47:16 PM error: exit status 1
Jun 19 03:47:16 PM error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully

Here is the updated requirements file:

aiofiles==0.4.0
aiohttp==3.5.4
asyncio==3.4.3
fastai==1.0.60
numpy==1.15.4
Pillow==5.4.1
python-multipart==0.0.5
starlette==0.12.0
uvicorn==0.7.1
torch==1.4.0
torchvision==0.5.0

Here is the !pip list output from Gradient/Jupyter:

asn1crypto 0.24.0
attrs 18.2.0
backcall 0.1.0
beautifulsoup4 4.7.1
bleach 3.1.0
Bottleneck 1.2.1
certifi 2018.11.29
cffi 1.11.5
chardet 3.0.4
conda 4.8.1
conda-package-handling 1.6.0
cryptography 2.3.1
cycler 0.10.0
cymem 2.0.2
cytoolz 0.9.0.1
dataclasses 0.6
decorator 4.3.0
dill 0.2.8.2
entrypoints 0.3
fastai 1.0.60
fastprogress 0.2.2
idna 2.8
ipykernel 5.1.0
ipython 7.2.0
ipython-genutils 0.2.0
ipywidgets 7.4.2
jedi 0.13.2
Jinja2 2.10
jsonschema 3.0.0a3
jupyter 1.0.0
jupyter-client 5.2.4
jupyter-console 6.0.0
jupyter-core 4.4.0
kiwisolver 1.0.1
MarkupSafe 1.1.0
matplotlib 3.0.2
mistune 0.8.4
mkl-fft 1.0.10
mkl-random 1.0.2
msgpack 0.6.0
msgpack-numpy 0.4.3.2
murmurhash 1.0.0
nb-conda 2.2.1
nb-conda-kernels 2.2.0
nbconvert 5.3.1
nbformat 4.4.0
notebook 5.7.4
numexpr 2.6.9
numpy 1.15.4
nvidia-ml-py3 7.352.0
olefile 0.46
packaging 19.0
pandas 0.23.4
pandocfilters 1.4.2
parso 0.3.1
pexpect 4.6.0
pickleshare 0.7.5
Pillow 5.4.1
pip 18.1
plac 0.9.6
preshed 2.0.1
prometheus-client 0.5.0
prompt-toolkit 2.0.7
ptyprocess 0.6.0
pycosat 0.6.3
pycparser 2.19
Pygments 2.3.1
pyOpenSSL 18.0.0
pyparsing 2.3.1
pyrsistent 0.14.9
PySocks 1.6.8
python-dateutil 2.7.5
pytz 2018.9
PyYAML 3.13
pyzmq 17.1.2
qtconsole 4.4.3
regex 2018.1.10
requests 2.21.0
ruamel-yaml 0.15.87
scipy 1.2.0
Send2Trash 1.5.0
setuptools 40.6.3
six 1.12.0
soupsieve 1.7.1
spacy 2.0.18
terminado 0.8.1
testpath 0.4.2
thinc 6.12.1
toolz 0.9.0
torch 1.4.0
torchvision 0.5.0
tornado 5.1.1
tqdm 4.29.1
traitlets 4.3.2
typing 3.6.4
ujson 1.35
urllib3 1.24.1
wcwidth 0.1.7
webencodings 0.5.1
wheel 0.32.3
widgetsnbextension 3.4.2
wrapt 1.10.11

I can go into the virtual environment issue as well, but I’m wondering if this might not be the right thread for that?

Thanks!

Good afternoon cberkner I hope you are having a brilliant weekend.

I can report that your model with configuration above works though I used uvicorn== 0.11.5.

However using these to links I can get the bear classifier to work but not the jay bird classifier to work, the jaybird classifier gives the following error. _pickle.UnpicklingError: invalid load key, ‘<’.

export_file_url = ‘https://www.dropbox.com/s/6bgq8t6yextloqp/export2.pkl?raw=1
#export_file_url = ‘https://www.dropbox.com/s/0skqq5a5odp2byh/export2.pkl?dl=0

This error above nearly always means there is a problem with the sharelink, model or network the model is on. In this case the model works if I download it to the app.

I suggest you check the dropbox share link, use the google share link or if you have enough space use the model locally by saving it to the app directory.

Cheers mrfabulous1 :smiley: :smiley:

1 Like

Thank you so much for taking all the time to troubleshoot this. I tried moving the .pkl file to Google and using a universal sharing link, but I got pretty much the same error:

Jun 23 12:59:13 PM #10 2.356 File “/usr/local/lib/python3.7/site-packages/torch/serialization.py”, line 529, in load
Jun 23 12:59:13 PM #10 2.356 File “/usr/local/lib/python3.7/site-packages/fastai/basic_train.py”, line 618, in load_learner
Jun 23 12:59:13 PM #10 2.356 state = torch.load(source, map_location=‘cpu’) if defaults.device == torch.device(‘cpu’) else torch.load(source)
Jun 23 12:59:13 PM error: exit status 1
Jun 23 12:59:13 PM #10 2.356 return _legacy_load(opened_file, map_location, pickle_module, **pickle_load_args)
Jun 23 12:59:13 PM #10 2.356 File “/usr/local/lib/python3.7/site-packages/torch/serialization.py”, line 692, in _legacy_load
Jun 23 12:59:13 PM #10 2.356 magic_number = pickle_module.load(f, **pickle_load_args)
Jun 23 12:59:13 PM #10 2.356 _pickle.UnpicklingError: invalid load key, ‘<’.
Jun 23 12:59:13 PM #10 ERROR: executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully
Jun 23 12:59:13 PM ------
Jun 23 12:59:13 PM > [6/6] RUN python app/server.py:
Jun 23 12:59:13 PM ------
Jun 23 12:59:13 PM error: failed to solve: rpc error: code = Unknown desc = executor failed running [/bin/sh -c python app/server.py]: buildkit-runc did not terminate successfully

Since I have not yet been able to set up my virtual environment, and since Github won’t allow me to load a file larger than 25MB, I seem to still be stuck on this one.

Thanks again for all your help, even though it hasn’t solved my problem. I’m moving on to the next lesson and maybe when I figure out how to get my virtual environment set up I will come back to this.