Skip to content

DevelopersGuide

dilyararimovna edited this page Sep 19, 2022 · 6 revisions

Pre-Reqs

Environment

Item Requirements Comments
OS Debian-based distribution, e.g., Ubuntu or Windows 10 This version was tested on Ubuntu 18.04 under WSL2 on Windows 11 and Windows 10.
Python v3.9+ This version was tested on OS with Python 3.9.
Docker v20+ This version was tested with Docker v20.10.7 (64-bit).
Docker-Compose v1.29.2 This version was tested with Docker-Compose v1.29.2.

Python Modules

Item Requirements Comments
lxml v4.6.3 This version was tested with lxml v4.6.3.

Dev Tools

  1. Download VS Code
  2. Download and install DF Designer (for editing DFF Skills)

Building Own Distribution

One may want to create their own distribution in two ways: adding new custom components or composing dialogue system from the existing components.

Adding new custom components

We prepared the video workshop "How to integrate a new component into a Dream-based multiskill AI Assistant".

Composing dialogue system from the existing components

We prepared the video workshop "How to design multiskill AI assistants with DeepPavlov Dream".

Now there is also a special tool for working with DeepPavlov Dream from CLI. Refer to DeepPavlov Dreamtools to create your own distribution from the existing components automatically using CLI.

Publishing Your Distribution

If you want to share your distribution with other Dream users, create a distribution directory in the /assistant_dists/ subdirectory, put your config files to the just created distribution's subdirectory in the /assistant_dists, and then submit it to this repository using a pull request from your fork repo.

  1. Fork github.com/deeppavlov/dream
  2. Clone it to your PC/Mac
  3. Create your branch from main
  4. Copy existing distribution (for example, assistant_dists/dream) to your own folder in assistant_dists/YOUR_DIST_NAME_HERE

Create Your Custom DFF Skill

  1. Run this command to make sure your DFF Skill will run locally on your PC/Mac while the rest would continue working through Dream Proxy: python utils/create_local_yml.py -s dff-template-skill -s convers-evaluation-selector
  2. Go to skills/dff-template-skill/scenario/main.py
  3. Edit it manually or use our DF Designer (extension for VS Code)

Debug Your Custom DFF Skill

  1. Talk to your distribution in console/terminal: docker-compose -f docker-compose.yml -f local.yml exec agent python -m deeppavlov_agent.run
  2. Look for logs of your Custom DFF Skill: docker-compose -f docker-compose.yml -f local.yml logs -f dff-template-skill

Check Tests For Your Custom DFF Skill

  1. Use this command to run tests: docker-compose -f docker-compose.yml -f local.yml exec dff-template-skill bash test.sh