[NET-1341] update: Use new split version of initialse multi turn runs and user message generation#334
Open
muhammedrazalak wants to merge 2 commits into
Open
[NET-1341] update: Use new split version of initialse multi turn runs and user message generation#334muhammedrazalak wants to merge 2 commits into
muhammedrazalak wants to merge 2 commits into
Conversation
| try: | ||
| item_context = run_async_safely(run_before(hooks, dataset_item_id, shared_context)) | ||
| setup_contexts[run_item_id] = item_context | ||
| except Exception as exc: |
Collaborator
There was a problem hiding this comment.
Is the run_after() supposed to be called if we catch an exception in run_before()? It is mentioned so within the doctstrings of run_after(). Same is the case for generate_first_turn() failure.
| else: | ||
| setup_contexts[run_item_id] = shared_context | ||
|
|
||
| sim_item = self._client.generate_first_turn( |
Collaborator
There was a problem hiding this comment.
The per item generate_first_turn() is sequential unlike the remaining turns.
| executor.shutdown(wait=False, cancel_futures=True) | ||
|
|
||
| # --- after_all --- | ||
| await run_after_all(hooks, results, shared_context) |
Collaborator
There was a problem hiding this comment.
run_after_all at executes before the Phase-3 failed_items are merged in. So when the user's after_all(results, shared_context) callback runs, the results dict it receives, contains only conversation-phase failures. Every item whose before hook raised or whose first turn failed to generate is absent.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
No description provided.