PHPFixing
  • Privacy Policy
  • TOS
  • Ask Question
  • Contact Us
  • Home
  • PHP
  • Programming
  • SQL Injection
  • Web3.0

Wednesday, July 13, 2022

[FIXED] where I can deploy ml algorithm without time out?

 July 13, 2022     heroku, pytorch, web-deployment     No comments   

Issue

I used Heroku to deploy ml algorithm with Pytorch but when I sent request to app to train model with 100 epochs then I got this error

at=error code=H12 desc="Request Timeout" method=POST path="/train"

I searched about request time out and I find that the limit to request time
from Heroku is 30 sec

What's the solution of time out problem and is there an platform for training model without time out?


Solution

Model training can be an expensive and lengthy operation that can take from minutes to hours (depending on context and amount of data), so it is likely that you will have a request timeout on other providers too.

The solution is to make the model train a background task:

  • create a worker Dyno which schedule the model training (ie everyday at h11:00)

OR

  • keep the web Dyno but make sure the /train request spawns a background thread (hence the web request completes quickly and the training happens in background)


Answered By - Beppe C
Answer Checked By - Robin (PHPFixing Admin)
  • Share This:  
  •  Facebook
  •  Twitter
  •  Stumble
  •  Digg
Newer Post Older Post Home

0 Comments:

Post a Comment

Note: Only a member of this blog may post a comment.

Total Pageviews

Featured Post

Why Learn PHP Programming

Why Learn PHP Programming A widely-used open source scripting language PHP is one of the most popular programming languages in the world. It...

Subscribe To

Posts
Atom
Posts
Comments
Atom
Comments

Copyright © PHPFixing