notice

This is documentation for Rasa X/Enterprise Documentation v1.2.x, which is no longer actively maintained.
For up-to-date documentation, see the latest version (1.4.x).

Version: 1.2.x

Set Up Integrated Version Control (IVC)

Integrated Version Control

Integrated Version Control encourages best practices by integrating itself into your existing development workflows. It lets you automate data synchronization with your Git repository, annotate new data and push those changes with Git.

In order to connect Rasa Enterprise with your assistant’s Git repository, you will need two things:

  1. A deployed Rasa Enterprise instance

  2. A Git repository containing a project in the default Rasa Open Source project layout

caution

When you connect your remote Git repository to Rasa Enterprise it will overwrite the training data which is currently stored in Rasa Enterprise. Please use a fresh Rasa Enterprise instance or export your training data if you want to keep the old training data.

Project Layout

For Rasa Enterprise to correctly visualize and modify your AI assistant’s data, your project needs to follow the default Rasa Open Source project layout created by rasa init:

.
├── config.yml
├── ...
├── data
│ ├── nlu.yml
│ ├── ...
│ └── stories.yml
└── domain.yml

Connect a Git Repository

You can connect your Git repository via the Rasa Enterprise UI. Rasa Enterprise currently only supports the GitHub, GitLab, and Bitbucket git platforms.

note

If you prefer to provide your own SSH keys, please see Integrated Version Control: Connecting a Repository via the API.

  1. To connect your Git repository, click on the branch icon and click Connect to a repository.

    Rasa Enterprise when no Git repository is currently connected
  2. Configure the repository connection.

    Rasa Enterprise can connect to a git repository via an SSH URL. Rasa Enterprise can connect over either SSH or HTTPS, and supports two-factor authentication for HTTPS connections.

    Add your SSH URL for repository in the input field.
  3. Configure your credentials.

    Add the provided public SSH key to your Git server. This allows Rasa Enterprise to authenticate with the Git server using its private SSH key. Please make sure to only give the key access to one specific repository instead of giving it global access to all of your Git repositories. For instructions specific to your Git platform, see below.
    GitHub:
    Add the generated public SSH key as a Deploy key to your GitHub repository. See the GitHub docs for more information on how to do so.
    GitLab:
    Add the generated public SSH key as a Deploy key to your GitLab repository. See the GitLab docs for more information on how to do so.
    Bitbucket:
    Add the generated public SSH key as an Access key to your Bitbucket repository. See the Bitbucket docs for more information on how to do so.
  4. Configure the repository branch.

  • Target branch: The target branch is the branch that Rasa Enterprise will:

    • Use to show the initial data.

    • Branch off from when you make new changes.

    • Return to after you discard or push changes.

  • By default users can choose if they want to push their changes directly to the target branch or to a new branch. If they want to disable pushing changes directly to the target branch, select Require users to add changes to a new branch.

    Rasa Enterprise when no Git repository is currently connected
  1. Once you have configured the repository credentials and the branch options, hit the Verify Connection button. Rasa Enterprise will now show that it is connected to your repository.

    Rasa Enterprise server with a connected Git repository

YAML Formatting Config

Changes to your training data will be persisted into YAML files within your training data repository.

Default sequence indentation

The default indent used during dumping of NLU training data files will be inferred from the file. For new files and in cases where Rasa Enterprise is unable to infer the right indent, it will fall back to the default indent.

The default indent can be configured using the DEFAULT_YAML_SEQUENCE_INDENT environment variable. The product defaults to DEFAULT_YAML_SEQUENCE_INDENT=4, which will lead to the following indentation:

nlu:
- intent: greeting
# ...

Another common choice for indentation is DEFAULT_YAML_SEQUENCE_INDENT=2 which outputs files in the following way like this:

nlu:
- intent: greeting
# ...

Speeding up YAML writing

Rasa Enterprise writes YAML files when persisting data from its databae to sync with a GIT repository. By default, a so called round-trip YAML reader/writer is used.

You can trade speed for the benefit of formatting by setting DISCARD_YAML_FORMATTING_ON_DUMP=true. Setting this environment variable will instruct Rasa Enterprise to use a different YAML parser, one implemented in C. The benefit is, that this YAML dumper is a lot faster - but it does not retain comments in your YAML file nor its formatting (e.g. additional new lines or a custom indentation). Setting DISCARD_YAML_FORMATTING_ON_DUMP=true will always use DEFAULT_YAML_SEQUENCE_INDENT=2.