Coder Social home page Coder Social logo

Comments (5)

drfraser avatar drfraser commented on June 19, 2024

Update: I decided everything was ready to go and started sending docs to the sentiment service. About 650 in, 500 response codes started occurring (sorry, no more detail than that). Things obviously got stuck at some point and so I Ctrl-C the application.

I was logged into the developer portal at the same time so I could monitor what was going at certain points. I Ctrl-Ced everything when the browser page would not refresh / timed out - I got a Gateway Timeout page once. Now it seems I've perhaps triggered some firewall because I can not get any response from the UI (have a blank webpage).

So I will stop. Sorry for breaking something :(

Update: I have processed a lot more documents now and no problems. As far as I can tell, it seems the 500 errors occurred after making a lot of requests with one client. But that may be a incorrect hypothesis. I broke the task up into multiple simultaneous Dask workers/clients and subsets of the whole set of documents [200 - 300 at a time] and have had no more problems.

from nlapi-python.

drfraser avatar drfraser commented on June 19, 2024

Here is a stack trace I got when using version 2.1.2.

File "/Volumes/Phil/projects/research/holistic/src/holistic/features/featset/expertai.py", line 89, in make_features
output = self.client.full_analysis(
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/client.py", line 89, in full_analysis
response = self.response_class(response=request.send())
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 52, in send
http_method, req_parameters = self.setup_raw_request()
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 62, in setup_raw_request
req_parameters = {"url": self.url, "headers": self.headers}
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/cloud/request.py", line 34, in headers
header = ExpertAiAuth().header
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/common/authentication.py", line 26, in header
value = constants.AUTH_HEADER_VALUE.format(self.fetch_token_value())
File "/Volumes/Phil/projects/research/holistic/venv/lib/python3.8/site-packages/expertai/nlapi/common/authentication.py", line 57, in fetch_token_value
raise ExpertAiRequestError(
expertai.nlapi.common.errors.ExpertAiRequestError: Failed to fetch the Bearer Token. Error: 500-Internal Server Error

If I immediately uninstall 2.1.2, reinstall 2.1.0 and then immediately run my code, everything works fine. If you can give me an idea where to look, I'd be happy to track this down for you - at least what I can from my side. I am only making 1 request at the moment - not a lot like I previously have said.

from nlapi-python.

marcobellei-eai avatar marcobellei-eai commented on June 19, 2024

Hi Doug,

there was a problem in deploying v2.1.2, you should retrieve v2.1.3 that fix the problem.
This should fix the 500 problem.

Thanks
Marco

from nlapi-python.

drfraser avatar drfraser commented on June 19, 2024

Hi Marco,

2.1.3 works perfectly. Thanks for being so responsive. FYI, the sentiment analysis looks to be more accurate than any of the other sentiment analysis libraries I have (afinn, pattern.en, SentiStrength, NLTK...) for a subset of the documents I have (the ones with negative polarity). I have to figure out why, but I'm not complaining.

Doug

from nlapi-python.

marcobellei-eai avatar marcobellei-eai commented on June 19, 2024

Hi Doug,

thank you for your patience and for your feedback.

Marco

from nlapi-python.

Related Issues (14)

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.