Skip to content

Conversation

@gperdrizet
Copy link
Owner

No description provided.

Copilot AI review requested due to automatic review settings November 23, 2025 04:49
Copy link

Copilot AI left a 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_interval steps), simplifying configuration by removing plot_progress and save_interval parameters in favor of show_progress boolean
  • 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.

Comment on lines +552 to +554
# ax.tick_params(axis='both', which='major', labelsize=7)
# ax.locator_params(axis='x', nbins=4)
# ax.locator_params(axis='y', nbins=4)
Copy link

Copilot AI Nov 23, 2025

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.

Suggested change
# ax.tick_params(axis='both', which='major', labelsize=7)
# ax.locator_params(axis='x', nbins=4)
# ax.locator_params(axis='y', nbins=4)

Copilot uses AI. Check for mistakes.
after each batch when ``show_progress=True`` (default).

**Batch Size**
The batch size is determined by ``exchange_interval`` (default: 100 steps).
Copy link

Copilot AI Nov 23, 2025

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.

Suggested change
The batch size is determined by ``exchange_interval`` (default: 100 steps).
The batch size is determined by ``exchange_interval`` (default: 1000 steps).

Copilot uses AI. Check for mistakes.
@gperdrizet gperdrizet merged commit 0aefc51 into main Nov 23, 2025
3 checks passed
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