Skip to content

Log a concise warning instead of a full traceback when MSA search falls back - #328

Open
ssiddhantsharma wants to merge 1 commit into
bytedance:mainfrom
ssiddhantsharma:fix-handled-msa-fallback-traceback
Open

Log a concise warning instead of a full traceback when MSA search falls back#328
ssiddhantsharma wants to merge 1 commit into
bytedance:mainfrom
ssiddhantsharma:fix-handled-msa-fallback-traceback

Conversation

@ssiddhantsharma

Copy link
Copy Markdown

When the MMseqs2 MSA server returns an error, the three fallback handlers in protenix/web_service/colab_request_parser.py catch the exception and then print(f"MMSEQS2 failed with the following error message:\n{traceback.format_exc()}").

The exception is handled — the pipeline continues (e.g. using the query sequence as its own MSA), so nothing has actually crashed. But dumping a full Traceback (most recent call last): ... to stderr makes this routine, recoverable event look like a fatal error. It is easy to misread as a crash, and it trips up log/CI scanners that flag on the string Traceback.

This PR replaces the full-traceback print in all three handlers with a single concise line, e.g.:

WARNING: MMseqs2 MSA search failed (Exception: MMseqs2 API is giving errors ...); continuing without this search.

and drops the now-unused import traceback.

  • No behavioral change beyond log verbosity — the fallback path is unchanged.
  • The exception type and message are still surfaced, just without the misleading full stack trace.
  • Consistent with the file’s existing print-based logging style (no new logging dependency).

…ls back

When the MMseqs2 MSA server errors, the three fallback handlers in
colab_request_parser.py caught the exception but printed the full
traceback.format_exc(). The exception is handled (the run continues with a
fallback), so dumping a full traceback makes a routine, recoverable event look
like a fatal crash - confusing for users and noisy for log scanners.

Print a single concise WARNING with the exception type/message instead, and
drop the now-unused 'import traceback'. No behavioral change beyond log verbosity.
@CLAassistant

CLAassistant commented Jul 26, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

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