Loading and Capturing Partial Data Sets
- You might be able to improve performance by populating only the input entities an execution mode requires, and capturing only the entities that it has changed when the model exits. This limits the amount of data that must be loaded and transmitted over the network, which can improve performance with large data sets.
- Similarly, you might be able to reduce the resource requirements of an execution mode by limiting the amount of data that must be read into memory.
- You might want to preserve results from previous model executions with different execution modes. If you have an execution mode that changes only a few entities from their initial values, you can choose to capture only those entities when the model exits. Other entities are unaffected, which means that result values from previous model executions are preserved. You can use this approach to overlay the results of multiple model runs using different execution modes.
To populate only the required entities from Insight, update the model as follows:
- In the app configuration, set the
partial_populate
flag toTrue
:@xi.AppConfig("My App", partial_populate=True, raise_attach_exceptions=True)
- In the exection mode implementation, call the
insight.populate()
function and pass a list of entity names or entity objects, as in this example:@xi.ExecModeLoad() def load(self): self.insight.populate(['profit', 'factories_frame'])
When the model runs using this execution mode, only the specified entities and any required index sets are populated. All other input entities retain their default initial values as defined by the model.
To capture only certain result entities when the model exits, call the insight.capture()
function and pass a list of entity names or entity objects, as in this example:
@xi.ExecModeRun()
def load(self):
self.insight.capture(['profit', 'factories_frame'])
When the model exits,
Xpress Insight captures and persists only the specified entities and any required index sets. All other entities retain their existing values.
insight.capture()
is optional. If you do not call
insight.capture()
, Insight will capture all result entities when the model exits.
© 2001-2025 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.