MCPcopy
hub / github.com/RasaHQ/rasa / assert_trained_model

Function assert_trained_model

tests/test_server.py:440–453  ·  view source on GitHub ↗
(
    response_body: bytes, tmp_path_factory: TempPathFactory
)

Source from the content-addressed store, hash-verified

438
439
440def assert_trained_model(
441 response_body: bytes, tmp_path_factory: TempPathFactory
442) -> None:
443 # save model to temporary file
444
445 model_path = str(Path(tmp_path_factory.mktemp("model_dir")) / "model.tar.gz")
446 with open(model_path, "wb") as f:
447 f.write(response_body)
448
449 storage_path = tmp_path_factory.mktemp("storage_path")
450 model_storage, model_metadata = LocalModelStorage.from_model_archive(
451 storage_path, model_path
452 )
453 assert model_metadata.model_id
454
455
456async def test_train_with_yaml(

Callers 2

test_train_with_yamlFunction · 0.85

Calls 1

from_model_archiveMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…