Conversation
Expanded the README to include detailed algorithm description, solver backends, and repository structure.
fixed according to comments
qhd grid now generates normalized objective value
bernalde
left a comment
There was a problem hiding this comment.
There are a number of recommended changes but this is looking good. I will request a copilot revision and make sure to merge the changes made to README
bbo_via_fmqa/fmqa_simulated.py
Outdated
| max_cycles = 100 | ||
| convergence_patience = 10 | ||
| max_cycles = 150 | ||
| convergence_patience = int(len(grid) * 0.01) |
There was a problem hiding this comment.
This factor you are using should be an important parameter to change early on the code and not be hardcoded or hidden
There was a problem hiding this comment.
Pull request overview
This PR updates the FMQA implementation to better support 2D (and some 3D) grid datasets, adds a utility for generating benchmark 2D grids, and refreshes packaging/README content.
Changes:
- Added 3D grid loading/encoding helpers and a 3D objective lookup in
read_grid.py. - Refactored the simulated-annealing surrogate solve path and updated the simulated runner to log runs + save plots.
- Updated packaging metadata (
setup.py) and expanded the README; removed large dataset/log CSV artifacts from the repo.
Reviewed changes
Copilot reviewed 27 out of 27 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| bbo_via_fmqa/setup.py | Switches packaging to py_modules, adjusts dependencies, adds console entry points. |
| bbo_via_fmqa/read_grid.py | Adds 3D grid support utilities + formatting fixes. |
| bbo_via_fmqa/qhd_grid_generator.py | New 2D benchmark grid CSV generator for various objective landscapes. |
| bbo_via_fmqa/ising_machine.py | Adds SA-based surrogate solvers (2D + 3D). |
| bbo_via_fmqa/fmqa_simulated.py | Updates SA loop, logging, convergence logic, and plot saving. |
| bbo_via_fmqa/fmqa_qci.py | Updates surrogate import path. |
| bbo_via_fmqa/fmqa_dwave.py | Updates surrogate import path; removes commented-out surrogate test block. |
| bbo_via_fmqa/FM_surrogate.py | Makes training accept precomputed feature vectors and reduces epochs. |
| README.md | Replaces README with a longer algorithm overview + setup/structure sections. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-28-31.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-26-32.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-24-34.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-22-00.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-19-55.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-17-08.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-15-02.csv | Deleted log artifact. |
| bbo_via_fmqa/output/fmqa_dwave_log_2025-12-04_15-12-52.csv | Deleted log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_17-10-48.csv | Deleted archived log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_14-35-14.csv | Deleted archived log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_14-32-58.csv | Deleted archived log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_14-28-14.csv | Deleted archived log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_14-25-48.csv | Deleted archived log artifact. |
| bbo_via_fmqa/output/archive/fmqa_dwave_log_2025-11-27_14-23-53.csv | Deleted archived log artifact. |
| bbo_via_fmqa/dataset/compl_enum_cstr_34_baron_bigm.csv | Deleted dataset artifact. |
| bbo_via_fmqa/dataset/compl_enum_cstr_30_baron_hull.csv | Deleted dataset artifact. |
| bbo_via_fmqa/dataset/compl_enum_cstr_17_baron_hull.csv | Deleted dataset artifact. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
bernalde
left a comment
There was a problem hiding this comment.
There are a number of open comments from the previous review of mine and copilot plus this new ones. Please respond them all, and make sure to fix the merge conflict with the README file
bbo_via_fmqa/fmqa_simulated.py
Outdated
| # --- Parameters --- | ||
| max_cycles = 150 | ||
| convergence_patience = int(len(grid) * 0.01) | ||
| convergence_patience = max(1, int(len(grid) * 0.01)) |
There was a problem hiding this comment.
This 0.01 should be a parameter to be set early in the file or through some external argument as it is something we want to change
| @@ -378,10 +411,29 @@ def solve_surrogate_SA(fm_model, x_bound, y_bound, evaluated_points, sampler, gr | |||
|
|
|||
| def solve_surrogate_SA_3d(fm_model, x_bound, y_bound, z_bound, evaluated_points, sampler, grid): | |||
There was a problem hiding this comment.
Why do we have a separate 3D and 2D function? Doesn't the logic apply the same?
FMQA now trains properly with 2D graphs.
Fixes to setup.py and README.