def test_multi_model_user_mode_hosting_error(import_module, user_module_name,
                                             module_dir, start_model_server,
                                             mock_set_mms_config_file,
                                             mock_set_multi_model_env):
    serving.serving_entrypoint()
    start_model_server.assert_called_with(
        is_multi_model=True,
        handler_service='sagemaker_xgboost_container.handler_service',
        config_file=TEST_CONFIG_FILE)
def test_multi_model_algorithm_mode_hosting(start_model_server,
                                            mock_set_mms_config_file,
                                            mock_set_multi_model_env):
    serving.serving_entrypoint()
    start_model_server.assert_called_with(
        is_multi_model=True,
        handler_service=
        'sagemaker_xgboost_container.algorithm_mode.handler_service',
        config_file=TEST_CONFIG_FILE)
Esempio n. 3
0
def test_serving_entrypoint_start_mms(mock_start_mxnet_model_server):
    serving.serving_entrypoint()
    mock_start_mxnet_model_server.assert_called_once()
Esempio n. 4
0
def test_serving_entrypoint_start_gunicorn(mock_server):
    mock_server.start = MagicMock()
    serving.serving_entrypoint()
    mock_server.start.assert_called_once()