Compute execution
ComputeExecutionMixin
¶
exec_app
staticmethod
¶
exec_app(inner_app, map_values=None, map_objs=None, return_keys=None, keys_to_render=None, show_inner_app_results=True, allow_override=False)
Runs an application from the library given the inputs provided in map_values or map_objs which maps the
resulting values from the objects already created. Use return_vars to map the variables created during the
inner_app execution to new objects.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ModuleType
|
This is the app to be loaded as an instance into the app. |
required |
|
Dict[str, object] | None
|
Dictionary with the app's input arguments. e.g. {"fck":30, "fcm":50}. Default = None. |
None
|
|
Dict[str, str] | None
|
Map the |
None
|
|
Dict[str, str] | None
|
Map the variable |
None
|
|
List[str] | None
|
List with the variables (output) names to include in the report. If "None" all variable names will be rendered. If you want to exclude all output, enter and empty list. Default=None. |
None
|
|
bool
|
Show the calculations of the loaded app in the report. Default=True. |
True
|
|
bool
|
[DEPRECATED] |
False
|
Returns:
| Type | Description |
|---|---|
None
|
None |
Examples:
1 2 3 4 5 6 | |
run_batch
staticmethod
¶
run_batch(inner_app, df, keys_to_append)
Runs other applications within your app collection in a batch mode. The variables provided in the form of a pandas dataframe.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
|
ModuleType
|
Provide the type of the app to be executed within this host app |
required |
|
Dataframe
|
Provide a dataframe of all the input variables required to execute the "inner_app". Each column should be named identically with the variable name. NB: Default variables will be used if not all the parameters are supplied in the dataframe. |
required |
|
List[str]
|
Provide a list of strings that are the variable names generated when the "inner_app" is executed the resulting values are appended to the dataframe. |
required |
Returns:
| Type | Description |
|---|---|
DataFrame
|
pd.Dataframe |
Examples:
1 2 3 4 5 6 7 8 9 | |