Hi,
I have tried many different scenarios to get my learning model for Lesson 2 into a production environment. I keep getting stalled with the following error:
Step 7/9 : RUN python app/server.py —>
Running in f573ecea5f5d /usr/local/lib/python3.6/site-packages/torch/serialization.py:435: SourceChangeWarning: source code of class ‘torchvision.models.resnet.BasicBlock’ has changed. you can retrieve the original source code by accessing the object’s source attribute or set torch.nn.Module.dump_patches = True
and use the patch tool to revert the changes. warnings.warn(msg, SourceChangeWarning)
Traceback (most recent call last):
File “app/server.py”, line 61, in <module> 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 56, in setup_learner learn.load(model_file_name)
File “/usr/local/lib/python3.6/site-packages/fastai/basic_train.py”, line 245, 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 542, in _load result = unpickler.load()
AttributeError: Can’t get attribute ‘ImageItemList’ on <module ‘fastai.vision.data’ from ‘/usr/local/lib/python3.6/site-packages/fastai/vision/data.py’>
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
I’m thinking somehow when I have exported my learning model it doesn’t have the correct settings to then be used in my App but I’m unsure what that would be.
Any help would be much appreciated.