/** * Copyright Amazon.com, Inc. or its affiliates. All Rights Reserved. * SPDX-License-Identifier: Apache-2.0. */ #pragma once #include #include #include namespace Aws { namespace Utils { namespace Json { class JsonValue; class JsonView; } // namespace Json } // namespace Utils namespace SageMaker { namespace Model { /** *

Specifies additional configuration for hosting multi-model * endpoints.

See Also:

AWS * API Reference

*/ class MultiModelConfig { public: AWS_SAGEMAKER_API MultiModelConfig(); AWS_SAGEMAKER_API MultiModelConfig(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API MultiModelConfig& operator=(Aws::Utils::Json::JsonView jsonValue); AWS_SAGEMAKER_API Aws::Utils::Json::JsonValue Jsonize() const; /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline const ModelCacheSetting& GetModelCacheSetting() const{ return m_modelCacheSetting; } /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline bool ModelCacheSettingHasBeenSet() const { return m_modelCacheSettingHasBeenSet; } /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline void SetModelCacheSetting(const ModelCacheSetting& value) { m_modelCacheSettingHasBeenSet = true; m_modelCacheSetting = value; } /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline void SetModelCacheSetting(ModelCacheSetting&& value) { m_modelCacheSettingHasBeenSet = true; m_modelCacheSetting = std::move(value); } /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline MultiModelConfig& WithModelCacheSetting(const ModelCacheSetting& value) { SetModelCacheSetting(value); return *this;} /** *

Whether to cache models for a multi-model endpoint. By default, multi-model * endpoints cache models so that a model does not have to be loaded into memory * each time it is invoked. Some use cases do not benefit from model caching. For * example, if an endpoint hosts a large number of models that are each invoked * infrequently, the endpoint might perform better if you disable model caching. To * disable model caching, set the value of this parameter to * Disabled.

*/ inline MultiModelConfig& WithModelCacheSetting(ModelCacheSetting&& value) { SetModelCacheSetting(std::move(value)); return *this;} private: ModelCacheSetting m_modelCacheSetting; bool m_modelCacheSettingHasBeenSet = false; }; } // namespace Model } // namespace SageMaker } // namespace Aws