Dialogy is a library for building and managing SLU applications. Documentation
pip install dialogy
Dialogy's CLI supports building and migration of projects. Migration is hard because a few modules need a forced update but a few others should be retained by the developer. The lack of this expression makes it hard to migrate smoothly. Building new projects should be fairly simple.
dialogy -h
usage: dialogy [-h] {create,update,train} ...
positional arguments:
{create,update,train}
Dialogy project utilities.
create Create a new project.
update Migrate an existing project to the latest template version.
train Train a workflow.
optional arguments:
-h, --help show this help message and exit
dialogy create -h
usage: dialogy create [-h] [--template TEMPLATE] [--dry-run] [--namespace NAMESPACE] [--master] project
positional arguments:
project A directory with this name will be created at the root of command invocation.
optional arguments:
-h, --help show this help message and exit
--template TEMPLATE
--dry-run Make no change to the directory structure.
--namespace NAMESPACE
The github/gitlab user or organization name where the template project lies.
--master Download the template's master branch (HEAD) instead of the latest tag.
To build SLU pipelines using Dialogy, you would need to understand the building blocks.
- Input
- Output
- Plugin
- Workflow
A class that contains initial values / placeholders for the pipeline.
A class that contains the results / placeholders for the pipeline.
- A Plugin is an abstract class with an abstract method
def utility(i: Input, o: Output) -> Any
. - Initialize your class with artifact paths, reading files, loading models, etc.
- At runtime we call the
utility
method to get the results.
- A workflow is a map over all the plugins in a sequence, as desired by the pipeline creator.
- The workflow iterates over each plugin, calls its
utility
method. - Each plugin sets the value within the workflow automatically.
make test
Clone the repository. We use poetry to setup dependencies.
git clone [email protected]:skit-ai/dialogy.git
cd dialogy
# Activate your virtualenv, you can also let poetry take care of it.
poetry install
make test
Ensure tests are passing before you start working on your PRs.
We follow semantic versioning to name new versions of the library.
All new versions are hosted on PyPI and automatically pushed to PyPI
once a new tag is pushed to git. For e.g. if you want to release a new version 2.1.3
on PyPI,
checkout master
branch, create a new tag and push the tag to github:
git checkout master
git pull
git tag -a '2.1.3' -m 'new example release'
git push -u origin 2.1.3
Note: The new architecture of SLU is supported only by dialogy versions 2.x.y
. For any SLU that is not on the new architecture would be using 0.x.y
versions.