Skip to content

Conversation

@shntnu
Copy link
Member

@shntnu shntnu commented Dec 8, 2025

Summary

  • Fix TypeError when calling mean_average_precision with progress_bar=False
  • The leave kwarg (tqdm-specific) was being passed to ThreadPoolExecutor.map() which doesn't accept it
  • Added regression test

Test plan

  • uv run pytest passes (62 tests)
  • uv run ruff check src/ tests/ passes

🤖 Generated with Claude Code

…utor

The `leave` parameter is tqdm-specific and was being passed through to
`ThreadPoolExecutor.map()` which doesn't accept it, causing a TypeError
when `mean_average_precision` was called with `progress_bar=False`.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
Instead of filtering out tqdm-specific kwargs in silent_thread_map,
address the root cause by only passing leave=False when using tqdm's
thread_map. This is cleaner as each function only receives arguments
it understands.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
@shntnu shntnu merged commit 3a44d08 into main Jan 8, 2026
7 checks passed
@shntnu shntnu deleted the fix/silent-thread-map-leave-kwarg branch January 8, 2026 17:06
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