Hi @piaoya,
I spent a lot of time on it, I think this code is not build with the latest version of fastai.
Yes, this code was built with fastai==1.0.22
as specified in the floyd_requirements.txt file
I ended up with a model which was built, but most of the time when I followed the service-link as provided in 'me/projects/projectname/versionx'-Folder I just got: '502 Bad Gateway - nginx'.
I've quickly checked your last Model API and I spotted this error in the logs (unfortunately the Model API logs are a bit hard to read since there are 2 processes who are logging there):
2019-02-05 09:55:27 PSTTraceback (most recent call last):
2019-02-05 09:55:27 PSTFile "app.py", line 24, in <module>
2019-02-05 09:55:27 PSTtrained_model = load_model()
2019-02-05 09:55:27 PSTFile "app.py", line 19, in load_model
2019-02-05 09:55:27 PSTlearn.load('wildkraut-stage-2')
2019-02-05 09:55:27 PSTFile "/usr/local/lib/python3.6/site-packages/fastai/basic_train.py", line 204, in load
2019-02-05 09:55:27 PSTself.model.load_state_dict(torch.load(self.path/self.model_dir/f'{name}.pth', map_location=device))
2019-02-05 09:55:27 PSTFile "/usr/local/lib/python3.6/site-packages/torch/serialization.py", line 365, in load
2019-02-05 09:55:27 PSTf = open(f, 'rb')
2019-02-05 09:55:27 PSTFileNotFoundError: [Errno 2] No such file or directory: '/floyd/home/clabby-classifier/models/models/wildkraut-stage-2.pth'
It seems a typo in the path to the pth
file, it should be /floyd/home/clabby-classifier/models/wildkraut-stage-2.pth
.
Hope that helps.