Skip to content

feat!: support index progress reporting via callbacks#5910

Merged
wjones127 merged 6 commits intolance-format:mainfrom
wkalt:task/index-build-progress-reporting
Feb 10, 2026
Merged

feat!: support index progress reporting via callbacks#5910
wjones127 merged 6 commits intolance-format:mainfrom
wkalt:task/index-build-progress-reporting

Conversation

@wkalt
Copy link
Copy Markdown
Contributor

@wkalt wkalt commented Feb 7, 2026

This adds support for progress reporting on index builds, allowing callers to determine whether a build is progressing, what stage it is in, and in some cases how far into the stage.

Breaking: updates some index builder function signatures to include a progress callback implementation. A noop implementation is included in the patch.

@github-actions github-actions Bot added the enhancement New feature or request label Feb 7, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Feb 7, 2026

ACTION NEEDED
Lance follows the Conventional Commits specification for release automation.

The PR title and description are used as the merge commit message. Please update your PR title and description to match the specification.

For details on the error please inspect the "PR Title Check" action.

@wkalt
Copy link
Copy Markdown
Contributor Author

wkalt commented Feb 7, 2026

I used this to create the chart in #5907

@wkalt
Copy link
Copy Markdown
Contributor Author

wkalt commented Feb 7, 2026

this should be marked breaking, sorry for not marking that right. I can't edit the title so someone will need to add it.

This adds a progress parameter to some of the index building functions.

@codecov
Copy link
Copy Markdown

codecov Bot commented Feb 7, 2026

Codecov Report

❌ Patch coverage is 82.10117% with 46 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
rust/lance/src/index/vector/ivf.rs 81.19% 15 Missing and 7 partials ⚠️
rust/lance-index/src/vector/kmeans.rs 40.00% 12 Missing ⚠️
rust/lance/src/index/vector/builder.rs 61.90% 0 Missing and 8 partials ⚠️
rust/lance/src/index/create.rs 20.00% 4 Missing ⚠️

📢 Thoughts on this report? Let us know!

@github-actions github-actions Bot added the python label Feb 7, 2026
@wjones127 wjones127 self-assigned this Feb 8, 2026
Copy link
Copy Markdown
Contributor

@wjones127 wjones127 left a comment

Choose a reason for hiding this comment

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

This looks great!

Comment thread rust/lance-index/src/progress.rs Outdated
Comment on lines +10 to +12
/// Called at stage boundaries during index construction. Stage names are
/// index-type-specific (e.g. "train_ivf", "shuffle", "build_partitions" for
/// vector indices; "load_data", "build_pages" for scalar indices).
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Is it an error for multiple stages to be active at the same time?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

good thought. As currently structured stages are sequential, so if you need to do two things you would need to fold it into one stage. We could possibly figure out a way to relax that or evolve this to enable multiple stages at once.

Do we have index types today that would benefit from that? This only breaks out stages for IVF; I haven't given consideration to the others yet.

@wjones127 wjones127 changed the title feat: Support index progress reporting via callbacks feat: support index progress reporting via callbacks Feb 10, 2026
@wkalt wkalt changed the title feat: support index progress reporting via callbacks feat!: support index progress reporting via callbacks Feb 10, 2026
@wkalt wkalt force-pushed the task/index-build-progress-reporting branch from dc04053 to d5a898e Compare February 10, 2026 14:04
@wjones127
Copy link
Copy Markdown
Contributor

Happy to merge this once conflicts and lint errors are resolved.

This adds support for progress reporting on index builds, allowing
callers to determine whether a build is progressing, what stage it is
in, and in some cases how far into the stage.
track iterations across the whole stage
@wkalt wkalt force-pushed the task/index-build-progress-reporting branch from d5a898e to d374d41 Compare February 10, 2026 20:47
@github-actions github-actions Bot added the java label Feb 10, 2026
@wkalt
Copy link
Copy Markdown
Contributor Author

wkalt commented Feb 10, 2026

@wjones127 thanks, this should be good to go.

@wjones127 wjones127 merged commit 65e4815 into lance-format:main Feb 10, 2026
28 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants