dataflow.get_running_instance_num
Applicability
Product |
Supported |
|---|---|
√ |
|
√ |
|
x |
|
x |
|
x |
Function Description
Obtains the number of running instances of the current UDF during execution. The information is sourced from the logic_device_list configuration in data_flow_deploy_info.json.
Prototype
1 | get_running_instance_num() |
Parameters
None
Returns
Number of running instances of the current UDF. The data type is int.
Examples
1 2 3 4 5 6 | import dataflow as df @df.pyflow def func(): print('running instance_num = ', df.get_running_instance_num()) return a + b |
Constraints
This API must be used with the pyflow decorator.
Parent topic: Runtime APIs