-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory Issue while running model as REST service #10
Comments
Rohit8y
changed the title
How to run on a sample string.
Memory Issue while running model as REST service
Jul 29, 2021
I think you need to run the code in a single process: app.run(host='localhost', port=7777, threaded=False, processes=1) |
I've encountered this before, I solved it by installing jmalloc (
https://github.com/jemalloc/jmalloc) and using it in place of the standard
malloc, then you can launch your python script like this:
LD_PRELOAD=/usr/local/lib/libjemalloc.so python ...
More info should be on the jmalloc repo itself. Hope this helps!
Cheers,
Niccolò
…On Thu, Aug 5, 2021, 18:07 Michele Bevilacqua ***@***.***> wrote:
@Valahaar <https://github.com/Valahaar>
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEUS5GZ3WMEYVGUIW3CSZDLT3KZNVANCNFSM5AJFE3BA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
Does not exist. https://github.com/jemalloc/jmalloc This is correct url. |
Sorry, kinda hard to type from the phone, that's the link!
…On Thu, Aug 5, 2021, 19:13 Muhammad Irfan ***@***.***> wrote:
Does not exist.
https://github.com/jemalloc/jmalloc
This is correct url.
https://github.com/jemalloc/jemalloc
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#10 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AEUS5GYOFANMAVNV7LSPCN3T3LBCPANCNFSM5AJFE3BA>
.
Triage notifications on the go with GitHub Mobile for iOS
<https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675>
or Android
<https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email>
.
|
@mirfan899 have you solved this? |
Yes, I used the single thread, and its working fine for me. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
I'm using a REST service to run WSD model. But it's RAM keeps on increasing as I the number of hits increase. I was testing how much RAM will be enough for this, so at last I used a 64GB server, and it consumed all of it.
This is the code for rest service:-
import requests
import re
import os
import time
import json
from flask import jsonify
from time import sleep
from json import dumps
from flask import Flask, request
from ewiser.spacy.disambiguate import Disambiguator
import spacy
nlp = spacy.load("en_core_web_sm", disable=['parser', 'ner'])
wsd = Disambiguator("/content/ewiser.semcor+wngt.pt", lang="en")
nlp.add_pipe(wsd, last=True)
app = Flask(name)
@app.route("/wsd", methods=['POST'])
def wsd():
if name == "main":
#app.debug = True
app.run(host='localhost', port=7777)
The text was updated successfully, but these errors were encountered: