Skip to main content

Domain Management Tool

DMT (for short) is a collection of tools to manage your RASA domains like if they were packages not unlike pip with python but with YAML for RASA.

Installation

pip install dmt
# Or using
#pip install git+https://gitlab.com/waser-technologies/technologies/dmt.git

Usage

Use the dmt shortcut command.

❯ dmt --help
usage: dmt [-h] [-v] [-l] [-c] [-a ADD] [-s] [-V] [-T] [-S]

Domain Management Tool

optional arguments:
  -h, --help         show this help message and exit
  -v, --version      output version information and exit
  -l, --list         list installed domains
  -c, --create       Create a new domain from template
  -a ADD, --add ADD  git repository hosting a domain to add
  -s, --sync         Synchronize all installed domains
  -V, --validate     Validate all installed domains
  -T, --train        Train new model from all installed domains
  -S, --serve        Serve the lastest model
  -L LANG, --lang LANG  language to work with (defaults to your system preference: $LANG)

Find a domain using the tag #NLP Domains.

And add it.

dmt --add $domain_git_url

Now validate the domain's data with the installed ones.

dmt --validate

This will generate some warnings but that is ok most of the time. Unless you made the domain, in which case you should act upon them.

As long as there is not any error you can train a new model using your data. This will take time and computing resourses.

dmt --train

Or you could add, validate and train with a new domain in one line.

dmt -V -T -a $domain_git_url

Once trained, you should be able to serve the latest model using the dmt.

dmt --serve

Or by enabling its service.

cp ./dmt.service.example /usr/lib/systemd/user/dmt.service
systemctl --user enable --now dmt.service

You can also import those tools from python.

#!/usr/bin/env python3

from domain.management import tools as dmt
# Where are your domains installed?
INSTALL_PATH="/usr/share/assistant"

# install a new domain from a local repo
path_to_new_domain = "smalltalk" # git clone https://gitlab.com/waser-technologies/data/nlu/en/smalltalk.git ./smalltalk
domains_path = f"{INSTALL_PATH}/domains/en"
dmt.install_domain(tmp_domain, domains_path)

# Get list of installed domains
list_installed_domains = dmt.get_list_installed_domains(domains_path)

# Validate all domains combined
dmt.validate_data(INSTALL_PATH, domains="domains/en", data="data/en", config="configs/en/config.yml")

# Train new model on all domains
dmt.train_lm(INSTALL_PATH, domains="domains/en", data="data/en", config="configs/en/config.yml", models="models/en/NLU")

# Serve the new model
dmt.models_as_service()

Creating your own domains

DMT allows you to quickly start a new domain from a template.

dmt --create

Once hosted, you can use the --add flag to install your domain.

With python.

from domain.management import tools as dmt

dmt.bake_cookie_domain(recipe_url="https://gitlab.com/waser-technologies/cookiecutters/nlu-domain-template")

Metadata

Release files for dmt 1.5.8

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dmt 1.5.8
File Size Uploaded
dmt-1.5.8.tar.gz 23.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dmt 1.5.8
File Interpreter ABI Platform
dmt-1.5.8-py3-none-any.whl Python 3 none any Details

Total release size: 46.7 kB

Release files / dmt-1.5.8.tar.gz

Download URL dmt-1.5.8.tar.gz
Size 23.4 kB
Tags Source
SHA-256 checksum
How to use checksums
2f48642671d71b6bbc106520796ada3bbfd2434e6be5cd85a08a185f43206aaf
BLAKE2b-256 checksum
How to use checksums
3195dc840536feaf021c76d3e5ec55879a620510e8061ff6722364c664adb644
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.10

Release files / dmt-1.5.8-py3-none-any.whl

Download URL dmt-1.5.8-py3-none-any.whl
Size 23.3 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3348766e55ddbed8523103657733b11ace6951702e88bbc3c6de29c23428bf48
BLAKE2b-256 checksum
How to use checksums
b08d055d1395f2366b10808a34e55238362857ef15af3eef188dc6fe59de8c73
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.1 CPython/3.10.10

Release history Release notifications | RSS feed

This release

1.5.8 This release

2 release files

1.5.7

2 release files

1.5.6

2 release files

1.5.5

2 release files

1.5.4

2 release files

1.5.3

2 release files

1.5.2

2 release files

1.5.1

2 release files

1.5.0

2 release files

1.4.83

2 release files

1.4.82

2 release files

1.4.81

2 release files

1.4.9

2 release files

1.4.8

2 release files

1.4.7

2 release files

1.4.6

2 release files

1.4.5

2 release files

1.4.4

2 release files

1.4.3

2 release files

1.4.2

2 release files

1.4.1

2 release files

1.4.0

2 release files

1.3.6

2 release files

1.3.5

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page