Skip to content
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

Monitor / Improve API request latencies #29

Open
nathanfletcher opened this issue Sep 22, 2021 · 2 comments
Open

Monitor / Improve API request latencies #29

nathanfletcher opened this issue Sep 22, 2021 · 2 comments
Assignees
Labels
enhancement New feature or request

Comments

@nathanfletcher
Copy link
Contributor

nathanfletcher commented Sep 22, 2021

This issue is to help keep track of API latency times and to put in the effort to document and improve on it.
Currently, response times are between 5.185s - 7s

Test response times in Terminal

time curl \
  -X POST \
  -H "Content-Type: application/json" \
  https://kindly-api.azurewebsites.net/detect \
  -d '{"text":"this movie is great"}'
@nathanfletcher nathanfletcher added the enhancement New feature or request label Sep 22, 2021
@nathanfletcher nathanfletcher self-assigned this Sep 22, 2021
@nathanfletcher
Copy link
Contributor Author

nathanfletcher commented Sep 30, 2021

As a strategy to increase latency, we could convert the python model to a Tensorflow.js model and use it in a NodeJS endpoint to see if that would be faster
This can be a good resource to achieve that.

TensorFlow.js: Convert a Python SavedModel to TensorFlow.js format

@AyiteyDjaba May have other suggestions too

@AyiteyDjaba
Copy link
Collaborator

From what I have seen so far, you can only convert a model to Tensorflow.js if it was originally built with Tensorflow. I have no idea if the cardiffnlp model is based on Tensorflow. However, in the grand scheme of things, moving the backend completely to NodeJS would not be a problem if we are training our own model because we can train and serve the model with tensorflowjs

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants