(
response_body: bytes, tmp_path_factory: TempPathFactory
)
| 438 | |
| 439 | |
| 440 | def 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 | |
| 456 | async def test_train_with_yaml( |
no test coverage detected
searching dependent graphs…