|
2 | 2 |
|
3 | 3 | Below you can find the changelog for Execution Engine. |
4 | 4 |
|
5 | | -## Execution Engine `v1.2.0` | inference `v0.23.0` |
6 | | - |
7 | | -* The [`video_metadata` kind](/workflows/kinds/video_metadata.md) has been deprecated, and we **strongly recommend discontinuing its use for building |
8 | | -blocks moving forward**. As an alternative, the [`image` kind](/workflows/kinds/image.md) has been extended to support the same metadata as |
9 | | -[`video_metadata` kind](/workflows/kinds/video_metadata.md), which can now be provided optionally. This update is |
10 | | -**non-breaking** for existing blocks, but **some older blocks** that produce images **may become incompatible** with |
11 | | -**future** video processing blocks. |
12 | | - |
13 | | -??? warning "Potential blocks incompatibility" |
| 5 | +## Execution Engine `v1.5.0` | inference `v0.38.0` |
14 | 6 |
|
15 | | - As previously mentioned, adding `video_metadata` as an optional field to the internal representation of |
16 | | - [`image` kind](/workflows/kinds/image.md) (`WorkflowImageData` class) |
17 | | - may introduce some friction between existing blocks that output the [`image` kind](/workflows/kinds/image.md) and |
18 | | - future video processing blocks that rely on `video_metadata` being part of `image` representation. |
19 | | - |
20 | | - The issue arises because, while we can provide **default** values for `video_metadata` in `image` without |
21 | | - explicitly copying them from the input, any non-default metadata that was added upstream may be lost. |
22 | | - This can lead to downstream blocks that depend on the `video_metadata` not functioning as expected. |
| 7 | +!!! Note "Change does not require any action" |
| 8 | + |
| 9 | + This change does not require any change from Workflows users. This is just performance optimisation. |
23 | 10 |
|
24 | | - We've updated all existing `roboflow_core` blocks to account for this, but blocks created before this change in |
25 | | - external repositories may cause issues in workflows where their output images are used by video processing blocks. |
| 11 | +* Exposed new parameter in the init method of `BaseExecutionEngine` class - `executor` which can accept instance of |
| 12 | +Python `ThreadPoolExecutor` to be used by execution engine. Thanks to this change, processing should be faster, as |
| 13 | +each `BaseExecutionEngine.run(...)` will not require dedicated instance of `ThreadPoolExecutor` as it was so far. |
| 14 | +Additionally, we are significantly limiting threads spawning which may also be a benefit in some installations. |
26 | 15 |
|
| 16 | +* Despite the change, Execution Engine maintains the limit of concurrently executed steps - by limiting the number of |
| 17 | +steps that run through the executor at a time (since Execution Engine is no longer in control of `ThreadPoolExecutor` |
| 18 | +creation, and it is possible for the pool to have more workers available). |
27 | 19 |
|
28 | | -* While the deprecated [`video_metadata` kind](/workflows/kinds/video_metadata.md) is still available for use, it will be fully removed in |
29 | | -Execution Engine version `v2.0.0`. |
| 20 | +??? Hint "How to inject `ThreadPoolExecutor` to Execution Engine?" |
| 21 | + |
| 22 | + ```python |
| 23 | + from concurrent.futures import ThreadPoolExecutor |
| 24 | + workflow_init_parameters = { ... } |
| 25 | + with ThreadPoolExecutor(max_workers=...) as thread_pool_executor: |
| 26 | + execution_engine = ExecutionEngine.init( |
| 27 | + init_parameters=workflow_init_parameters, |
| 28 | + max_concurrent_steps=4, |
| 29 | + workflow_id="your-workflow-id", |
| 30 | + executor=thread_pool_executor, |
| 31 | + ) |
| 32 | + runtime_parameters = { |
| 33 | + "image": cv2.imread("your-image-path") |
| 34 | + } |
| 35 | + results = execution_engine.run(runtime_parameters=runtime_parameters) |
| 36 | + ``` |
30 | 37 |
|
31 | | -!!! warning "Breaking change planned - Execution Engine `v2.0.0`" |
| 38 | +## Execution Engine `v1.4.0` | inference `v0.29.0` |
32 | 39 |
|
33 | | - [`video_metadata` kind](/workflows/kinds/video_metadata.md) got deprecated and will be removed in `v2.0.0` |
| 40 | +* Added new kind - [`secret`](/workflows/kinds/secret.md) to represent credentials. **No action needed** for existing |
| 41 | +blocks, yet it is expected that over time blocks developers should use this kind, whenever block is to accept secret |
| 42 | +value as parameter. |
34 | 43 |
|
| 44 | +* Fixed issue with results serialization introduced in `v1.3.0` - by mistake, Execution Engine was not serializing |
| 45 | +non-batch oriented outputs. |
35 | 46 |
|
36 | | -* As a result of the changes mentioned above, the internal representation of the [`image` kind](/workflows/kinds/image.md) has been updated to |
37 | | -include a new `video_metadata` property. This property can be optionally set in the constructor; if not provided, |
38 | | -a default value with reasonable defaults will be used. To simplify metadata manipulation within blocks, we have |
39 | | -introduced two new class methods: `WorkflowImageData.copy_and_replace(...)` and `WorkflowImageData.create_crop(...)`. |
40 | | -For more details, refer to the updated [`WoorkflowImageData` usage guide](/workflows/internal_data_types.md#workflowimagedata). |
| 47 | +* Fixed Execution Engine bug with preparing inputs for steps. For non-SIMD steps before, while collecting inputs |
| 48 | +in runtime, `WorkflowBlockManifest.accepts_empty_input()` method result was being ignored - causing the bug when |
| 49 | +one non-SIMD step was feeding empty values to downstream blocks. Additionally, in the light of changes made in `v1.3.0`, |
| 50 | +thanks to which non-SIMD blocks can easily feed inputs for downstream SIMD steps - it is needed to check if |
| 51 | +upstream non-SIMD block yielded non-empty results (as SIMD block may not accept empty results). This check was added. |
| 52 | +**No action needed** for existing blocks, but this fix may fix previously broken Workflows. |
41 | 53 |
|
42 | 54 |
|
43 | 55 | ## Execution Engine `v1.3.0` | inference `v0.27.0` |
@@ -303,52 +315,41 @@ subsets of steps**, enabling building such tools as debuggers. |
303 | 315 | serializer/deserializer defined as the last one will be in use. |
304 | 316 |
|
305 | 317 |
|
306 | | -## Execution Engine `v1.4.0` | inference `v0.29.0` |
| 318 | +## Execution Engine `v1.2.0` | inference `v0.23.0` |
307 | 319 |
|
308 | | -* Added new kind - [`secret`](/workflows/kinds/secret.md) to represent credentials. **No action needed** for existing |
309 | | -blocks, yet it is expected that over time blocks developers should use this kind, whenever block is to accept secret |
310 | | -value as parameter. |
| 320 | +* The [`video_metadata` kind](/workflows/kinds/video_metadata.md) has been deprecated, and we **strongly recommend discontinuing its use for building |
| 321 | +blocks moving forward**. As an alternative, the [`image` kind](/workflows/kinds/image.md) has been extended to support the same metadata as |
| 322 | +[`video_metadata` kind](/workflows/kinds/video_metadata.md), which can now be provided optionally. This update is |
| 323 | +**non-breaking** for existing blocks, but **some older blocks** that produce images **may become incompatible** with |
| 324 | +**future** video processing blocks. |
311 | 325 |
|
312 | | -* Fixed issue with results serialization introduced in `v1.3.0` - by mistake, Execution Engine was not serializing |
313 | | -non-batch oriented outputs. |
| 326 | +??? warning "Potential blocks incompatibility" |
314 | 327 |
|
315 | | -* Fixed Execution Engine bug with preparing inputs for steps. For non-SIMD steps before, while collecting inputs |
316 | | -in runtime, `WorkflowBlockManifest.accepts_empty_input()` method result was being ignored - causing the bug when |
317 | | -one non-SIMD step was feeding empty values to downstream blocks. Additionally, in the light of changes made in `v1.3.0`, |
318 | | -thanks to which non-SIMD blocks can easily feed inputs for downstream SIMD steps - it is needed to check if |
319 | | -upstream non-SIMD block yielded non-empty results (as SIMD block may not accept empty results). This check was added. |
320 | | -**No action needed** for existing blocks, but this fix may fix previously broken Workflows. |
| 328 | + As previously mentioned, adding `video_metadata` as an optional field to the internal representation of |
| 329 | + [`image` kind](/workflows/kinds/image.md) (`WorkflowImageData` class) |
| 330 | + may introduce some friction between existing blocks that output the [`image` kind](/workflows/kinds/image.md) and |
| 331 | + future video processing blocks that rely on `video_metadata` being part of `image` representation. |
| 332 | + |
| 333 | + The issue arises because, while we can provide **default** values for `video_metadata` in `image` without |
| 334 | + explicitly copying them from the input, any non-default metadata that was added upstream may be lost. |
| 335 | + This can lead to downstream blocks that depend on the `video_metadata` not functioning as expected. |
321 | 336 |
|
| 337 | + We've updated all existing `roboflow_core` blocks to account for this, but blocks created before this change in |
| 338 | + external repositories may cause issues in workflows where their output images are used by video processing blocks. |
322 | 339 |
|
323 | | -## Execution Engine `v1.5.0` | inference `v0.38.0` |
324 | 340 |
|
325 | | -!!! Note "Change does not require any action" |
326 | | - |
327 | | - This change does not require any change from Workflows users. This is just performance optimisation. |
| 341 | +* While the deprecated [`video_metadata` kind](/workflows/kinds/video_metadata.md) is still available for use, it will be fully removed in |
| 342 | +Execution Engine version `v2.0.0`. |
328 | 343 |
|
329 | | -* Exposed new parameter in the init method of `BaseExecutionEngine` class - `executor` which can accept instance of |
330 | | -Python `ThreadPoolExecutor` to be used by execution engine. Thanks to this change, processing should be faster, as |
331 | | -each `BaseExecutionEngine.run(...)` will not require dedicated instance of `ThreadPoolExecutor` as it was so far. |
332 | | -Additionally, we are significantly limiting threads spawning which may also be a benefit in some installations. |
| 344 | +!!! warning "Breaking change planned - Execution Engine `v2.0.0`" |
| 345 | + |
| 346 | + [`video_metadata` kind](/workflows/kinds/video_metadata.md) got deprecated and will be removed in `v2.0.0` |
| 347 | + |
| 348 | + |
| 349 | +* As a result of the changes mentioned above, the internal representation of the [`image` kind](/workflows/kinds/image.md) has been updated to |
| 350 | +include a new `video_metadata` property. This property can be optionally set in the constructor; if not provided, |
| 351 | +a default value with reasonable defaults will be used. To simplify metadata manipulation within blocks, we have |
| 352 | +introduced two new class methods: `WorkflowImageData.copy_and_replace(...)` and `WorkflowImageData.create_crop(...)`. |
| 353 | +For more details, refer to the updated [`WoorkflowImageData` usage guide](/workflows/internal_data_types.md#workflowimagedata). |
333 | 354 |
|
334 | | -* Despite the change, Execution Engine maintains the limit of concurrently executed steps - by limiting the number of |
335 | | -steps that run through the executor at a time (since Execution Engine is no longer in control of `ThreadPoolExecutor` |
336 | | -creation, and it is possible for the pool to have more workers available). |
337 | 355 |
|
338 | | -??? Hint "How to inject `ThreadPoolExecutor` to Execution Engine?" |
339 | | - |
340 | | - ```python |
341 | | - from concurrent.futures import ThreadPoolExecutor |
342 | | - workflow_init_parameters = { ... } |
343 | | - with ThreadPoolExecutor(max_workers=...) as thread_pool_executor: |
344 | | - execution_engine = ExecutionEngine.init( |
345 | | - init_parameters=workflow_init_parameters, |
346 | | - max_concurrent_steps=4, |
347 | | - workflow_id="your-workflow-id", |
348 | | - executor=thread_pool_executor, |
349 | | - ) |
350 | | - runtime_parameters = { |
351 | | - "image": cv2.imread("your-image-path") |
352 | | - } |
353 | | - results = execution_engine.run(runtime_parameters=runtime_parameters) |
354 | | - ``` |
|
0 commit comments