Git Product home page Git Product logo

qa_service's Introduction

Q&A service

Code style

The purpose of the service is to find questions that are as similar as possible to the user's request.

High-level architecture

accessibility text

Some requirements and thoughts are placed in approaches.md

Key parts description

Clustering

Subproject for data downloading, EDA, embedding clustering, computing clusters centers.

To run data downloading you can follow commands:

cd clustering
python src/data/get_data.py --config_path params.yaml

To run embeddings computing run:

python src/data/create_embeddings.py --config_path params.yaml

To create ElasticSearch index with precomputed embeddings run (you need running ElasticSearch for this step):

python src/index/indexer_elastic.py --config_path params.yaml

You can specify configuration in params.yaml if you need

Embedder service

Service to create text embeddings via Tensorflow Universal Sentence Encoder

You can find the Swagger docs on http://localhost:5000/apidocs

Search streamlit app

Streamlit application to find nearest StackOverflow question.

The application needs ElasticSearch index to search by.

You can modify application params in search_app/params.yaml if you need

How to run

You can run any services in the single mode, see reference

To run all with docker-compose run

  • Specify ElasticSearch user credentials in clustering/.env and /es.env files
  • Run all containers with docker-compose up
  • Create ElasticSearch index with command python src/index/indexer_elastic.py --config_path params.yaml

Finally, your search_app service will be deployed on localhost:8501

Testing

Load tests

There is load test written with Locust in the tests/locustfile.py. To run test follow these steps:

  • install locust with pip install locust
  • go to tests folder
  • run locust web UI with command locust
  • open http://localhost:8089/ and specify test params (Number of users, Spawn rate, Host with running search server)
  • start swarming

Also, you can run load tests without web UI, see Locust docs

Here you can see current load testing result with such hardware configuration:

  • CPU: Intel(R) Core(TM) i7-9750H CPU @ 2.60GHz 2.59 GHz
  • RAM: 16 GB
  • System disk space: 20 GB

qa_service's People

Contributors

pacifikus avatar

Watchers

 avatar

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.