Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This pull request updates the
jax_grid_searchpackage to remove its internalProgressBarand instead use the newjax_progresslibrary for progress tracking. All documentation, examples, and code have been refactored to useTqdmProgressMeterfromjax_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
ProgressBarand replaced all progress tracking with theTqdmProgressMeterand related abstractions from thejax_progresslibrary. Theoptimizefunction now accepts anAbstractProgressMeterinstead of aProgressBar, 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_statefor 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:
TqdmProgressMeterfromjax_progressinstead of the removedProgressBar. This includes changes to code snippets inREADME.mdandexamples/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:
jax-progressand supporting libraries (optimistix,lineax,equinox) as dependencies inpyproject.toml, and removedrichsince it is no longer used. Updated type ignore settings to includejax_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:
optimizefunction signature is simplified: removedprogress_id(now handled internally byjax_progress), and the progress callback is now more flexible. Added a newdefault_desc_cbfor 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:
[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.