Giter VIP home page Giter VIP logo

convai-testing-system's Introduction

License Apache 2.0 Python 3.6, 3.7, 3.8, 3.9, 3.10, 3.11 Downloads

DeepPavlov is an open-source conversational AI library built on PyTorch.

DeepPavlov is designed for

  • development of production ready chat-bots and complex conversational systems,
  • research in the area of NLP and, particularly, of dialog systems.

Quick Links

Please leave us your feedback on how we can improve the DeepPavlov framework.

Models

Named Entity Recognition | Intent/Sentence Classification |

Question Answering over Text (SQuAD) | Knowledge Base Question Answering

Sentence Similarity/Ranking | TF-IDF Ranking

Syntactic Parsing | Morphological Tagging

Automatic Spelling Correction | Entity Extraction

Open Domain Questions Answering | Russian SuperGLUE

Relation Extraction

Embeddings

BERT embeddings for the Russian, Polish, Bulgarian, Czech, and informal English

ELMo embeddings for the Russian language

FastText embeddings for the Russian language

Auto ML

Tuning Models

Integrations

REST API | Socket API

Amazon AWS

Installation

  1. DeepPavlov supports Linux, Windows 10+ (through WSL/WSL2), MacOS (Big Sur+) platforms, Python 3.6, 3.7, 3.8, 3.9 and 3.10. Depending on the model used, you may need from 4 to 16 GB RAM.

  2. Create and activate a virtual environment:

    • Linux
    python -m venv env
    source ./env/bin/activate
    
  3. Install the package inside the environment:

    pip install deeppavlov
    

QuickStart

There is a bunch of great pre-trained NLP models in DeepPavlov. Each model is determined by its config file.

List of models is available on the doc page in the deeppavlov.configs (Python):

from deeppavlov import configs

When you're decided on the model (+ config file), there are two ways to train, evaluate and infer it:

GPU requirements

By default, DeepPavlov installs models requirements from PyPI. PyTorch from PyPI could not support your device CUDA capability. To run supported DeepPavlov models on GPU you should have CUDA compatible with used GPU and PyTorch version required by DeepPavlov models. See docs for details. GPU with Pascal or newer architecture and 4+ GB VRAM is recommended.

Command line interface (CLI)

To get predictions from a model interactively through CLI, run

python -m deeppavlov interact <config_path> [-d] [-i]
  • -d downloads required data - pretrained model files and embeddings (optional).
  • -i installs model requirements (optional).

You can train it in the same simple way:

python -m deeppavlov train <config_path> [-d] [-i]

Dataset will be downloaded regardless of whether there was -d flag or not.

To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.

There are even more actions you can perform with configs:

python -m deeppavlov <action> <config_path> [-d] [-i]
  • <action> can be
    • install to install model requirements (same as -i),
    • download to download model's data (same as -d),
    • train to train the model on the data specified in the config file,
    • evaluate to calculate metrics on the same dataset,
    • interact to interact via CLI,
    • riseapi to run a REST API server (see doc),
    • predict to get prediction for samples from stdin or from <file_path> if -f <file_path> is specified.
  • <config_path> specifies path (or name) of model's config file
  • -d downloads required data
  • -i installs model requirements

Python

To get predictions from a model interactively through Python, run

from deeppavlov import build_model

model = build_model(<config_path>, install=True, download=True)

# get predictions for 'input_text1', 'input_text2'
model(['input_text1', 'input_text2'])

where

  • install=True installs model requirements (optional),
  • download=True downloads required data from web - pretrained model files and embeddings (optional),
  • <config_path> is model name (e.g. 'ner_ontonotes_bert_mult'), path to the chosen model's config file (e.g. "deeppavlov/configs/ner/ner_ontonotes_bert_mult.json"), or deeppavlov.configs attribute (e.g. deeppavlov.configs.ner.ner_ontonotes_bert_mult without quotation marks).

You can train it in the same simple way:

from deeppavlov import train_model 

model = train_model(<config_path>, install=True, download=True)

To train on your own data you need to modify dataset reader path in the train config doc. The data format is specified in the corresponding model doc page.

You can also calculate metrics on the dataset specified in your config file:

from deeppavlov import evaluate_model 

model = evaluate_model(<config_path>, install=True, download=True)

DeepPavlov also allows to build a model from components for inference using Python.

License

DeepPavlov is Apache 2.0 - licensed.

convai-testing-system's People

Contributors

bavadim avatar madrugado avatar seliverstov avatar yoptar avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar  avatar

convai-testing-system's Issues

No data is being written to database

Hi, I have setup the server using a valid mongoDB URI. When I startup the server I can see from my mongod endpoint that connections are being open, yet no collections are created and no data is being written. Here are my logs:

TOKEN=<bot token> WEBHOOK=https://koustuv.me PORT=9844 MONGODB_URI=mongodb://<host:port>/convai convai-testing-system
2017-09-14 12:47:32 INFO  Slf4jLogger:92 - Slf4jLogger started
2017-09-14 12:47:33 INFO  cluster:71 - Cluster created with settings {hosts=[<host:port>], mode=SINGLE, requiredClusterType=UNKNOWN, serverSelectionTimeout='30000 ms', maxWaitQueueSize=500}
2017-09-14 12:47:33 INFO  BotEndpoint:107 - bot 5319E57A-F165-4BEC-94E6-413C38B4ACF9 registred
2017-09-14 12:47:33 INFO  BotEndpoint:107 - bot F0690A4D-B999-46F0-AD14-C65C13F09C40 registred
2017-09-14 12:47:33 INFO  BotEndpoint:107 - bot DA008C35-73CD-4A64-8D67-5C922808D6B4 registred
2017-09-14 12:47:33 INFO  BotEndpoint:107 - bot 0A36119D-E6C0-4022-962F-5B5BDF21FD97 registred
2017-09-14 12:47:33 INFO  connection:71 - Opened connection [connectionId{localValue:1, serverValue:1}] to <host:port>
2017-09-14 12:47:33 INFO  cluster:71 - Monitor thread successfully connected to server with description ServerDescription{address=<host:port>, type=STANDALONE, state=CONNECTED, ok=true, version=ServerVersion{versionList=[3, 2, 10]}, minWireVersion=0, maxWireVersion=4, maxDocumentSize=16777216, roundTripTimeNanos=19705513}
2017-09-14 12:47:35 INFO  BotWorker:36 - bind on 9844 port
2017-09-14 12:47:37 INFO  BotWorker:24 - Listening on ::0:9844
2017-09-14 12:54:08 INFO  DialogFather:107 - test dialog TelegramChat(125020302,Some(koustuvs))-Bot(5319E57A-F165-4BEC-94E6-413C38B4ACF9)
2017-09-14 12:54:08 INFO  DialogFather:107 - start talk between TelegramChat(125020302,Some(koustuvs)) and Bot(5319E57A-F165-4BEC-94E6-413C38B4ACF9)
2017-09-14 12:54:14 INFO  Dialog:107 - rated message 320000000 with 2
2017-09-14 12:54:16 INFO  Dialog:107 - rated message 180000000 with 2
2017-09-14 12:55:09 INFO  DialogFather:107 - user TelegramChat(125020302,Some(koustuvs)) leave, dialog List(TelegramChat(125020302,Some(koustuvs)), Bot(5319E57A-F165-4BEC-94E6-413C38B4ACF9)) finished
2017-09-14 12:55:09 INFO  Dialog:107 - evaluation from Bot(5319E57A-F165-4BEC-94E6-413C38B4ACF9): quality=0, breadth=0, engagement=0
2017-09-14 12:55:13 INFO  Dialog:107 - rated message 135000000 with 2
2017-09-14 12:55:18 INFO  Dialog:107 - evaluation from TelegramChat(125020302,Some(koustuvs)): quality=4, breadth=3, engagement=3
2017-09-14 12:55:18 INFO  DialogFather:107 - dialog terminated, users List(TelegramChat(125020302,Some(koustuvs)), Bot(5319E57A-F165-4BEC-94E6-413C38B4ACF9)) leave from dialog

And the mongod logs:

2017-09-14T08:47:22.409-0400 I NETWORK  [initandlisten] waiting for connections on port 8091
2017-09-14T08:47:33.551-0400 I NETWORK  [initandlisten] connection accepted from <ip>:45006 #1 (1 connection now open)

No default config present

Hi, the default config is not present in this location : /etc/nipt_router_bot/reference.conf, neither in /etc/convai_testing_system/

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.