Пример #1
0
async def test_model_metadata(inference_service_stub, sum_model_settings):
    req = pb.ModelMetadataRequest(name=sum_model_settings.name,
                                  version=sum_model_settings.version)
    response = await inference_service_stub.ModelMetadata(req)

    assert response.name == sum_model_settings.name
    assert response.platform == sum_model_settings.platform
    assert response.versions == sum_model_settings.versions
Пример #2
0
async def test_model_repository_unload(inference_service_stub,
                                       model_repository_service_stub,
                                       sum_model_settings):
    unload_request = mr_pb.RepositoryModelUnloadRequest(
        model_name=sum_model_settings.name)
    await model_repository_service_stub.RepositoryModelUnload(unload_request)

    with pytest.raises(grpc.RpcError):
        await inference_service_stub.ModelMetadata(
            pb.ModelMetadataRequest(name=sum_model_settings.name))
Пример #3
0
async def test_model_repository_load(inference_service_stub,
                                     model_repository_service_stub,
                                     sum_model_settings):
    await model_repository_service_stub.RepositoryModelUnload(
        mr_pb.RepositoryModelLoadRequest(model_name=sum_model_settings.name))

    load_request = mr_pb.RepositoryModelLoadRequest(
        model_name=sum_model_settings.name)
    await model_repository_service_stub.RepositoryModelLoad(load_request)

    response = await inference_service_stub.ModelMetadata(
        pb.ModelMetadataRequest(name=sum_model_settings.name))

    assert response.name == sum_model_settings.name