Skip to content

Commit af89aa2

Browse files
authored
Update abstractions.md
Signed-off-by: Huy Vu <[email protected]>
1 parent a941555 commit af89aa2

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

docs/about/concepts/video/abstractions.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,13 +49,11 @@ Each processing stage:
4949

5050
1. Inherits from `ProcessingStage`
5151
2. Declares a stable `name` and `resources: Resources` (CPU cores, GPU memory, optional NVDEC/NVENC, or more than one GPU)
52-
3. Defines `inputs()`/`outputs()` to document required attributes and produced attributes on tasks
52+
3. Defines `inputs()`/`outputs()` to document that requires attributes or produces attributes on tasks
5353
4. Implements `setup(worker_metadata)` for model initialization and `process(task)` to transform tasks
5454

5555
This design enables map-style execution with executor-managed fault tolerance and dynamic scaling per stage. Stages can optionally provide `process_batch()` to support vectorized batch processing.
5656

57-
Composite stages provide a user-facing convenience API and decompose into one or more execution stages at build time.
58-
5957
```python
6058
class MyStage(ProcessingStage[X, Y]):
6159
name: str = "..."
@@ -68,6 +66,8 @@ class MyStage(ProcessingStage[X, Y]):
6866
def process(self, task: X) -> Y | list[Y]: ...
6967
```
7068

69+
Composite stages provide a user-facing convenience API and decompose into one or more execution stages at build time.
70+
7171
Refer to the stage base and resources definitions in Curator for full details.
7272

7373
### Resource Semantics
@@ -89,8 +89,8 @@ Video pipelines operate on task types defined in Curator:
8989
- `Video`: Holds decoded metadata, frames, and lists of `Clip`
9090
- `Clip`: Holds buffers, extracted frames, embeddings, and caption windows
9191

92-
Stages transform tasks stage by stage (for example, `VideoReader` populates `Video`, splitting stages create `Clip` objects, embedding and captioning stages annotate clips, and writer stages persist outputs).
92+
Stages transform tasks stage by stage, and might run with different tasks on different stages (for example, `VideoReader` populates `Video`, splitting stages create `Clip` objects, embedding and captioning stages annotate clips, and writer stages persist outputs).
9393

9494
## Executors
9595

96-
Executors run pipelines on a backend. Curator uses [`XennaExecutor`](https://github.com/nvidia-cosmos/cosmos-xenna) to translate `ProcessingStage` definitions into Cosmos-Xenna stage specifications and run them on Ray with automatic scaling. Execution modes include streaming (default) and batch.
96+
Executors run pipelines on a backend. Curator uses [`XennaExecutor`](https://github.com/nvidia-cosmos/cosmos-xenna) to translate `ProcessingStage` definitions into Cosmos-Xenna stage specifications and run them on Ray with automatic scaling. Execution modes include streaming (by default) and batch.

0 commit comments

Comments
 (0)