GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix(embedding): join sibling batches after failure by 97Three · Pull Request #3148 · agentscope-ai/agentscope

Conversation

@97Three

@97Three 97Three commented Oct 6, 2026 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

AgentScope Version

2.0.10dev, based on 72f3f6fa0b2fc38b8517f408ab616f0f2bd229e6.

Description

Closes #3146.

When one embedding batch fails, asyncio.gather propagates its error while sibling batches continue running. This change keeps references to the owned tasks, cancels unfinished siblings, and joins them before re-raising the original exception. Tasks already cancelling are not cancelled again, so their asynchronous cleanup can finish.

Regression tests cover immediate failure and retry exhaustion in both batch orders, parent and child cancellation, asynchronous sibling cleanup, successful ordering, and empty input.

This joins coroutine tasks; it cannot terminate a blocking SDK call already running through asyncio.to_thread, or undo a remote request. There is no public API change.

Verification

RepoSteward isolated Linux container, Python 3.12.14, with network disabled during tests:

  • Focused tests: 5 passed, 4 subtests passed.
  • Full pre-commit checks: passed.
  • Full test suite: 2618 passed, 145 skipped, 536 subtests passed, 235 warnings.

GitHub CI remains a separate check.

Review status

Prepared with AI assistance. This PR is now open for review. The author remains responsible for reviewing and understanding the change. The previous claimant agreed to hand off this issue in #3146 (comment).

The issue still lists the previous claimant because the assignment handoff has not completed. The PR was submitted with that contributor's explicit agreement; please see the handoff comment above when reviewing any automated claim-conflict check.

Checklist

  • An issue has been created for this PR.
  • I have read CONTRIBUTING.md. (Assistant consulted it; final author confirmation pending.)
  • Docstrings follow the surrounding project style.
  • Related documentation has been updated. (No public API or usage change.)
  • Code is ready for review. (Author line-by-line review pending.)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@97Three
fix(embedding): join sibling batches after failure
8928afb
Signed-off-by: 97three <[email protected]>
@github-actions

github-actions Bot commented Oct 6, 2026

Copy link
Copy Markdown
Contributor

Thanks for the pull request. One thing worth sorting out before it is reviewed:

  • [Bug]: Embedding batch tasks continue running after a sibling batch fails #3146 is claimed by @sxh313. Please leave it with them while the claim stands.

If you think it belongs here anyway, say so and a maintainer will take a look.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@sxh313 sxh313 mentioned this pull request Oct 6, 2026
[Bug]: Embedding batch tasks continue running after a sibling batch fails #3146
Closed
3 tasks
@97Three
97Three marked this pull request as ready for review October 8, 2026 04:10
@github-actions github-actions Bot added the pr/awaiting-review Waiting for maintainers to review this PR label Oct 8, 2026
@97Three

97Three commented Oct 8, 2026

Copy link
Copy Markdown
Contributor Author

Handoff and workflow check for #3148: this PR is now open for review, and I updated the description to remove its stale draft wording. @sxh313 explicitly agreed to hand off #3146 and asked maintainers to clear the assignment: #3146 (comment). Could a maintainer transfer or clear the assignment so the claim warning can be resolved? The GitHub Actions unit-test run also shows action_required without jobs: https://github.com/agentscope-ai/agentscope/actions/runs/37453840850. The local validation results are in the PR description.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PointerL PointerL mentioned this pull request Oct 23, 2026
[Bug]: negative batch_size silently drops inputs in EmbeddingModelBase #3449
Closed
2 tasks done
@stefanielizeth73-art stefanielizeth73-art mentioned this pull request Nov 2, 2026
[Bug]: KnowledgeBase.search leaves sibling vector queries running after one query fails #3649
Closed
@rome-xi rome-xi mentioned this pull request Nov 3, 2026
fix(rag): cancel sibling vector queries when one search fails #3656
Merged
4 of 5 tasks
@97Three
Merge remote-tracking branch 'upstream/main' into local/pr-3148-refresh
c2bc8b6
# Conflicts:
#	tests/embedding_base_test.py
@97Three

97Three commented Nov 4, 2026

Copy link
Copy Markdown
Contributor Author

Update after resolving the conflict with main@dff94ffd (head c2bc8b6b): this PR is mergeable again. Both sides had added tests/embedding_base_test.py, so I kept the upstream file unchanged and moved our five batch-lifecycle regressions into tests/embedding_batch_lifecycle_test.py. The implementation still cancels and joins sibling tasks before propagating a batch error.

Local Windows/Python 3.11 verification on this head: all embedding test modules → 69 passed, 50 subtests passed; pre-commit on the changed files → all checks passed. The full test suite was not rerun for this merge. GitHub Actions for the fork update currently show action_required, so remote CI has not run yet. The issue assignment handoff noted above is still awaiting maintainer action.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

qbc2016 added 2 commits November 10, 2026 11:11
@qbc2016
fix(embedding): protect batch cleanup from caller cancellation
6240c98
@qbc2016
fix(embedding): shield initial batch wait from repeated cancellation
8451ddd
qbc2016
qbc2016 approved these changes Nov 10, 2026
View reviewed changes

@qbc2016 qbc2016 left a comment

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@github-actions github-actions Bot removed the pr/awaiting-review Waiting for maintainers to review this PR label Nov 10, 2026
qbc2016 added 2 commits November 10, 2026 11:40
@qbc2016
Merge branch 'main' of https://github.com/agentscope-ai/agentscope in…
e87cd4b
…to codex/pr3148-batch-cleanup
@qbc2016
test(embedding): align cache fixture with endpoint isolation
4abed13
@github-actions github-actions Bot added the pr/awaiting-review Waiting for maintainers to review this PR label Nov 10, 2026
@qbc2016
qbc2016 merged commit 906d4ef into agentscope-ai:main Nov 10, 2026
8 checks passed

Uh oh!

There was an error while loading. Please reload this page.

zuizhuai pushed a commit to zuizhuai/agentscope that referenced this pull request Nov 10, 2026
@97Three
fix(embedding): join sibling batches after failure (agentscope-ai#3148)
5226113
This was referenced Nov 14, 2026
[Bug]: Gemini and DashScope multimodal batches continue after a sibling fails #4025
Closed
fix(embedding): join sibling multimodal batches after failure #4039
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@qbc2016 qbc2016 qbc2016 approved these changes

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

pr/awaiting-review Waiting for maintainers to review this PR

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

[Bug]: Embedding batch tasks continue running after a sibling batch fails

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@97Three @qbc2016
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.