Skip to content

Commit

Permalink
Add support for different recipes (#10641)
Browse files Browse the repository at this point in the history
* Add support for different recipes

Fixes #10473

* Update docs/docs/graph-recipe.mdx

Co-authored-by: Joe Juzl <[email protected]>
  • Loading branch information
Tayfun Sen and joejuzl authored Feb 2, 2022
1 parent 4f6af88 commit 6339856
Show file tree
Hide file tree
Showing 42 changed files with 1,818 additions and 614 deletions.
7 changes: 7 additions & 0 deletions changelog/10473.feature.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
Support other recipe types.

This pull request also adds support for graph recipes, see details at
https://rasa.com/docs/rasa/model-configuration and check Graph Recipe page.

Graph recipe is a raw format for specifying executed graph directly. This is
useful if you need a more powerful way to specify your model creation.
73 changes: 73 additions & 0 deletions data/graph_schemas/graph_config_short_predict_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
nodes:
nlu_message_converter:
needs:
messages: __message__
uses: rasa.graph_components.converters.nlu_message_converter.NLUMessageConverter
constructor_name: load
fn: convert_user_message
config: {}
eager: true
is_target: false
is_input: false
resource: null
custom_nlu_target:
needs:
messages: nlu_message_converter
domain: domain_provider
uses: rasa.nlu.classifiers.regex_message_handler.RegexMessageHandler
constructor_name: load
fn: process
config: {}
eager: true
is_target: false
is_input: false
resource: null
domain_provider:
needs: {}
uses: rasa.graph_components.providers.domain_provider.DomainProvider
constructor_name: load
fn: provide_inference
config: {}
eager: true
is_target: false
is_input: false
resource:
name: domain_provider
run_MemoizationPolicy0:
needs:
domain: domain_provider
tracker: __tracker__
rule_only_data: rule_only_data_provider
uses: rasa.core.policies.memoization.MemoizationPolicy
constructor_name: load
fn: predict_action_probabilities
config: {}
eager: true
is_target: false
is_input: false
resource:
name: train_MemoizationPolicy0
rule_only_data_provider:
needs: {}
uses: rasa.graph_components.providers.rule_only_provider.RuleOnlyDataProvider
constructor_name: load
fn: provide
config: {}
eager: true
is_target: false
is_input: false
resource:
name: train_RulePolicy1
custom_core_target:
needs:
policy0: run_MemoizationPolicy0
domain: domain_provider
tracker: __tracker__
uses: rasa.core.policies.ensemble.DefaultPolicyPredictionEnsemble
constructor_name: load
fn: combine_predictions_from_kwargs
config: {}
eager: true
is_target: false
is_input: false
resource: null
27 changes: 27 additions & 0 deletions data/graph_schemas/graph_config_short_train_schema.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
nodes:
finetuning_validator:
needs:
importer: __importer__
uses: rasa.graph_components.validators.finetuning_validator.FinetuningValidator
constructor_name: create
fn: validate
config:
validate_core: true
validate_nlu: true
eager: false
is_target: false
is_input: true
resource: null
nlu_training_data_provider:
needs:
importer: finetuning_validator
uses: rasa.graph_components.providers.nlu_training_data_provider.NLUTrainingDataProvider
constructor_name: create
fn: provide
config:
language: en
persist: false
eager: false
is_target: false
is_input: true
resource: null
Loading

0 comments on commit 6339856

Please sign in to comment.