Skip to content

Commit da81e95

Browse files
authored
Merge pull request #13 from radical-cybertools/improve/dragonv3
Improve tasks wait in Dragon
2 parents c733bfa + 5a63d7a commit da81e95

7 files changed

Lines changed: 160 additions & 106 deletions

File tree

.github/workflows/docs.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ name: Deploy Documentation
22

33
on:
44
push:
5-
branches: [ main, master, feature/docs_polish ]
5+
branches: [ main, master]
66
workflow_dispatch:
77

88
permissions:

CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
# Changelog
2+
3+
## [Unreleased]
4+
5+
- Removed ThreadPoolExecutor wait approach (`_wait_executor`) attribute, streamlining concurrency management.
6+
- Added `disable_batch_submission` boolean parameter to `DragonExecutionBackendV3.__init__` and `create` methods, allowing configuration of task submission strategy.
7+
- Introduced `_monitored_batches` dictionary and `_batch_monitor_thread` to manage and monitor active task batches.
8+
- Replaced the `_wait_for_batch` method with a new `_monitor_loop` (running in a dedicated thread) and `_process_batch_results` helper, implementing a polling-based mechanism for task completion.
9+
- Modified `_async_init` to start the `_batch_monitor_thread` during backend initialization.
10+
- Updated `submit_tasks` to support conditional task submission: tasks can now be submitted as individual batches (stream mode) or a single combined batch, based on the `_disable_batch_submission` flag.
11+
- Adjusted the `shutdown` method to properly manage the lifecycle of the new `_batch_monitor_thread`.

docs/about.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# About RHAPSODY
22

3-
RHAPSODY (**R**untime for **H**eterogeneous **AP**plications, **S**ervice **O**rchestration and **DY**namism) is a cutting-edge runtime system designed to address the evolving challenges of modern scientific computing. As computational workflows become increasingly complex, combining traditional HPC simulations with AI/ML workloads, there is a critical need for systems that can efficiently orchestrate heterogeneous tasks across diverse computing resources.
3+
RHAPSODY (<b>R</b>untime for <b>H</b>eterogeneous <b>AP</b>plications, <b>S</b>ervice <b>O</b>rchestration and <b>DY</b>namism) is a cutting-edge runtime system designed to address the evolving challenges of modern scientific computing. As computational workflows become increasingly complex, combining traditional HPC simulations with AI/ML workloads, there is a critical need for systems that can efficiently orchestrate heterogeneous tasks across diverse computing resources.
44

55
## Vision
66

docs/changelogs.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
--8<-- "CHANGELOG.md"

docs/getting-started/configuration.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -55,12 +55,30 @@ backend = DragonExecutionBackendV3(
5555
name="dragon",
5656
num_workers=16, # Total worker processes
5757
disable_telemetry=False, # Enable/disable Dragon telemetry
58-
disable_background_batching=False # Enable/disable background monitoring
58+
disable_background_batching=False, # Enable/disable background monitoring
59+
disable_batch_submission=False # Toggle batch vs individual submission
5960
)
6061
```
6162

63+
!!! note "Batch vs. Stream Submission"
64+
The `disable_batch_submission` parameter controls how tasks are sent to the Dragon runtime:
65+
66+
- **Batch Mode** (`False`): High throughput. Groups tasks into a single multi-task batch.
67+
- **Stream Mode** (`True`): Individual monitoring. Each task is submitted and tracked as a separate Dragon batch.
68+
69+
```python
70+
# Batch Mode (Recommended for many small tasks)
71+
backend = await DragonExecutionBackendV3(disable_batch_submission=False)
72+
await session.submit_tasks([t1, t2]) # Single submission
73+
74+
# Stream Mode (Better for isolated task tracking)
75+
backend = await DragonExecutionBackendV3(disable_batch_submission=True)
76+
await session.submit_tasks([t1, t2]) # Two separate submissions
77+
```
78+
79+
6280
!!! note "Dragon Versions"
63-
While `DragonExecutionBackendV3` is recommended for most users due to its native batch integration, V1 and V2 are also available for legacy compatibility.
81+
While `DragonExecutionBackendV3` is recommended for most users and will be always maintained, V1 and V2 are also available for legacy compatibility.
6482

6583
### RADICAL-Pilot Backend
6684
Large-scale HPC execution using RADICAL-Pilot.

mkdocs.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -115,6 +115,7 @@ nav:
115115
- Project:
116116
- project/index.md
117117
- Roadmap: project/roadmap.md
118+
- Changelog: changelogs.md
118119
- Publications: project/publications.md
119120
- NSF Award: project/nsf-award.md
120121
- Team: project/team.md

0 commit comments

Comments
 (0)