Skip to content

Update progress bar#18

Merged
ASKabalan merged 5 commits intomainfrom
update-progress-bar
Dec 30, 2025
Merged

Update progress bar#18
ASKabalan merged 5 commits intomainfrom
update-progress-bar

Conversation

@ASKabalan
Copy link
Copy Markdown
Member

This pull request updates the jax_grid_search package to remove its internal ProgressBar and instead use the new jax_progress library for progress tracking. All documentation, examples, and code have been refactored to use TqdmProgressMeter from jax_progress. The optimizer API is simplified, and progress tracking is now more robust and compatible with JAX transformations and parallelization.

Progress tracking migration and API changes:

  • Removed the internal ProgressBar and replaced all progress tracking with the TqdmProgressMeter and related abstractions from the jax_progress library. The optimize function now accepts an AbstractProgressMeter instead of a ProgressBar, and progress tracking is handled via the new interface. ([[1]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R9-L12), [[2]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R41-R73), [[3]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971L96-R94), [[4]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971L111-R119), [[5]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971L158-R157), [[6]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R167), [[7]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971L179-R185), [[8]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-e9356f19204a5e43d969451ba2e0e9154a2acdc2da94f7df0b9d5a3f480cc1d8L12-R20), [[9]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-e9356f19204a5e43d969451ba2e0e9154a2acdc2da94f7df0b9d5a3f480cc1d8L43-R44), [[10]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L202-R203), [[11]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L212-R220), [[12]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L232-R233), [[13]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L248-R253), [[14]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R263-R275), [[15]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L284-R294), [[16]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L318-R336), [[17]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L344-L352), [[18]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L362-R366), [[19]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L385-R395), [[20]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-49aaa2819e35a856818ecec8c9fa7e1c79ad028d3f44bd749736353cfb51bac9L66-R74))

  • Updated the optimizer state to include progress_state for tracking the internal state of the progress meter, ensuring compatibility with JAX transformations and parallel execution. ([[1]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R30), [[2]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R167))

Documentation and example updates:

  • Revised all documentation and example usages to demonstrate progress tracking using TqdmProgressMeter from jax_progress instead of the removed ProgressBar. This includes changes to code snippets in README.md and examples/README.md. ([[1]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L202-R203), [[2]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L212-R220), [[3]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L232-R233), [[4]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L248-R253), [[5]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5R263-R275), [[6]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L284-R294), [[7]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L318-R336), [[8]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L344-L352), [[9]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L362-R366), [[10]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L385-R395), [[11]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-49aaa2819e35a856818ecec8c9fa7e1c79ad028d3f44bd749736353cfb51bac9L66-R74), [[12]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-e9356f19204a5e43d969451ba2e0e9154a2acdc2da94f7df0b9d5a3f480cc1d8L12-R20))

Dependency and import updates:

  • Added jax-progress and supporting libraries (optimistix, lineax, equinox) as dependencies in pyproject.toml, and removed rich since it is no longer used. Updated type ignore settings to include jax_progress. ([[1]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L18-R21), [[2]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711L106-R109))

API and interface improvements:

  • The optimize function signature is simplified: removed progress_id (now handled internally by jax_progress), and the progress callback is now more flexible. Added a new default_desc_cb for progress description formatting. ([[1]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971R41-R73), [[2]](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-4e119a63b792ddddff254e19a8e258582cf57ad193225b5b445e837701066971L96-R94))

Minor corrections:

  • Fixed typos and improved clarity in documentation and comments. ([README.mdL318-R336](https://github.com/CMBSciPol/jax-grid-search/pull/18/files#diff-b335630551682c19a781afebcf4d07bf978fb1f8ac04c6bf87428ed5106870f5L318-R336))

These changes make progress tracking more robust, consistent, and compatible with modern JAX workflows.

@ASKabalan ASKabalan merged commit b456e7a into main Dec 30, 2025
4 checks passed
@ASKabalan ASKabalan deleted the update-progress-bar branch December 30, 2025 22:55
@ASKabalan ASKabalan restored the update-progress-bar branch January 8, 2026 20:46
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.

1 participant