Deployment Platform: Render ✅

If I had to guess, first are we doing this in fastai1 or fastai2?

ah, fastai 1.0.60
I pushed the weights out to a google drive shared link per the directions.
Anyway, I wanted to use render to make deploying fast and easy but it’s been the opposite so far lol.
Let me know if you have any ideas otherwise I think I’m going to just give up and look at AWS or similar at this point.

Hmmm and you’ve installed the same version you trained on? I’d recommend trying again (not in render) and see if you can load_learner the pkl file as a start :slight_smile:

I’m running on 1.0.61dev0 but that doesn’t have an option in terms of being a requirement.
Thus I used 1.0.60 as the closest.

ERROR: Could not find a version that satisfies the requirement fastai==1.0.61 (from -r requirements.txt (line 4)) (from versions: 0.6, 0.7.0, 1.0.0b7, 1.0.0b8, 1.0.0, 1.0.1, 1.0.2, 1.0.3, 1.0.4, 1.0.5, 1.0.6, 1.0.7, 1.0.9, 1.0.10, 1.0.11, 1.0.12, 1.0.13, 1.0.14, 1.0.15, 1.0.16, 1.0.17, 1.0.18, 1.0.19, 1.0.20, 1.0.21, 1.0.22, 1.0.24, 1.0.25, 1.0.26, 1.0.27, 1.0.28, 1.0.29, 1.0.30, 1.0.31, 1.0.32, 1.0.33, 1.0.34, 1.0.35, 1.0.36, 1.0.36.post1, 1.0.37, 1.0.38, 1.0.39, 1.0.40, 1.0.41, 1.0.42, 1.0.43.post1, 1.0.44, 1.0.46, 1.0.47, 1.0.47.post1, 1.0.48, 1.0.49, 1.0.50, 1.0.50.post1, 1.0.51, 1.0.52, 1.0.53, 1.0.53.post1, 1.0.53.post2, 1.0.53.post3, 1.0.54, 1.0.55, 1.0.57, 1.0.58, 1.0.59, 1.0.60)

Jan 27 09:14:13 PM ERROR: No matching distribution found for fastai==1.0.61 (from -r requirements.txt (line 4))

I would doubt that should matter. I did test export and loading the pkl file locally but not sure if this is some issue with it not puling the file successfully from google drive or what.

Anyway, feels like I’m flying blind on render as I can’t really check anything and everytime I make a change no matter how tiny (i.e. server.py) it downloads and redoes the entire docker process so makes trying to fix very slow…

Thanks for any help,
Less

Yes, I highly recommend building on your local machine before pushing it to the cloud. Makes it much faster to debug. (run server.py on your linux CLI). Did you ensure when you pulled locally you were on 1.0.60?

1 Like

I don’t have a linux machine locally lol. That’s why I use salamander.ai :slight_smile:
Anyway, I think I’m giving up on this and will go read up on how to deploy on AWS.
Thanks for the help though!
Less

@LessW2020 I’m not sure if you’re on windows or not, but you can install a linux CLI. Lifesaver! I think you’ll run into the same issue there, so running may not be your best option :wink: I think it has to due with the file itself in your drive. You said it would load if you did a load_learner?

correct - if I load and predict using the file on salamander it works as expected.
what I can’t tell is if render is able to pull the file successfully from google drive. When I try to check it manually I get a “no preview available” and download button but thats via browser so not sure if render gets that same screen or a wget or similar just pulls directly.
That’s what I meant about making any changes to server.py to put some debugging on it but then have to remake the entire instance…
I have a windows machine so I’ll check installing linux but the other thing I can do is put the pkl file in an S3 bucket and see if render can load from there.
Thanks for the help!

1 Like

First things to check (I’ve seen):

  • Did you check the sharing settings to with a link?
  • When you tested it on salamander, were you using version 1.0.60? Or the dev version you are using?

Otherwise best of luck :slight_smile:

1 Like

Hi LessW2020

I normally check my google download model by by just putting my link in the browser? if it is working okay the file downloads like any other file…

It is my understanding that if you have a windows machine, anaconda and docker desktop you can create a virtual environment and with docker a unix environment.

I use this stack (I have a mac) for all my models before deploying them anywhere as render.com doesn’t show all the errors that a docker container does.

Cheers mrfabulous1 :smiley::smiley:

Hi hope your having a marvelous day!

Possible actions

  1. Investigate this link New guide for easy web app deployment

  2. build a simple teddy bear classifier on salamander and save pip_list at the same time as the model. deploy on desktop then render. (Prove all software is working).

  3. Make sure the model file is not bigger than is allowed on render.com

  4. If you don’t mind hosting any one of the following, the notebook, the model file with pip list saved into a text file at the same time as the model is saved, or your app on git, I’ll have a look at it, as I think if you go through this thread almost everyone has successfully deployed their first model on render although they don’t stay up long due to cost :smiley::smiley:

Cheers mrfabulous1 :smiley::smiley:

1 Like

I think the issue is google is putting up a ‘viewer’ even though I’ve checked all the ‘sharing’ options I could find.
This is what I get when manually viewing the link - it hits the file then flips to this ‘preview not available’ screen.

The pickle load I realized this morning is likely it’s pulling html and hence the ‘key error’ on < where < looks to me like the opening bracket for html.

Thanks but what is the ‘model size limit’? I searched the docs and there is nothing listed. My pkl for weights is 116MB.

Hi LessW2020 that model size is fine, the basic render app account is I think limited to 500mb total.

Looking at your previous image, having built close to 80 classifiers now this definitely isn’t something that I have seen when downloading.

can you save your pickle file to your hard drive and open it with a browser.

Fierfox looks like this

image
Chrome like this.
image

Aslo if the amount of free space on render.com is not exceeded you can copy our model to the drive and change the setting in server.py and access it directly.

Cheers mrfabulous1 :smiley::smiley:

Uploadinig directly would be a huge help. I can’t make google drive not display the ‘no preview’ and am pretty sure that is what is blocking the download and thus pickle fails b/c it’s loading html and not a file.

I can download/view the pkl file fine on my hard drive so no issue there.

When I go into the render interface I don’t see any option to upload things? Do I have to put it in my github and then it pulls or how to do this? That should be the fix to get this running.

Most likely not. It’s no preview due to it just doesn’t know what to do with that type of file extension. What are the sharing settings on the file itself?

re: sharing - I have it set as “anyone with the link can access, no sign in required”.

1 Like

Hi LessW2020
Whats the link?

Cheers mrfabulous1 :smiley::smiley:

Hi LessW2020

Here is an old classifier that classifies English pound notes £5, £10, £20

https://drive.google.com/uc?export=download&id=12ak8K6dFwVUgKmDLRUPgwt6vB80kr2Cy

Does it open correctly?

cheers mrfabulous1 :smiley::smiley:

HIi @mrfabulous1 - yes that opens as expected (direct to drive).
However, even when I changed my google drive to a ‘download link’ via rawdownload.now.sh, that then generates a "this file is larger than 100MB and google cannot virus check’ error.

Thus, I’m uploading the pkl file to an AWS bucket now and will try that. If you can advise how to upload direclty that would avoid all this interim ‘load here, download but get html there’ issue :slight_smile: