Skip to main content

GNES is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.

Project description

GNES Generic Neural Elastic Search, logo made by Han Xiao

PyPI Docker Cloud Build Status Documentation Status PyPI - License

HighlightsOverviewInstallGetting StartedUsageTutorialsFAQ

What is it

GNES [jee-nes] is Generic Neural Elastic Search, a cloud-native semantic search system based on deep neural network.

GNES enables large-scale index and semantic search for text-to-text, image-to-image, video-to-video and possibly any-to-any content form.

Highlights

  • :cloud: Cloud-native: GNES is all-in-microservice: encoder, indexer, preprocessor and router are all running statelessly and independently in their own containers. They communicate via versioned APIs and collaborate under the orchestration of Docker Swarm/Kubernetes etc. Scaling, load-balancing, automated recovering, they come off-the-shelf in GNES.
  • :hatching_chick: Easy-to-use on every level: How long would it take to deploy a change that involves just changing the encoder from BERT to ELMO or switching a layer in VGG? In GNES, this is just one line change in a YAML file. We abstract the encoding and indexing logic from the code to a YAML config, so that you can combine or stack encoders and indexers without even touching the codebase.
  • :rocket: State-of-the-art: Taking advantage of fast-evolving AI/ML/NLP/CV communities, we learn from best-of-breed deep learning models and plug them into GNES, making sure you always enjoy the state-of-the-art performance.
  • :nut_and_bolt: Generic and compatible: Searching for texts, image or even short-videos? Using Python/C/Java/Go/HTTP as the client? Doesn't matter which content form you have or which language do you use, GNES can handle them all.
  • :100: Best practice: We love to learn the best practice from the community, helping our GNES to achieve the next level of availability, resiliency, performance, and durability. If you have any ideas or suggestions, feel free to contribute.

Overview

component overview

Getting Started

As a cloud-native application, GNES requires an orchestration engine to coordinate all micro-services. Currently, we support Kubernetes, Docker Swarm and a built-in solution. Click on one of the icons below to get started.

GNES on Kubernetes
▶️ I want to use GNES with Kubernetes.
GNES on Docker Swarm
▶️ I want to use GNES with Docker Swarm.
GNES with built-in orchestration
▶️ I want to use GNES on a single machine.

Using GNES with Kubernetes

TBA

Using GNES with Docker Swarm

The easiest and the recommended way to use GNES is via Docker, which uses containers to create virtual environments that isolate a GNES installation from the rest of the system. You don't need to worry about dependencies, they are self-contained in the GNES docker image. Moreover, GNES relies on the Docker Swarm for managing, scaling and conducting orchestration tasks over multiple micro-services.

1. Prerequisites

2. Start GNES with the wizard

If you are new to GNES, it is recommended to use the wizard to config and start GNES.

bash <(curl -s https://raw.githubusercontent.com/gnes-ai/wizard/build/wizard.sh)

At the last step, the wizard will generate a random name for the service, say my-gnes-0531. Keep that name in mind. If you miss that name, you can always use docker stack ls to checkout the name of your service.

How do I know if GNES is running succesfully? (click to expand...)

To tell whether the service is running successfully or not, you can use docker stack ps my-gnes-0531. It should give you results as follows:

ID                  NAME                         IMAGE                                           NODE                DESIRED STATE       CURRENT STATE                ERROR               PORTS
zku2zm9deli9        my-gnes-0531_encoder.1      ccr.ccs.tencentyun.com/gnes/aipd-gnes:86c0a3a   VM-0-3-ubuntu       Running             Running about an hour ago
yc09pst6s7yt        my-gnes-0531_grpc_serve.1   ccr.ccs.tencentyun.com/gnes/aipd-gnes:86c0a3a   VM-0-3-ubuntu       Running             Running about an hour ago

Note, the running status under CURRENT STATE suggests everything is fine.

How can I terminate GNES? (click to expand...)

To stop a running GNES service, you can use docker stack rm my-gnes-0531.

Using GNES with Built-In Orchestration

TBA

Usage

First thing to know, GNES has three independent runtimes: train, index and search. This differs from the classic machine learning system which has two runtimes i.e. train and inference; also differs from the classic search system that has two runtimes i.e. index and search. Depending on the runtime of GNES, the microservices may be composed, work and communicate with others in different ways. In other word, the runtime determines which service doing what logic at when. In the sequel, we will demonstrate how to use GNES under different runtimes.

Note, to switch between runtimee you need to shutdown the current runtime and start a new GNES.

Train mode: training encoders and indexers

TBA

Index mode: adding new documents

TBA

Query mode: searching relevant documents of a given query

TBA

:book: Documentation

ReadTheDoc

The official documentation of GNES is hosted on doc.gnes.ai. It is automatically built, updated and archived on every new release.

Tutorial

TBA

Contributing

Thanks for your interest in contributing! There are many ways to get involved; start with our contributor guidelines and then check these open issues for specific tasks.

For contributors looking to get deeper into the API we suggest cloning the repository and checking out the unit tests for examples of how to call methods.

Release Notes

TBA

Citing GNES

@misc{tencent2019GNES,
  title={GNES: Generic Neural Elastic Search},
  author={Xiao, Han and Yan, Jianfeng and Wang, Feng and Fu, Jie},
  howpublished={\url{https://github.com/gnes-ai}},
  year={2019}
}

License

Tencent is pleased to support the open source community by making GNES available.

Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.

If you have downloaded a copy of the GNES binary or source code, please note that the GNES binary and source code are both licensed under the Apache License, Version 2.0.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

gnes-0.0.22.tar.gz (72.3 kB view hashes)

Uploaded Source

Built Distribution

gnes-0.0.22-cp36-cp36m-macosx_10_13_x86_64.whl (190.7 kB view hashes)

Uploaded CPython 3.6m macOS 10.13+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page