dc6079821b
Docs Tests / Check for file changes (push) Has been cancelled
Docs Tests / Test Documentation (push) Has been cancelled
Docs Tests / Documentation Linting Checks (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.10, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.8, test-policies) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-performance) (push) Has been cancelled
Continuous Integration / Run Tests (windows-2022, 3.9, test-policies) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (ubuntu-24.04, 3.9) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.10) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.8) (push) Has been cancelled
Continuous Integration / Run Flaky Tests (windows-2022, 3.9) (push) Has been cancelled
Continuous Integration / Check for file changes (push) Has been cancelled
Continuous Integration / Wait for docs tests (push) Has been cancelled
Continuous Integration / Code Quality (push) Has been cancelled
Continuous Integration / Check for changelog (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-cli) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-core-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-full-model-training) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-featurizers) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-nlu-predictors) (push) Has been cancelled
Continuous Integration / Run Tests (ubuntu-24.04, 3.10, test-other-unit-tests) (push) Has been cancelled
Continuous Integration / Upload coverage reports to codeclimate (push) Has been cancelled
Continuous Integration / Run Non-Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Run Broker Integration Tests (push) Has been cancelled
Continuous Integration / Run Sequential Integration Tests (push) Has been cancelled
Continuous Integration / Build Docker base images and setup environment (push) Has been cancelled
Continuous Integration / Build Docker (default) (push) Has been cancelled
Continuous Integration / Build Docker (full) (push) Has been cancelled
Continuous Integration / Build Docker (mitie-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-de) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-en) (push) Has been cancelled
Continuous Integration / Build Docker (spacy-it) (push) Has been cancelled
Continuous Integration / Deploy to PyPI (push) Has been cancelled
Continuous Integration / Notify Slack & Publish Release Notes (push) Has been cancelled
Publish Documentation / Evaluate release tag (push) Has been cancelled
Publish Documentation / Prebuild Docs (push) Has been cancelled
Publish Documentation / Preview Docs (push) Has been cancelled
Publish Documentation / Check for file changes (push) Has been cancelled
Publish Documentation / Publish Docs (push) Has been cancelled
Automatic PR Merger / mergepal (push) Has been cancelled
CI Github Actions / Run Tests (push) Has been cancelled
Semgrep / Semgrep Workflow Security Scan (push) Has been cancelled
103 lines
3.1 KiB
Python
103 lines
3.1 KiB
Python
from rasa.utils.tensorflow.constants import EPOCHS
|
|
from typing import Any, Dict, List, Tuple, Text, Union
|
|
|
|
|
|
COMPONENTS_TEST_PARAMS = {
|
|
"DIETClassifier": {EPOCHS: 1},
|
|
"ResponseSelector": {EPOCHS: 1},
|
|
"LanguageModelFeaturizer": {
|
|
"model_name": "bert",
|
|
"model_weights": "bert-base-uncased",
|
|
},
|
|
}
|
|
|
|
|
|
def get_test_params_for_component(component: Text) -> Dict[Text, Union[Text, int]]:
|
|
return (
|
|
COMPONENTS_TEST_PARAMS[component] if component in COMPONENTS_TEST_PARAMS else {}
|
|
)
|
|
|
|
|
|
def as_pipeline(*components):
|
|
return [{**{"name": c}, **get_test_params_for_component(c)} for c in components]
|
|
|
|
|
|
def pipelines_for_tests() -> List[Tuple[Text, List[Dict[Text, Any]]]]:
|
|
# these templates really are just for testing
|
|
# every component should be in here so train-persist-load-use cycle can be
|
|
# tested they still need to be in a useful order - hence we can not simply
|
|
# generate this automatically.
|
|
|
|
# Create separate test pipelines for dense featurizers
|
|
# because they can't co-exist in the same pipeline together,
|
|
# as their tokenizers break the incoming message into different number of tokens.
|
|
|
|
# first is language followed by list of components
|
|
return [
|
|
("en", as_pipeline("KeywordIntentClassifier")),
|
|
(
|
|
"en",
|
|
as_pipeline(
|
|
"WhitespaceTokenizer",
|
|
"RegexFeaturizer",
|
|
"LexicalSyntacticFeaturizer",
|
|
"CountVectorsFeaturizer",
|
|
"CRFEntityExtractor",
|
|
"DucklingEntityExtractor",
|
|
"DIETClassifier",
|
|
"ResponseSelector",
|
|
"EntitySynonymMapper",
|
|
),
|
|
),
|
|
(
|
|
"en",
|
|
as_pipeline(
|
|
"SpacyNLP",
|
|
"SpacyTokenizer",
|
|
"SpacyFeaturizer",
|
|
"SpacyEntityExtractor",
|
|
"SklearnIntentClassifier",
|
|
),
|
|
),
|
|
(
|
|
"en",
|
|
as_pipeline(
|
|
"WhitespaceTokenizer", "LanguageModelFeaturizer", "DIETClassifier"
|
|
),
|
|
),
|
|
("fallback", as_pipeline("KeywordIntentClassifier", "FallbackClassifier")),
|
|
]
|
|
|
|
|
|
def pipelines_for_non_windows_tests() -> List[Tuple[Text, List[Dict[Text, Any]]]]:
|
|
# these templates really are just for testing
|
|
|
|
# because some of the components are not available on Windows, we specify pipelines
|
|
# containing them separately
|
|
|
|
# first is language followed by list of components
|
|
return [
|
|
(
|
|
"en",
|
|
as_pipeline(
|
|
"SpacyNLP", "SpacyTokenizer", "SpacyFeaturizer", "DIETClassifier"
|
|
),
|
|
),
|
|
(
|
|
"en",
|
|
as_pipeline(
|
|
"MitieNLP",
|
|
"MitieTokenizer",
|
|
"MitieFeaturizer",
|
|
"MitieIntentClassifier",
|
|
"RegexEntityExtractor",
|
|
),
|
|
),
|
|
(
|
|
"zh",
|
|
as_pipeline(
|
|
"MitieNLP", "JiebaTokenizer", "MitieFeaturizer", "MitieEntityExtractor"
|
|
),
|
|
),
|
|
]
|