Deployment Platform: Render ✅

Congrats on officially launching Render, Anurag! Well done to the team, for such a great product and service : )

1 Like

Thank you!

1 Like

The flow of taking a fastai model into production with Render is very smooth. Thank you! I had a little issue with package versions so I wanted to share how to use the shell in Render to debug version issues.

I was deploying a simple model I built (to identify different sloths…very useful) and so I copied the official repo and changed the download path and classes as described in the official documentation.

I got an “AttributeError” which has been described by some others above. But what seemed odd was in requirements.txt, fastai was listed without a version number so I guessed that it would download the latest. This is not the case.

To debug the version issues I ran python -m fastai.utils.show_install first in my development platform and then on production. To run this command on production go to Render click on your service and the Shell tab. I found that both the fastai and PyTorch versions differed between development and production. To get a specific fastai version simply update the row in requirements.txt:

fastai==1.0.52

To update PyTorch go to pytorch.org and use the Quick Start tool to get the link you need:

Then update the corresponding row in requirements.txt:

https://download.pytorch.org/whl/cpu/torch-1.1.0-cp37-cp37m-linux_x86_64.whl

Commit your changes and push to GitHub again and Render will redeploy your application.

2 Likes

We just rolled out pricing plans with higher memory and CPU limits, so you can use Render to deploy bigger models. cc @KarlH and @waydegg

3 Likes

As far as I can tell, the latest version of fastai (.52) doesn’t work with torch 1.1.0.

Been waiting for this! Thanks

What are the max memory limits now? I could not find that info in the docs.

You can see them when you create a new service. We’re going to show them on the pricing page very soon, but here’s a preview:

1 Like

I have been playing around with render to deploy a simple CNN for classification and that worked perfectly. However, I struggled with the same deployment with a CNN that gives a numerical output (i.e. regression). I noted in the starter code that there is a line for 'classes = [‘black’, ‘grizzlies’, ‘teddys’], but I cannot figure out where the classes are referred to in the code or if this line is important. Also, for a regression there is no classes required, but the starter code does not seem to work without this line.

Can someone enlighten me here?

Hello,

What error are you getting when you remove 'classes = [‘black’, ‘grizzlies’, ‘teddys’] ? Because I removed it from my project and it worked.

1 Like

Hi, I just cloned the github for bear one. But I am getting following errors-

/usr/local/lib/python3.7/site-packages/torch/serialization.py:435: SourceChangeWarning: source code of class ‘torch.nn.modules.batchnorm.BatchNorm1d’ 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.

Not only BatchNorm1d is producing this error but avgpool, dropout, linear are also giving same error. Can anybody help me?

1 Like

I am getting the following error while trying to run my model on render. “ReLU object has no attribute threshold”. Can anyone please help me solve it?

(I cannot figure out where is the problem, and how should I solve it)

Probably you build your network on a newer version of fastai that requires a newer version of PyTorch. Change the PyTorch version in the requirement list for the new 1.1.0 version and that probably solve your problem.

By the way, you can get solutions faster if you use the search engine to find if your problem has been asking before in the forums.

Try it, put your problem

“ReLU object has no attribute threshold”

in the searcher and you will find at least one post of this problem with a working solution.

Good luck

1 Like

Hi @anurag

First of all thank you very much for creating this wonderful platform.

I just recently finished an image regression task (age prediction based on an image). Considering the classes here are float items, what do I need to put in classes while using Render.

Thanks
Abhik

Hey @anurag

Just had my first taste of Render, and it is quite amazing and simple to use. Thanks for building such an intuitive service.

I have a question regarding the pricing. Currently, I have the starter FastAI Bears model up and running. While I chose the basic $5 plan, no billing information was required. When will I be charged for this?

2 Likes

Thank you very much. That solved my issue. And also thanks for the hack about finding solutions faster in the forum:)

Yes; users can test things without adding a credit card, but all usage is billed eventually. You can view your billing details and add a card at https://dashboard.render.com/billing.

1 Like

Hello, I tried to deploy Jeremy’s model from repo without any changes.

The deployment process went fine, but when I tried to test the app in browser I get the following error: Internal Server Error.

The corresponding entry in log was:

May 24 07:20:05 AM  ERROR: Exception in ASGI application
May 24 07:20:05 AM  Traceback (most recent call last):
  File "/usr/local/lib/python3.7/site-packages/uvicorn/protocols/http/httptools_impl.py", line 378, in run_asgi
    asgi = app(self.scope)
TypeError: __call__() missing 2 required positional arguments: 'receive' and 'send'
May 24 07:20:05 AM  INFO: ('10.104.10.233', 55270) - "GET / HTTP/1.1" 500

Has anyone had similar issue?

Yes, a few people have reported this issue today. My guess is one of the libraries in requirements.txt was upgraded to a backwards incompatible version. I’ll post here if/when a fix is available.

1 Like

I beleive you are right, I found this thread on github: https://github.com/kennethreitz/responder/issues/337

I’ll try to resolve it by myself later - will notify you if I succeed)

Thanks!

Hi guys. @anurag’s intuition was correct. I just added the versions that are installed on my local system (on which the app was working properly ) into the requirements file, as such:

numpy==1.15.4
torchvision==0.2.1
https://download.pytorch.org/whl/cpu/torch-1.0.1.post2-cp37-cp37m-linux_x86_64.whl
fastai==1.0.51
starlette==0.11.4
uvicorn==0.3.32
python-multipart
aiofiles==0.4.0
aiohttp==3.5.4

And it worked!
Hopefully it works for you too :slight_smile:

6 Likes