Skip to content

Commit bb58a50

Browse files
FedericoNegrigithub-actions[bot]
authored andcommitted
[create-pull-request] automated change
1 parent 296e99a commit bb58a50

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

src/ansys/hps/client/rms/models.py

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -295,6 +295,11 @@ class KubernetesKedaBackend(DictModel):
295295
description="Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.",
296296
title="Target Resource Kind",
297297
)
298+
use_keda_scaling: bool | None = Field(
299+
True,
300+
description="Whether to use Keda ScaledJobs and ScaledObjects, otherwise will use plain K8s Jobs and Deployments.",
301+
title="Use Keda Scaling",
302+
)
298303
service_name: str | None = Field(
299304
"ansys/rep/scaling",
300305
description="Service name to be used in prometheus query when fetching metric data.",
@@ -304,6 +309,11 @@ class KubernetesKedaBackend(DictModel):
304309

305310
class KubernetesResourceScaling(DictModel):
306311
plugin_name: Literal["kubernetes_resource_scaling"] = Field(..., title="Plugin Name")
312+
scaling_factor: int | None = Field(
313+
1,
314+
description="Number of tasks needed to launch each additional evaluator.",
315+
title="Scaling Factor",
316+
)
307317
target_resource_kind: str | None = Field(
308318
"job",
309319
description="Kubernetes resource kind that the scaler should target. Options are ``deployment``, ``job``, and ``statefulset``.",
@@ -341,6 +351,11 @@ class Machine(DictModel):
341351

342352
class MaxAvailableResourceScaling(DictModel):
343353
plugin_name: Literal["max_available_resource_scaling"] = Field(..., title="Plugin Name")
354+
scaling_factor: int | None = Field(
355+
1,
356+
description="Number of tasks needed to launch each additional evaluator.",
357+
title="Scaling Factor",
358+
)
344359
match_all_requirements: bool | None = Field(
345360
False,
346361
description="Whether scaling should work with available resource properties specified in the compute resource set (default) or require a match of all requirements of the task definition.",
@@ -592,6 +607,11 @@ class ScalerApplicationInfo(DictModel):
592607
description="Period to wait before scaling down the resource to 0 instances.",
593608
title="Cool Down Period",
594609
)
610+
scaling_factor: int | None = Field(
611+
None,
612+
description="Number of tasks needed to launch each additional evaluator.",
613+
title="Scaling Factor",
614+
)
595615
debug: bool | None = Field(
596616
None,
597617
description="Whether to enable additional debug logging and keep job working directories.",
@@ -866,6 +886,7 @@ class ComputeResourceSet(DictModel):
866886
scaling_strategy: MaxAvailableResourceScaling | KubernetesResourceScaling | None = Field(
867887
{
868888
"plugin_name": "max_available_resource_scaling",
889+
"scaling_factor": 1,
869890
"match_all_requirements": False,
870891
},
871892
description="Scaling strategy to use in the compute resource set.",

0 commit comments

Comments
 (0)