Skip to content

Commit

Permalink
Release 0.0.6b (#311)
Browse files Browse the repository at this point in the history
* Add files via upload

* Update README.md

`Model` - > `Component`

* fix: indent in 04 tutorial

* docs: add info on installation of config requirements

* feat: new version number

* feat: download en for spacy if spacy is required

* feat: download en for spacy if spacy is required

* feat: version 0.0.6b
  • Loading branch information
yoptar authored Jul 10, 2018
1 parent 9ae4d01 commit 3f23f1e
Show file tree
Hide file tree
Showing 6 changed files with 26 additions and 19 deletions.
25 changes: 14 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
[![License Apache 2.0](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/deepmipt/DeepPavlov/blob/master/LICENSE)
![Python 3.6](https://img.shields.io/badge/python-3.6-green.svg)

_We are still in a really early Alpha release._
_We are still in a really early Alpha release._
__In version 0.0.6 everything from package `deeppavlov.skills` except `deeppavlov.skills.pattern_matching_skill` was moved to `deeppavlov.models` so your imports might break__


DeepPavlov is an open-source conversational AI library built on [TensorFlow](https://www.tensorflow.org/) and [Keras](https://keras.io/). It is designed for
* development of production ready chat-bots and complex conversational systems,
Expand Down Expand Up @@ -52,14 +54,10 @@ print(HelloBot(['Hello!', 'Boo...', 'Bye.']))
git clone https://github.com/deepmipt/DeepPavlov.git
cd DeepPavlov
```
4. Install the requirements:
4. Install basic requirements:
```
python setup.py develop
```
5. Install `spacy` dependencies:
```
python -m spacy download en
```

# Demo

Expand All @@ -80,16 +78,16 @@ Our goal is to enable AI-application developers and researchers with:
## Key Concepts
* `Agent` is a conversational agent communicating with users in natural language (text).
* `Skill` fulfills user’s goal in some domain. Typically, this is accomplished by presenting information or completing transaction (e.g. answer question by FAQ, booking tickets etc.). However, for some tasks a success of interaction is defined as continuous engagement (e.g. chit-chat).
* `Model` is a reusable functional component of `Skill`.
* `Component` is a reusable functional component of `Skill`.
* `Rule-based Models` cannot be trained.
* `Machine Learning Models` can be trained only stand alone.
* `Deep Learning Models` can be trained independently and in an end-to-end mode being joined in a chain.
* `Skill Manager` performs selection of the `Skill` to generate response.
* ` Chainer` builds an agent/component pipeline from heterogeneous components (rule-based/ml/dl). It allows to train and infer models in a pipeline as a whole.

The smallest building block of the library is `Model`. `Model` stands for any kind of function in an NLP pipeline. It can be implemented as a neural network, a non-neural ML model or a rule-based system. Besides that, `Model` can have nested structure, i.e. a `Model` can include other `Model`'(s).
The smallest building block of the library is `Component`. `Component` stands for any kind of function in an NLP pipeline. It can be implemented as a neural network, a non-neural ML model or a rule-based system. Besides that, `Component` can have nested structure, i.e. a `Component` can include other `Component`'(s).

`Model`s can be joined into a `Skill`. `Skill` solves a larger NLP task compared to `Model`. However, in terms of implementation `Skill`s are not different from `Model`s. The only restriction of `Skill`s is that their input and output should both be strings. Therefore, `Skill`s are usually associated with dialogue tasks.
`Component`s can be joined into a `Skill`. `Skill` solves a larger NLP task compared to `Component`. However, in terms of implementation `Skill`s are not different from `Component`s. The only restriction of `Skill`s is that their input and output should both be strings. Therefore, `Skill`s are usually associated with dialogue tasks.

`Agent` is supposed to be a multi-purpose dialogue system that comprises several `Skill`s and can switch between them. It can be a dialogue system that contains a goal-oriented and chatbot skills and chooses which one to use for generating the answer depending on user input.

Expand All @@ -99,7 +97,13 @@ DeepPavlov is built on top of machine learning frameworks [TensorFlow](https://w

# Quick start

To use our pre-trained models, you should first download them:
To use our pre-trained models, you should first install their requirements:
```
python -m deeppavlov install <path_to_config>
```


Then download the models and data for them:
```
python -m deeppavlov download <path_to_config>
```
Expand Down Expand Up @@ -441,4 +445,3 @@ DeepPavlov is built and maintained by [Neural Networks and Deep Learning Lab](ht
<p align="center">
<img src="https://ipavlov.ai/img/ipavlov_footer.png" width="50%" height="50%"/>
</p>

2 changes: 1 addition & 1 deletion deeppavlov/package_meta.py
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
__version__ = '0.0.5.3'
__version__ = '0.0.6b'
__author__ = 'Neural Networks and Deep Learning lab, MIPT'
Binary file modified dp_agnt_diag.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 3 additions & 3 deletions examples/tutorials/00_deeppavlov_intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -43,13 +43,13 @@
" \n",
" `cd DeepPavlov`\n",
"\n",
"- Install the requirements:\n",
"- Install basic requirements:\n",
"\n",
" `python setup.py develop`\n",
"\n",
"- Install spacy dependencies:\n",
"- Install packages required for these tutorials:\n",
"\n",
" `python -m spacy download en`\n",
" `python -m deeppavlov install gobot_dstc2`\n",
"\n"
]
},
Expand Down
2 changes: 1 addition & 1 deletion examples/tutorials/04_deeppavlov_chitchat.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -601,7 +601,7 @@
" else:\n",
" input_token_emb = tf.nn.embedding_lookup(embedding_matrix, output_token)\n",
"\n",
" \"\"\"\n",
" \"\"\"\n",
" ATTENTION MECHANISM\n",
" # here you can add attention to your model\n",
" # you can find details about attention further in tutorial\n",
Expand Down
10 changes: 7 additions & 3 deletions utils/pip_wrapper/pip_wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
log = get_logger(__name__)

_tf_re = re.compile(r'\s*tensorflow\s*([<=>;]|$)')
_spacy_re = re.compile(r'\s*spacy\s*([<=>;]|$)')


def install(*packages):
Expand All @@ -20,9 +21,12 @@ def install(*packages):
env=os.environ.copy()):
log.warn('found tensorflow-gpu installed, so upgrading it instead of tensorflow')
packages = [_tf_re.sub(r'tensorflow-gpu\1', package) for package in packages]
return subprocess.check_call([sys.executable, '-m', 'pip', 'install',
*[re.sub(r'\s', '', package) for package in packages]],
env=os.environ.copy())
result = subprocess.check_call([sys.executable, '-m', 'pip', 'install',
*[re.sub(r'\s', '', package) for package in packages]],
env=os.environ.copy())
if any(_spacy_re.match(package) for package in packages):
subprocess.check_call([sys.executable, '-m', 'spacy', 'download', 'en'], env=os.environ.copy())
return result


def install_from_config(config: [str, Path, dict]):
Expand Down

0 comments on commit 3f23f1e

Please sign in to comment.