rasa-pro 3.10.15__py3-none-any.whl → 3.11.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of rasa-pro might be problematic. Click here for more details.
- rasa/__main__.py +31 -15
- rasa/api.py +12 -2
- rasa/cli/arguments/default_arguments.py +24 -4
- rasa/cli/arguments/run.py +15 -0
- rasa/cli/arguments/shell.py +5 -1
- rasa/cli/arguments/train.py +17 -9
- rasa/cli/evaluate.py +7 -7
- rasa/cli/inspect.py +19 -7
- rasa/cli/interactive.py +1 -0
- rasa/cli/project_templates/calm/config.yml +5 -7
- rasa/cli/project_templates/calm/endpoints.yml +15 -2
- rasa/cli/project_templates/tutorial/config.yml +8 -5
- rasa/cli/project_templates/tutorial/data/flows.yml +1 -1
- rasa/cli/project_templates/tutorial/data/patterns.yml +5 -0
- rasa/cli/project_templates/tutorial/domain.yml +14 -0
- rasa/cli/project_templates/tutorial/endpoints.yml +5 -0
- rasa/cli/run.py +7 -0
- rasa/cli/scaffold.py +4 -2
- rasa/cli/studio/upload.py +0 -15
- rasa/cli/train.py +14 -53
- rasa/cli/utils.py +14 -11
- rasa/cli/x.py +7 -7
- rasa/constants.py +3 -1
- rasa/core/actions/action.py +77 -33
- rasa/core/actions/action_hangup.py +29 -0
- rasa/core/actions/action_repeat_bot_messages.py +89 -0
- rasa/core/actions/e2e_stub_custom_action_executor.py +5 -1
- rasa/core/actions/http_custom_action_executor.py +4 -0
- rasa/core/agent.py +2 -2
- rasa/core/brokers/kafka.py +3 -1
- rasa/core/brokers/pika.py +3 -1
- rasa/core/channels/__init__.py +10 -6
- rasa/core/channels/channel.py +41 -4
- rasa/core/channels/development_inspector.py +150 -46
- rasa/core/channels/inspector/README.md +1 -1
- rasa/core/channels/inspector/dist/assets/{arc-b6e548fe.js → arc-bc141fb2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{c4Diagram-d0fbc5ce-fa03ac9e.js → c4Diagram-d0fbc5ce-be2db283.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-936ed81e-ee67392a.js → classDiagram-936ed81e-55366915.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{classDiagram-v2-c3cb15f1-9b283fae.js → classDiagram-v2-c3cb15f1-bb529518.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{createText-62fc7601-8b6fcc2a.js → createText-62fc7601-b0ec81d6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{edges-f2ad444c-22e77f4f.js → edges-f2ad444c-6166330c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{erDiagram-9d236eb7-60ffc87f.js → erDiagram-9d236eb7-5ccc6a8e.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDb-1972c806-9dd802e4.js → flowDb-1972c806-fca3bfe4.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{flowDiagram-7ea5b25a-5fa1912f.js → flowDiagram-7ea5b25a-4739080f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-736177bf.js +1 -0
- rasa/core/channels/inspector/dist/assets/{flowchart-elk-definition-abe16c3d-622a1fd2.js → flowchart-elk-definition-abe16c3d-7c1b0e0f.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{ganttDiagram-9b5ea136-e285a63a.js → ganttDiagram-9b5ea136-772fd050.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{gitGraphDiagram-99d0ae7c-f237bdca.js → gitGraphDiagram-99d0ae7c-8eae1dc9.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{index-2c4b9a3b-4b03d70e.js → index-2c4b9a3b-f55afcdf.js} +1 -1
- rasa/core/channels/inspector/dist/assets/index-e7cef9de.js +1317 -0
- rasa/core/channels/inspector/dist/assets/{infoDiagram-736b4530-72a0fa5f.js → infoDiagram-736b4530-124d4a14.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{journeyDiagram-df861f2b-82218c41.js → journeyDiagram-df861f2b-7c4fae44.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{layout-78cff630.js → layout-b9885fb6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{line-5038b469.js → line-7c59abb6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{linear-c4fc4098.js → linear-4776f780.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{mindmap-definition-beec6740-c33c8ea6.js → mindmap-definition-beec6740-2332c46c.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{pieDiagram-dbbf0591-a8d03059.js → pieDiagram-dbbf0591-8fb39303.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{quadrantDiagram-4d7f4fd6-6a0e56b2.js → quadrantDiagram-4d7f4fd6-3c7180a2.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{requirementDiagram-6fc4c22a-2dc7c7bd.js → requirementDiagram-6fc4c22a-e910bcb8.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sankeyDiagram-8f13d901-2360fe39.js → sankeyDiagram-8f13d901-ead16c89.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{sequenceDiagram-b655622a-41b9f9ad.js → sequenceDiagram-b655622a-29a02a19.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-59f0c015-0aad326f.js → stateDiagram-59f0c015-042b3137.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{stateDiagram-v2-2b26beab-9847d984.js → stateDiagram-v2-2b26beab-2178c0f3.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-080da4f6-564d890e.js → styles-080da4f6-23ffa4fc.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-3dcbcfbf-38957613.js → styles-3dcbcfbf-94f59763.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{styles-9c745c82-f0fc6921.js → styles-9c745c82-78a6bebc.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{svgDrawCommon-4835440b-ef3c5a77.js → svgDrawCommon-4835440b-eae2a6f6.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{timeline-definition-5b62e21b-bf3e91c1.js → timeline-definition-5b62e21b-5c968d92.js} +1 -1
- rasa/core/channels/inspector/dist/assets/{xychartDiagram-2b33534f-4d4026c0.js → xychartDiagram-2b33534f-fd3db0d5.js} +1 -1
- rasa/core/channels/inspector/dist/index.html +18 -15
- rasa/core/channels/inspector/index.html +17 -14
- rasa/core/channels/inspector/package.json +5 -1
- rasa/core/channels/inspector/src/App.tsx +118 -68
- rasa/core/channels/inspector/src/components/Chat.tsx +95 -0
- rasa/core/channels/inspector/src/components/DiagramFlow.tsx +11 -10
- rasa/core/channels/inspector/src/components/DialogueStack.tsx +10 -25
- rasa/core/channels/inspector/src/components/LoadingSpinner.tsx +6 -3
- rasa/core/channels/inspector/src/helpers/audiostream.ts +165 -0
- rasa/core/channels/inspector/src/helpers/formatters.test.ts +10 -0
- rasa/core/channels/inspector/src/helpers/formatters.ts +107 -41
- rasa/core/channels/inspector/src/helpers/utils.ts +92 -7
- rasa/core/channels/inspector/src/types.ts +21 -1
- rasa/core/channels/inspector/yarn.lock +94 -1
- rasa/core/channels/rest.py +51 -46
- rasa/core/channels/socketio.py +28 -1
- rasa/core/channels/telegram.py +1 -1
- rasa/core/channels/twilio.py +1 -1
- rasa/core/channels/{audiocodes.py → voice_ready/audiocodes.py} +122 -69
- rasa/core/channels/{voice_aware → voice_ready}/jambonz.py +26 -8
- rasa/core/channels/{voice_aware → voice_ready}/jambonz_protocol.py +57 -5
- rasa/core/channels/{twilio_voice.py → voice_ready/twilio_voice.py} +64 -28
- rasa/core/channels/voice_ready/utils.py +37 -0
- rasa/core/channels/voice_stream/asr/__init__.py +0 -0
- rasa/core/channels/voice_stream/asr/asr_engine.py +89 -0
- rasa/core/channels/voice_stream/asr/asr_event.py +18 -0
- rasa/core/channels/voice_stream/asr/azure.py +129 -0
- rasa/core/channels/voice_stream/asr/deepgram.py +90 -0
- rasa/core/channels/voice_stream/audio_bytes.py +8 -0
- rasa/core/channels/voice_stream/browser_audio.py +107 -0
- rasa/core/channels/voice_stream/call_state.py +23 -0
- rasa/core/channels/voice_stream/tts/__init__.py +0 -0
- rasa/core/channels/voice_stream/tts/azure.py +106 -0
- rasa/core/channels/voice_stream/tts/cartesia.py +118 -0
- rasa/core/channels/voice_stream/tts/tts_cache.py +27 -0
- rasa/core/channels/voice_stream/tts/tts_engine.py +58 -0
- rasa/core/channels/voice_stream/twilio_media_streams.py +173 -0
- rasa/core/channels/voice_stream/util.py +57 -0
- rasa/core/channels/voice_stream/voice_channel.py +427 -0
- rasa/core/information_retrieval/qdrant.py +1 -0
- rasa/core/nlg/contextual_response_rephraser.py +45 -17
- rasa/{nlu → core}/persistor.py +203 -68
- rasa/core/policies/enterprise_search_policy.py +119 -63
- rasa/core/policies/flows/flow_executor.py +15 -22
- rasa/core/policies/intentless_policy.py +83 -28
- rasa/core/processor.py +25 -0
- rasa/core/run.py +12 -2
- rasa/core/secrets_manager/constants.py +4 -0
- rasa/core/secrets_manager/factory.py +8 -0
- rasa/core/secrets_manager/vault.py +11 -1
- rasa/core/training/interactive.py +33 -34
- rasa/core/utils.py +47 -21
- rasa/dialogue_understanding/coexistence/llm_based_router.py +41 -14
- rasa/dialogue_understanding/commands/__init__.py +6 -0
- rasa/dialogue_understanding/commands/repeat_bot_messages_command.py +60 -0
- rasa/dialogue_understanding/commands/session_end_command.py +61 -0
- rasa/dialogue_understanding/commands/user_silence_command.py +59 -0
- rasa/dialogue_understanding/commands/utils.py +5 -0
- rasa/dialogue_understanding/generator/constants.py +2 -0
- rasa/dialogue_understanding/generator/flow_retrieval.py +47 -9
- rasa/dialogue_understanding/generator/llm_based_command_generator.py +38 -15
- rasa/dialogue_understanding/generator/llm_command_generator.py +1 -1
- rasa/dialogue_understanding/generator/multi_step/multi_step_llm_command_generator.py +35 -13
- rasa/dialogue_understanding/generator/single_step/command_prompt_template.jinja2 +3 -0
- rasa/dialogue_understanding/generator/single_step/single_step_llm_command_generator.py +60 -13
- rasa/dialogue_understanding/patterns/default_flows_for_patterns.yml +53 -0
- rasa/dialogue_understanding/patterns/repeat.py +37 -0
- rasa/dialogue_understanding/patterns/user_silence.py +37 -0
- rasa/dialogue_understanding/processor/command_processor.py +21 -1
- rasa/e2e_test/aggregate_test_stats_calculator.py +1 -11
- rasa/e2e_test/assertions.py +136 -61
- rasa/e2e_test/assertions_schema.yml +23 -0
- rasa/e2e_test/e2e_test_case.py +85 -6
- rasa/e2e_test/e2e_test_runner.py +2 -3
- rasa/engine/graph.py +0 -1
- rasa/engine/loader.py +12 -0
- rasa/engine/recipes/config_files/default_config.yml +0 -3
- rasa/engine/recipes/default_recipe.py +0 -1
- rasa/engine/recipes/graph_recipe.py +0 -1
- rasa/engine/runner/dask.py +2 -2
- rasa/engine/storage/local_model_storage.py +12 -42
- rasa/engine/storage/storage.py +1 -5
- rasa/engine/validation.py +527 -74
- rasa/model_manager/__init__.py +0 -0
- rasa/model_manager/config.py +40 -0
- rasa/model_manager/model_api.py +559 -0
- rasa/model_manager/runner_service.py +286 -0
- rasa/model_manager/socket_bridge.py +146 -0
- rasa/model_manager/studio_jwt_auth.py +86 -0
- rasa/model_manager/trainer_service.py +325 -0
- rasa/model_manager/utils.py +87 -0
- rasa/model_manager/warm_rasa_process.py +187 -0
- rasa/model_service.py +112 -0
- rasa/model_training.py +42 -23
- rasa/nlu/tokenizers/whitespace_tokenizer.py +3 -14
- rasa/server.py +4 -2
- rasa/shared/constants.py +60 -8
- rasa/shared/core/constants.py +13 -0
- rasa/shared/core/domain.py +107 -50
- rasa/shared/core/events.py +29 -0
- rasa/shared/core/flows/flow.py +5 -0
- rasa/shared/core/flows/flows_list.py +19 -6
- rasa/shared/core/flows/flows_yaml_schema.json +10 -0
- rasa/shared/core/flows/utils.py +39 -0
- rasa/shared/core/flows/validation.py +121 -0
- rasa/shared/core/flows/yaml_flows_io.py +15 -27
- rasa/shared/core/slots.py +5 -0
- rasa/shared/importers/importer.py +59 -41
- rasa/shared/importers/multi_project.py +23 -11
- rasa/shared/importers/rasa.py +12 -3
- rasa/shared/importers/remote_importer.py +196 -0
- rasa/shared/importers/utils.py +3 -1
- rasa/shared/nlu/training_data/formats/rasa_yaml.py +18 -3
- rasa/shared/nlu/training_data/training_data.py +18 -19
- rasa/shared/providers/_configs/litellm_router_client_config.py +220 -0
- rasa/shared/providers/_configs/model_group_config.py +167 -0
- rasa/shared/providers/_configs/openai_client_config.py +1 -1
- rasa/shared/providers/_configs/rasa_llm_client_config.py +73 -0
- rasa/shared/providers/_configs/self_hosted_llm_client_config.py +1 -0
- rasa/shared/providers/_configs/utils.py +16 -0
- rasa/shared/providers/_utils.py +79 -0
- rasa/shared/providers/embedding/_base_litellm_embedding_client.py +13 -29
- rasa/shared/providers/embedding/azure_openai_embedding_client.py +54 -21
- rasa/shared/providers/embedding/default_litellm_embedding_client.py +24 -0
- rasa/shared/providers/embedding/litellm_router_embedding_client.py +135 -0
- rasa/shared/providers/llm/_base_litellm_client.py +34 -22
- rasa/shared/providers/llm/azure_openai_llm_client.py +50 -29
- rasa/shared/providers/llm/default_litellm_llm_client.py +24 -0
- rasa/shared/providers/llm/litellm_router_llm_client.py +182 -0
- rasa/shared/providers/llm/rasa_llm_client.py +112 -0
- rasa/shared/providers/llm/self_hosted_llm_client.py +5 -29
- rasa/shared/providers/mappings.py +19 -0
- rasa/shared/providers/router/__init__.py +0 -0
- rasa/shared/providers/router/_base_litellm_router_client.py +183 -0
- rasa/shared/providers/router/router_client.py +73 -0
- rasa/shared/utils/common.py +40 -24
- rasa/shared/utils/health_check/__init__.py +0 -0
- rasa/shared/utils/health_check/embeddings_health_check_mixin.py +31 -0
- rasa/shared/utils/health_check/health_check.py +258 -0
- rasa/shared/utils/health_check/llm_health_check_mixin.py +31 -0
- rasa/shared/utils/io.py +27 -6
- rasa/shared/utils/llm.py +353 -43
- rasa/shared/utils/schemas/events.py +2 -0
- rasa/shared/utils/schemas/model_config.yml +0 -10
- rasa/shared/utils/yaml.py +181 -38
- rasa/studio/data_handler.py +3 -1
- rasa/studio/upload.py +160 -74
- rasa/telemetry.py +94 -17
- rasa/tracing/config.py +3 -1
- rasa/tracing/instrumentation/attribute_extractors.py +95 -18
- rasa/tracing/instrumentation/instrumentation.py +121 -0
- rasa/utils/common.py +5 -0
- rasa/utils/endpoints.py +27 -1
- rasa/utils/io.py +8 -16
- rasa/utils/log_utils.py +9 -2
- rasa/utils/sanic_error_handler.py +32 -0
- rasa/validator.py +110 -4
- rasa/version.py +1 -1
- {rasa_pro-3.10.15.dist-info → rasa_pro-3.11.0.dist-info}/METADATA +14 -12
- {rasa_pro-3.10.15.dist-info → rasa_pro-3.11.0.dist-info}/RECORD +234 -183
- rasa/core/channels/inspector/dist/assets/flowDiagram-v2-855bc5b3-1844e5a5.js +0 -1
- rasa/core/channels/inspector/dist/assets/index-a5d3e69d.js +0 -1040
- rasa/core/channels/voice_aware/utils.py +0 -20
- rasa/llm_fine_tuning/notebooks/unsloth_finetuning.ipynb +0 -407
- /rasa/core/channels/{voice_aware → voice_ready}/__init__.py +0 -0
- /rasa/core/channels/{voice_native → voice_stream}/__init__.py +0 -0
- {rasa_pro-3.10.15.dist-info → rasa_pro-3.11.0.dist-info}/NOTICE +0 -0
- {rasa_pro-3.10.15.dist-info → rasa_pro-3.11.0.dist-info}/WHEEL +0 -0
- {rasa_pro-3.10.15.dist-info → rasa_pro-3.11.0.dist-info}/entry_points.txt +0 -0
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from __future__ import annotations
|
|
2
2
|
|
|
3
|
+
import logging
|
|
3
4
|
import shutil
|
|
4
5
|
import sys
|
|
5
6
|
import tempfile
|
|
@@ -7,21 +8,19 @@ import uuid
|
|
|
7
8
|
from contextlib import contextmanager
|
|
8
9
|
from datetime import datetime
|
|
9
10
|
from pathlib import Path
|
|
10
|
-
from typing import Generator, Optional, Text, Tuple, Union
|
|
11
|
-
|
|
12
|
-
import structlog
|
|
13
11
|
from tarsafe import TarSafe
|
|
12
|
+
from typing import Generator, Optional, Text, Tuple, Union
|
|
14
13
|
|
|
15
|
-
import rasa.model
|
|
16
|
-
import rasa.shared.utils.io
|
|
17
14
|
import rasa.utils.common
|
|
15
|
+
import rasa.shared.utils.io
|
|
16
|
+
from rasa.engine.storage.storage import ModelMetadata, ModelStorage
|
|
18
17
|
from rasa.engine.graph import GraphModelConfiguration
|
|
19
18
|
from rasa.engine.storage.resource import Resource
|
|
20
|
-
from rasa.engine.storage.storage import ModelMetadata, ModelStorage
|
|
21
19
|
from rasa.exceptions import UnsupportedModelVersionError
|
|
22
20
|
from rasa.shared.core.domain import Domain
|
|
21
|
+
import rasa.model
|
|
23
22
|
|
|
24
|
-
|
|
23
|
+
logger = logging.getLogger(__name__)
|
|
25
24
|
|
|
26
25
|
# Paths within model archive
|
|
27
26
|
MODEL_ARCHIVE_COMPONENTS_DIR = "components"
|
|
@@ -87,14 +86,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
87
86
|
cls._extract_archive_to_directory(
|
|
88
87
|
model_archive_path, temporary_directory_path
|
|
89
88
|
)
|
|
90
|
-
|
|
91
|
-
"local_model_storage.from_model_archive",
|
|
92
|
-
event_info=(
|
|
93
|
-
f"Extracted model '{model_archive_path}' to "
|
|
94
|
-
f"'{temporary_directory_path}'."
|
|
95
|
-
),
|
|
96
|
-
)
|
|
97
|
-
|
|
89
|
+
logger.debug(f"Extracted model to '{temporary_directory_path}'.")
|
|
98
90
|
cls._initialize_model_storage_from_model_archive(
|
|
99
91
|
temporary_directory_path, storage_path
|
|
100
92
|
)
|
|
@@ -150,10 +142,6 @@ class LocalModelStorage(ModelStorage):
|
|
|
150
142
|
temporary_directory: Path, storage_path: Path
|
|
151
143
|
) -> None:
|
|
152
144
|
for path in (temporary_directory / MODEL_ARCHIVE_COMPONENTS_DIR).glob("*"):
|
|
153
|
-
structlogger.debug(
|
|
154
|
-
"local_model_storage._initialize_model_storage_from_model_archive",
|
|
155
|
-
event_info=f"Moving '{path}' to '{storage_path}'.",
|
|
156
|
-
)
|
|
157
145
|
shutil.move(str(path), str(storage_path))
|
|
158
146
|
|
|
159
147
|
@staticmethod
|
|
@@ -167,10 +155,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
167
155
|
@contextmanager
|
|
168
156
|
def write_to(self, resource: Resource) -> Generator[Path, None, None]:
|
|
169
157
|
"""Persists data for a resource (see parent class for full docstring)."""
|
|
170
|
-
|
|
171
|
-
"local_model_storage.write_to.resource_write_requested",
|
|
172
|
-
event_info=f"Resource '{resource.name}' was requested for writing.",
|
|
173
|
-
)
|
|
158
|
+
logger.debug(f"Resource '{resource.name}' was requested for writing.")
|
|
174
159
|
directory = self._directory_for_resource(resource)
|
|
175
160
|
|
|
176
161
|
if not directory.exists():
|
|
@@ -178,10 +163,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
178
163
|
|
|
179
164
|
yield directory
|
|
180
165
|
|
|
181
|
-
|
|
182
|
-
"local_model_storage.write_to.resource_persisted",
|
|
183
|
-
event_info=f"Resource '{resource.name}' was persisted.",
|
|
184
|
-
)
|
|
166
|
+
logger.debug(f"Resource '{resource.name}' was persisted.")
|
|
185
167
|
|
|
186
168
|
def _directory_for_resource(self, resource: Resource) -> Path:
|
|
187
169
|
return self._storage_path / resource.name
|
|
@@ -189,10 +171,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
189
171
|
@contextmanager
|
|
190
172
|
def read_from(self, resource: Resource) -> Generator[Path, None, None]:
|
|
191
173
|
"""Provides the data of a `Resource` (see parent class for full docstring)."""
|
|
192
|
-
|
|
193
|
-
"local_model_storage.read_from",
|
|
194
|
-
event_info=f"Resource '{resource.name}' was requested for reading.",
|
|
195
|
-
)
|
|
174
|
+
logger.debug(f"Resource '{resource.name}' was requested for reading.")
|
|
196
175
|
directory = self._directory_for_resource(resource)
|
|
197
176
|
|
|
198
177
|
if not directory.exists():
|
|
@@ -214,12 +193,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
214
193
|
domain: Domain,
|
|
215
194
|
) -> ModelMetadata:
|
|
216
195
|
"""Creates model package (see parent class for full docstring)."""
|
|
217
|
-
|
|
218
|
-
"local_model_storage.create_model_package.started",
|
|
219
|
-
event_info=(
|
|
220
|
-
f"Start to created model " f"package for path '{model_archive_path}'.",
|
|
221
|
-
),
|
|
222
|
-
)
|
|
196
|
+
logger.debug(f"Start to created model package for path '{model_archive_path}'.")
|
|
223
197
|
|
|
224
198
|
with windows_safe_temporary_directory() as temp_dir:
|
|
225
199
|
temporary_directory = Path(temp_dir)
|
|
@@ -240,10 +214,7 @@ class LocalModelStorage(ModelStorage):
|
|
|
240
214
|
with TarSafe.open(model_archive_path, "w:gz") as tar:
|
|
241
215
|
tar.add(temporary_directory, arcname="")
|
|
242
216
|
|
|
243
|
-
|
|
244
|
-
"local_model_storage.create_model_package.finished",
|
|
245
|
-
event_info=f"Model package created in path '{model_archive_path}'.",
|
|
246
|
-
)
|
|
217
|
+
logger.debug(f"Model package created in path '{model_archive_path}'.")
|
|
247
218
|
|
|
248
219
|
return model_metadata
|
|
249
220
|
|
|
@@ -267,7 +238,6 @@ class LocalModelStorage(ModelStorage):
|
|
|
267
238
|
predict_schema=model_configuration.predict_schema,
|
|
268
239
|
training_type=model_configuration.training_type,
|
|
269
240
|
project_fingerprint=rasa.model.project_fingerprint(),
|
|
270
|
-
spaces=model_configuration.spaces,
|
|
271
241
|
language=model_configuration.language,
|
|
272
242
|
core_target=model_configuration.core_target,
|
|
273
243
|
nlu_target=model_configuration.nlu_target,
|
rasa/engine/storage/storage.py
CHANGED
|
@@ -6,7 +6,7 @@ from contextlib import contextmanager
|
|
|
6
6
|
from dataclasses import dataclass
|
|
7
7
|
from datetime import datetime
|
|
8
8
|
from pathlib import Path
|
|
9
|
-
from typing import
|
|
9
|
+
from typing import Tuple, Union, Text, Generator, Dict, Any, Optional
|
|
10
10
|
from packaging import version
|
|
11
11
|
|
|
12
12
|
from rasa.constants import MINIMUM_COMPATIBLE_VERSION
|
|
@@ -140,7 +140,6 @@ class ModelMetadata:
|
|
|
140
140
|
core_target: Optional[Text]
|
|
141
141
|
nlu_target: Text
|
|
142
142
|
language: Optional[Text]
|
|
143
|
-
spaces: Optional[List[Dict[Text, Any]]] = None
|
|
144
143
|
training_type: TrainingType = TrainingType.BOTH
|
|
145
144
|
|
|
146
145
|
def __post_init__(self) -> None:
|
|
@@ -170,7 +169,6 @@ class ModelMetadata:
|
|
|
170
169
|
"core_target": self.core_target,
|
|
171
170
|
"nlu_target": self.nlu_target,
|
|
172
171
|
"language": self.language,
|
|
173
|
-
"spaces": self.spaces,
|
|
174
172
|
}
|
|
175
173
|
|
|
176
174
|
@classmethod
|
|
@@ -198,6 +196,4 @@ class ModelMetadata:
|
|
|
198
196
|
core_target=serialized["core_target"],
|
|
199
197
|
nlu_target=serialized["nlu_target"],
|
|
200
198
|
language=serialized["language"],
|
|
201
|
-
# optional, since introduced later
|
|
202
|
-
spaces=serialized.get("spaces"),
|
|
203
199
|
)
|