Skip to content

[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
developfrom
update/simulation-flow
Open

[NET-1341] update: Use new split version of initialse multi turn runs and user message generation#334
muhammedrazalak wants to merge 2 commits into
developfrom
update/simulation-flow

Conversation

@muhammedrazalak

Copy link
Copy Markdown
Collaborator

No description provided.

Comment thread netra/simulation/api.py
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:

@akash-vijay-kv akash-vijay-kv Jul 16, 2026

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Comment thread netra/simulation/api.py
else:
setup_contexts[run_item_id] = shared_context

sim_item = self._client.generate_first_turn(

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

The per item generate_first_turn() is sequential unlike the remaining turns.

Comment thread netra/simulation/api.py
executor.shutdown(wait=False, cancel_futures=True)

# --- after_all ---
await run_after_all(hooks, results, shared_context)

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants