GithubHelp home page GithubHelp logo

Comments (5)

bedapudi6788 avatar bedapudi6788 commented on August 16, 2024 3

@Timopheym thanks for the detailed bug report. I will test this and get back to you.

Meanwhile, you can use notaitech/fastdeploy-recipe:fastPunct_en

Example usage:

docker run -it -p 8080:8080 notaitech/fastdeploy-recipe:fastPunct_en

curl -d '{"data": ["thanks for the detailed bug report"]}' -H "Content-Type: application/json" -X POST http://localhost:8080/sync
# {"prediction": ["Thanks for the detailed bug report."], "success": true}

from fastdeploy.

bedapudi6788 avatar bedapudi6788 commented on August 16, 2024 1

timeout is configurable via the enviorment variable TIMEOUT.

example, for 20 minute timeout,

docker run -e TIMEOUT=720 -it -p 8080:8080 notaitech/fastdeploy-recipe:fastPunct_en

Or, /async endpoint might be better for processing longer texts.

from fastdeploy.

Timopheym avatar Timopheym commented on August 16, 2024

Thanks for the container, but fortune does not like me.

(base) ➜  ~ docker ps
CONTAINER ID        IMAGE                                      COMMAND                  CREATED              STATUS              PORTS                              NAMES
95d042041742        notaitech/fastdeploy-recipe:fastPunct_en   "bash _run.sh"           About a minute ago   Up About a minute   0.0.0.0:8080->8080/tcp             youthful_hugle

And while calling curl and using requests lib I am getting timeout error...

def get_punct(text: str) -> [str]:
    r = requests.post('http://localhost:8080/sync', json={"data": [text]})
    return r.json()
# {'success': False, 'reason': 'timeout'}

Don't really understand why, and how to debug it. Can I somehow get into the container and see any logs?
Now I see only

2020-07-28:21:06:05,413 WARNING  [_app.py:55] 82020-07-28-21-04-05-411-86be0c48-0105-4f44-b207-c3fd00f7663c timedout, with timeout 120.0

UPDATE: Nevermind. It happens for "long" text (230 ch) and for short text I was able to get results...

Is there any way to process long texts? I can write a logic to recursively pass text after the first recognized dot, but It looks like overkill... And might not work for some cases.
My test text is about 27 498 chars long.

from fastdeploy.

bedapudi6788 avatar bedapudi6788 commented on August 16, 2024

@Timopheym I think the reason for the original error message is a typo.

example.pkl     predictor.py    requiremets.txt

this should be requirements.txt instead of requiremets.txt

Let me know if this solves the issue.

from fastdeploy.

bedapudi6788 avatar bedapudi6788 commented on August 16, 2024

Closing the issue for now. Feel free to re-open if necessary.

from fastdeploy.

Related Issues (6)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.