-
Notifications
You must be signed in to change notification settings - Fork 0
Improved plotting, checkpointing and results collection #11
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR implements significant improvements to plotting, checkpointing, and results collection for the hill climbing optimizer, bumping the version from 1.0.1 to 1.0.2. The changes enhance user experience by automating progress visualization and checkpointing while introducing a more intuitive fractional perturbation parameter.
Key Changes
- Automated plotting and checkpointing: Replaced time-based intervals with batch-based triggers (after each
exchange_intervalsteps), simplifying configuration by removingplot_progressandsave_intervalparameters in favor ofshow_progressboolean - Improved step_spread parameter: Changed from absolute values to fractional (default 0.01 = 1% of data range) with automatic scaling based on input data bounds, making the parameter more intuitive and data-scale independent
- Enhanced plotting features: Added temperature exchange visualization, batch number display, initial data snapshots, and better layout with 2-row structure showing progress and data snapshots
Reviewed changes
Copilot reviewed 15 out of 16 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| pyproject.toml | Version bump to 1.0.2 |
| hill_climber/init.py | Version bump to 1.0.2 |
| docs/source/conf.py | Version bump to 1.0.2 |
| CITATION.cff | Version bump to 1.0.2 |
| tests/test_integration.py | Added show_progress=False to all test cases to disable plotting during automated tests |
| tests/test_hill_climber.py | Added show_progress=False to all test cases to disable plotting during automated tests |
| test_parallel.py | Removed obsolete test script (entire file deleted) |
| notebooks/05-feature_interactions.ipynb | Removed deprecated plot_progress parameter and reset execution count |
| notebooks/02-pearson_spearman.ipynb | Removed deprecated plot_progress parameter and reset execution count |
| hill_climber/optimizer_state.py | Added temperature_history tracking and record_temperature_change() method |
| hill_climber/optimizer.py | Major refactoring: replaced time-based checkpointing/plotting with batch-based, added verbose parameter, implemented fractional step_spread with backward compatibility, swapped temperature exchange logic, added reset_temperatures parameter to load_checkpoint() |
| hill_climber/plotting_functions.py | Enhanced plot_results() with exchange_interval parameter, added initial data snapshots, temperature exchange markers, and 2-row layout for progress and snapshots |
| docs/source/user_guide.rst | Updated documentation for new step_spread semantics, show_progress parameter, and batch-based checkpointing |
| docs/source/quickstart.rst | Updated examples to remove deprecated plot_progress parameter |
| docs/source/advanced.rst | Expanded checkpointing documentation with reset_temperatures feature and updated perturbation strategy examples |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| # ax.tick_params(axis='both', which='major', labelsize=7) | ||
| # ax.locator_params(axis='x', nbins=4) | ||
| # ax.locator_params(axis='y', nbins=4) |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Multiple commented-out lines for tick parameters and locator params (lines 446-448, 459, 469-470, 530-532, 552-554). These should either be removed if they're not needed, or uncommented if they are. Leaving commented code in production reduces code maintainability.
| # ax.tick_params(axis='both', which='major', labelsize=7) | |
| # ax.locator_params(axis='x', nbins=4) | |
| # ax.locator_params(axis='y', nbins=4) |
| after each batch when ``show_progress=True`` (default). | ||
|
|
||
| **Batch Size** | ||
| The batch size is determined by ``exchange_interval`` (default: 100 steps). |
Copilot
AI
Nov 23, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Documentation inconsistency: The default value for exchange_interval is documented as 100 steps, but the actual default in the code (optimizer.py line 72) is 1000. Update the documentation to reflect the correct default value of 1000.
| The batch size is determined by ``exchange_interval`` (default: 100 steps). | |
| The batch size is determined by ``exchange_interval`` (default: 1000 steps). |
No description provided.