Defining Custom Execution Resource Groups
ExecResourceGroup
class.
An execution resource group is a object in the app configuration that defines the resource requirements (threads and memory) for an execution mode. Each execution mode is associated with an execution resource group, which defines the resources that the model will consume when running in that mode.
Every app automatically supports the built-in DEFAULT
resource group, which specifies 1 thread and no memory limit. In addition, you can use the ExecResourceGroup
class to define custom resource groups, which you can then reference from your custom execution mode definitions.
A resource group specifies both default and minimum values. The default values define the resource requirements that will apply unless an administrator overrides them in order to take advantage of the resources available at run time. The minimum values define the lowest allowable value for any such overrides. In many cases, the default and minimum values are the same. (For more information about overriding the resource requirements defined by a resource group, see the Xpress Insight System Administrator Guide.)
![]() |
Note: If you have a model that has not yet been migrated to use resource groups, you can continue to use it. Any execution modes that are defined using the deprecated
threads property are implicitly mapped to automatically generated resource groups. For more information, see
Defining Custom Execution Modes.
|
- To define a custom resource group in your app configuration, use the
ExecResourceGroup
constructor, as in this example:@xi.AppConfig(name="My App", version=xi.AppVersion(1, 0, 0), exec_resource_groups=[ xi.ExecResourceGroup(name="mygroup", descr="My execution resource group", min_threads=1, default_threads=1, min_memory="1Gi", default_memory="2Gi")])
where:
-
descr
- A description of the purpose of the resource group. The description must be no longer than 2048 characters.
-
default_threads
-
The default number of threads for the resource group. This must be an integer between 1 and 255, and it must be greater than or equal to the
min_threads
value. -
min_threads
-
The minimum number of threads for the resource group. This must be an integer between 1 and 255, and it must be less than or equal to the
default_threads
value. -
default_memory
-
The default amount of memory for the resource group, expressed using Kubernetes conventions (an integer followed by
Mi
orGi
). -
min_memory
-
The minimum amount of memory for the resource group. This property defines the lowest value allowed if an administrator overrides the defaults, expressed using Kubernetes conventions (an integer followed by
Mi
orGi
.
-
© 2001-2024 Fair Isaac Corporation. All rights reserved. This documentation is the property of Fair Isaac Corporation (“FICO”). Receipt or possession of this documentation does not convey rights to disclose, reproduce, make derivative works, use, or allow others to use it except solely for internal evaluation purposes to determine whether to purchase a license to the software described in this documentation, or as otherwise set forth in a written software license agreement between you and FICO (or a FICO affiliate). Use of this documentation and the software described in it must conform strictly to the foregoing permitted uses, and no other use is permitted.