/pqai-encoder

Representation creation modules of PQAI

Primary LanguagePythonMIT LicenseMIT

Python Linting: pylint Docker build: automated Code style: black GitHub license

PQAI Encoder

PQAI service for transforming data into representations suitable as inputs for machine-learning pipelines. For example, transforming a piece of text into an embedding in a high-dimensional vector space.

The following representations are supported at the moment:

  1. Text -> Dense embedding
  2. Text -> Sequence of word vectors
  3. Text -> Bag of entities

For more detailed information, please refer to PQAI Wiki.

Routes

Method Route Description
POST /encode Returns a representation of given data

License

The project is open-source under the MIT license.

Contribute

We welcome contributions.

To make a contribution, please follow these steps:

  1. Fork this repository.
  2. Create a new branch with a descriptive name
  3. Make copy of env file as .env and docker-compose.dev.yml as docker-compose.yml
  4. Download and extract the file from https://s3.amazonaws.com/pqai.s3/public/pqai-assets-latest.zip to assets/
  5. Bring encoder to life docker-compose up
  6. Make the changes you want and add new tests, if needed
  7. Make sure all tests are passing docker exec -i dev_pqai_encoder_api python -m unittest discover ./tests/
  8. Commit your changes
  9. Submit a pull request

Support

Please create an issue if you need help.