From f8a256af31c8f0e062b9e1af336eb8141536879d Mon Sep 17 00:00:00 2001 From: ewezy Date: Fri, 19 Jan 2024 17:50:03 +0800 Subject: [PATCH] Add additional step to parse resource factors from config file to stored config --- api/config/environment.go | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/api/config/environment.go b/api/config/environment.go index d65f0005c..0673e7b1c 100644 --- a/api/config/environment.go +++ b/api/config/environment.go @@ -175,14 +175,16 @@ func ParseDeploymentConfig(envCfg *EnvironmentConfig, cfg *Config) DeploymentCon CPURequest: resource.MustParse(envCfg.DefaultTransformerConfig.CPURequest), MemoryRequest: resource.MustParse(envCfg.DefaultTransformerConfig.MemoryRequest), }, - MaxCPU: resource.MustParse(envCfg.MaxCPU), - MaxMemory: resource.MustParse(envCfg.MaxMemory), - TopologySpreadConstraints: envCfg.TopologySpreadConstraints, - QueueResourcePercentage: envCfg.QueueResourcePercentage, - PyfuncGRPCOptions: cfg.PyfuncGRPCOptions, - PodDisruptionBudget: envCfg.PodDisruptionBudget, - GPUs: envCfg.GPUs, - StandardTransformer: cfg.StandardTransformerConfig, - PyFuncPublisher: cfg.PyFuncPublisherConfig, + MaxCPU: resource.MustParse(envCfg.MaxCPU), + MaxMemory: resource.MustParse(envCfg.MaxMemory), + TopologySpreadConstraints: envCfg.TopologySpreadConstraints, + QueueResourcePercentage: envCfg.QueueResourcePercentage, + PyfuncGRPCOptions: cfg.PyfuncGRPCOptions, + PodDisruptionBudget: envCfg.PodDisruptionBudget, + GPUs: envCfg.GPUs, + StandardTransformer: cfg.StandardTransformerConfig, + PyFuncPublisher: cfg.PyFuncPublisherConfig, + UserContainerCPULimitRequestFactor: cfg.InferenceServiceDefaults.UserContainerCPULimitRequestFactor, + UserContainerMemoryLimitRequestFactor: cfg.InferenceServiceDefaults.UserContainerMemoryLimitRequestFactor, } }