Skip to content

fix(ParallelMuse): repair stale call sites that crash compressed_reasoning_aggregation#262

Open
Osamaali313 wants to merge 1 commit into
Alibaba-NLP:mainfrom
Osamaali313:fix/parallelmuse-stale-call-sites
Open

fix(ParallelMuse): repair stale call sites that crash compressed_reasoning_aggregation#262
Osamaali313 wants to merge 1 commit into
Alibaba-NLP:mainfrom
Osamaali313:fix/parallelmuse-stale-call-sites

Conversation

@Osamaali313

Copy link
Copy Markdown

Problem

WebAgent/ParallelMuse/compressed_reasoning_aggregation.py has three stale call sites left over from a refactor that removed data_path threading. They break the script's only entry point (main()asyncio.run(main())), and each is provably wrong against the function's own definition (and, for get_llm_response, against the correct sibling call in the same file).

1. call_converge — wrong argument count (crashes main() on launch)

async def call_converge(sem, traj_group):          # line 236 — 2 params
...
tasks.append(call_converge(sem, filtered_cluster, data_path))   # line 273 — 3 args

call_converge is async, so the extra argument raises immediately when the coroutine object is created — the loop aborts on the first cluster.

2. get_llm_response — wrong argument count + undefined name

async def get_llm_response(messages, max_tokens):  # line 75 — 2 params
...
response = await get_llm_response(messages, max_tokens, data_path)   # line 175 — 3 args
...
response = await get_llm_response(messages, max_tokens)              # line 215 — correct

data_path isn't a parameter of call_state_report and isn't a module global, so line 175 hits NameError (and a 3-arg/2-param TypeError). Line 215 shows the intended 2-arg form.

3. call_info_integrate — inconsistent return type

if response is None:
    return "[Error getting integrated answer]"     # line 228 — bare str
...
return 0, "[No Valid Answer]"                        # 2-tuple
return len(report_group), final_answer               # 2-tuple

The caller unpacks two values — merge_num, prediction = await call_info_integrate(...) — so the bare-string error path raises ValueError: too many values to unpack (expected 2) whenever the integrate LLM call fails.

Fix

tasks.append(call_converge(sem, filtered_cluster))                 # line 273
response = await get_llm_response(messages, max_tokens)            # line 175
return 0, "[Error getting integrated answer]"                      # line 228

Verification

  • AST check on the file confirms every call_converge / get_llm_response call now matches its 2-parameter definition, and all three call_info_integrate returns are 2-tuples.
  • python -m py_compile passes.
  • A standalone repro reproduces the three failures on the current code (TypeError / NameError / ValueError) and confirms the corrected calls succeed.

The full pipeline needs an LLM server (REPORT_CONVERGE_BASE_URL_POOL) and a rollout file, so I couldn't run it end-to-end — but these three defects are argument-count / return-type errors that are unambiguous against the file's own definitions and its own correct sibling call, and they sit on the script's only code path.

…gregation

Three leftovers from a refactor that removed data_path threading break the
only entry point of compressed_reasoning_aggregation.py:

- main() calls call_converge(sem, filtered_cluster, data_path) but
  call_converge takes 2 params -> TypeError at coroutine creation, aborting
  the run on the first cluster.
- call_state_report calls get_llm_response(messages, max_tokens, data_path);
  get_llm_response takes 2 params and data_path is not in scope here -> Name
  Error / TypeError. The sibling call at line 215 already uses the correct
  2-arg form.
- call_info_integrate returns a bare string on the response-is-None path,
  while its other returns are 2-tuples and the caller unpacks two values
  (merge_num, prediction) -> ValueError on any integrate failure.

Drop the stray data_path arguments and return a 2-tuple on the error path.
Copilot AI review requested due to automatic review settings July 11, 2026 22:29

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

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