Skip to content
Navigation Menu
Sign in
Appearance settings
Platform
AI CODE CREATION
GitHub Copilot
Write better code with AI
GitHub Copilot app
Direct agents from issue to merge
MCP Registry
Integrate external tools
DEVELOPER WORKFLOWS
Actions
Automate any workflow
Codespaces
Instant dev environments
Issues
Plan and track work
Code Review
Manage code changes
Code Quality
Enforce quality at merge
APPLICATION SECURITY
GitHub Advanced Security
Find and fix vulnerabilities
Code security
Secure your code as you build
Secret protection
Stop leaks before they start
EXPLORE
Why GitHub
Documentation
Blog
Changelog
Marketplace
View all features
Solutions
BY COMPANY SIZE
Enterprises
Small and medium teams
Startups
Nonprofits
BY USE CASE
App Modernization
DevSecOps
DevOps
CI/CD
View all use cases
BY INDUSTRY
Healthcare
Financial services
Manufacturing
Government
View all industries
View all solutions
Resources
EXPLORE BY TOPIC
AI
Software Development
DevOps
Security
View all topics
EXPLORE BY TYPE
Customer stories
Events & webinars
Ebooks & reports
Business insights
GitHub Skills
SUPPORT & SERVICES
Documentation
Customer support
Community forum
Trust center
Partners
View all resources
Open Source
COMMUNITY
GitHub Sponsors
Fund open source developers
PROGRAMS
Security Lab
Maintainer Community
GitHub Stars
Archive Program
REPOSITORIES
Topics
Trending
Collections
Enterprise
ENTERPRISE SOLUTIONS
Enterprise platform
AI-powered developer platform
AVAILABLE ADD-ONS
GitHub Advanced Security
Enterprise-grade security features
Copilot for Business
Enterprise-grade AI features
Premium Support
Enterprise-grade 24/7 support
Pricing
Search
/
Sign in
Sign up
Appearance settings
You signed in with another tab or window.
Reload
to refresh your session.
You signed out in another tab or window.
Reload
to refresh your session.
You switched accounts on another tab or window.
Reload
to refresh your session.
Dismiss alert
{{ message }}
MaartenGr
/
BERTopic
Public
Notifications
You must be signed in to change notification settings
Fork
919
Star
7.8k
Code
Issues
437
Pull requests
35
Discussions
Actions
Projects
Security and quality
0
Insights
Additional navigation options
Code
Issues
Pull requests
Discussions
Actions
Projects
Security and quality
Insights
fix: correct representative docs sampling, topic mapping, and image indexing
- #2496
#2496
Draft
pidefrem
wants to merge 27 commits into
MaartenGr:master
MaartenGr/BERTopic:master
from
pidefrem:fix/repr-docs-sampling-and-indexing
pidefrem/BERTopic:fix/repr-docs-sampling-and-indexing
Copy head branch name to clipboard
Conversation
Commits
27
(27)
Checks
Files changed
Draft
fix: correct representative docs sampling, topic mapping, and image indexing
#2496
pidefrem
wants to merge 27 commits into
MaartenGr:master
MaartenGr/BERTopic:master
from
pidefrem:fix/repr-docs-sampling-and-indexing
pidefrem/BERTopic:fix/repr-docs-sampling-and-indexing
Copy head branch name to clipboard
Commits
Commits on Jul 8, 2026
fix: correct representative docs sampling and index mapping in _extract_representative_docs
Show description for f6a5250
pidefrem
committed
f6a5250
View commit details
Copy full SHA for f6a5250
Browse repository at this point
Commits on Aug 3, 2026
test: rewrite tests as plain functions instead of test classes
pidefrem
committed
b17f45a
View commit details
Copy full SHA for b17f45a
Browse repository at this point
fix: address review findings
Show description for c472009
pidefrem
committed
c472009
View commit details
Copy full SHA for c472009
Browse repository at this point
Commits on Aug 4, 2026
refactor: branch on pandas version for representative docs sampling
pidefrem
committed
653eb36
View commit details
Copy full SHA for 653eb36
Browse repository at this point
style: revert unrelated import reordering in _bertopic.py
pidefrem
committed
6008873
View commit details
Copy full SHA for 6008873
Browse repository at this point
fix: keep Topic column and original index when sampling representative docs
pidefrem
committed
b66fb0d
View commit details
Copy full SHA for b66fb0d
Browse repository at this point
test: share minimal topic model fixture via conftest
pidefrem
committed
b52cdff
View commit details
Copy full SHA for b52cdff
Browse repository at this point
fix: map representative docs by sorted topic labels
Show description for 789e638
pidefrem
committed
789e638
View commit details
Copy full SHA for 789e638
Browse repository at this point
fix: index representative images by label in VisualRepresentation
Show description for 0614f28
pidefrem
committed
0614f28
View commit details
Copy full SHA for 0614f28
Browse repository at this point
fix: include Image in representative doc dedup key
Show description for 5430aa4
pidefrem
committed
5430aa4
View commit details
Copy full SHA for 5430aa4
Browse repository at this point
fix: decorrelate per-topic sampling with a per-group random_state
Show description for 1d67cb0
pidefrem
committed
1d67cb0
View commit details
Copy full SHA for 1d67cb0
Browse repository at this point
test: pin dedup interaction in test_all_identical_docs (L17)
Show description for 531f300
pidefrem
committed
531f300
View commit details
Copy full SHA for 531f300
Browse repository at this point
test: use sorted(topics.keys()) uniformly in test_repr_docs_indexing (L08)
Show description for 1c17e18
pidefrem
committed
1c17e18
View commit details
Copy full SHA for 1c17e18
Browse repository at this point
test: rename test_selected_indices_variable_used (L09)
Show description for 7932b81
pidefrem
committed
7932b81
View commit details
Copy full SHA for 7932b81
Browse repository at this point
test: assert exact repr doc counts in test_repr_docs_count_respects_topic_size (L07)
Show description for 7243868
pidefrem
committed
7243868
View commit details
Copy full SHA for 7243868
Browse repository at this point
test: drop internal working-note jargon from docstring (L10)
Show description for 1146d13
pidefrem
committed
1146d13
View commit details
Copy full SHA for 1146d13
Browse repository at this point
test: remove redundant monkeypatch teardown (L11)
Show description for e63850a
pidefrem
committed
e63850a
View commit details
Copy full SHA for e63850a
Browse repository at this point
fix: dedup on a hashable image key instead of the raw Image column
Show description for b34fabf
pidefrem
committed
b34fabf
View commit details
Copy full SHA for b34fabf
Browse repository at this point
fix: map MMR-selected documents back to ids positionally (L04)
Show description for 258eb53
pidefrem
committed
258eb53
View commit details
Copy full SHA for 258eb53
Browse repository at this point
test: parametrize topic_order in test_mappings_agree_with_repr_docs_ids (L16)
Show description for 896efe4
pidefrem
committed
896efe4
View commit details
Copy full SHA for 896efe4
Browse repository at this point
perf: bind images.loc(index) once instead of evaluating it 3x (L06)
pidefrem
committed
e9be652
View commit details
Copy full SHA for e9be652
Browse repository at this point
test: assert all unique docs are returned, not just no-dupes (L15)
pidefrem
committed
016ea3a
View commit details
Copy full SHA for 016ea3a
Browse repository at this point
fix: raise a clear error when no document has a valid Topic (L01)
pidefrem
committed
d4b476a
View commit details
Copy full SHA for d4b476a
Browse repository at this point
test: cover repr_docs_indices offset arithmetic with unequal topic sizes (M02)
pidefrem
committed
5d57653
View commit details
Copy full SHA for 5d57653
Browse repository at this point
docs: clarify repr_doc_indices are positions into repr_docs, not documents (L13)
pidefrem
committed
b70d187
View commit details
Copy full SHA for b70d187
Browse repository at this point
fix: correct _extract_representative_docs return type annotation (L14)
pidefrem
committed
8a2da0c
View commit details
Copy full SHA for 8a2da0c
Browse repository at this point
perf: sample candidates via one shuffle + head instead of a per-group loop (L03)
Show description for ec656de
pidefrem
committed
ec656de
View commit details
Copy full SHA for ec656de
Browse repository at this point
You can’t perform that action at this time.