buerokratt / Training-Module

MIT License
2 stars 21 forks source link

Apply changes on Rasa NLU Model Configurations #100

Open turnerrainer opened 1 year ago

turnerrainer commented 1 year ago

AS AN Architect I WANT TO have a REST service to apply changes to Rasa NLU Model Configurations SO THAT there wouldn't be duplicate services for it

Acceptance Criteria

Examples

Sample Rasa config.yml


recipe: default.v1
language: et
pipeline:
   - name: WhitespaceTokenizer
   - name: RegexFeaturizer
   - name: LexicalSyntacticFeaturizer
   - name: CountVectorsFeaturizer
   - name: CountVectorsFeaturizer
     analyzer: char_wb
     min_ngram: 1
     max_ngram: 4
   - name: DIETClassifier
     entity_recognition: False
     epochs: 60
     random_seed: 50
   - name: RegexEntityExtractor
     case_sensitive: False
     use_regexes: True
   - name: FallbackClassifier
     threshold: 0.8

policies:
   - name: MemoizationPolicy
     priority: 3
   - name: TEDPolicy
     priority: 1
     max_history: 5
     epochs: 60
   - name: RulePolicy
     priority: 6
     core_fallback_threshold: 0.8
     enable_fallback_prediction: false
janyprus commented 1 year ago

sample input for /rasa/config/update

{
    "recipe": "default.v1",
    "language": "et",
    "pipeline": [
        {
            "name": "WhitespaceTokenizer"
        },
        {
            "name": "RegexFeaturizer"
        },
        {
            "name": "LexicalSyntacticFeaturizer"
        },
        {
            "name": "CountVectorsFeaturizer"
        },
        {
            "name": "CountVectorsFeaturizer",
            "analyzer": "char_wb",
            "min_ngram": 1,
            "max_ngram": 4
        },
        {
            "name": "DIETClassifier",
            "entity_recognition": false,
            "epochs": 60,
            "random_seed": 50
        },
        {
            "name": "RegexEntityExtractor",
            "case_sensitive": false,
            "use_regexes": true
        },
        {
            "name": "FallbackClassifier",
            "threshold": 0.8
        }
    ],
    "policies": [
        {
            "name": "MemoizationPolicy",
            "priority": 3
        },
        {
            "name": "TEDPolicy",
            "priority": 1,
            "max_history": 5,
            "epochs": 60
        },
        {
            "name": "RulePolicy",
            "priority": 6,
            "core_fallback_threshold": 0.8,
            "enable_fallback_prediction": false
        }
    ]
}
janyprus commented 1 year ago

Pull request #196