Skip to content

Make critical point computation interruptible and configurable - #63

Open
johndcobb wants to merge 5 commits into
mainfrom
interrupt_computation
Open

Make critical point computation interruptible and configurable#63
johndcobb wants to merge 5 commits into
mainfrom
interrupt_computation

Conversation

@johndcobb

Copy link
Copy Markdown
Collaborator

Written primarily with codex, but I've looked through it. All tests pass. Addresses #59.

  • Added critical_points keywords:
    expand_start_solutions
    expand_start_solutions_newton
    expand_start_solutions_gradient_flow
    catch_interrupt (matches homotopy continuation flag)
  • Add critical_points controls for disabling start-solution expansion entirely, or disabling Newton and gradient-flow expansion independently. e.g. expand_start_solutions_newton=false skip Newton expansion but not gradient flow.
  • Add interrupt handling that returns partial results when possible during expansion, monodromy tracing, and critical-point partitioning.
  • Add test extras/targets to Project.toml and regression coverage for expansion controls and empty monodromy tracing.

johndcobb added 4 commits May 7, 2026 10:07
Introduce configurable start-solution expansion and interrupt handling. Added StartSolutionExpansionResult type and iterator helpers; added flags expand_start_solutions, expand_start_solutions_newton, expand_start_solutions_gradient_flow and catch_interrupt to critical_points/_expand_start_solutions/_solve_and_trace to allow selective expansion and safe interruption. Improve robustness by catching interrupt exceptions during Newton and gradient-flow phases and returning partial results when appropriate. Wrap graph connection loops with interrupt-aware try/catch and add catch_interrupt arg. Update tests to exercise new expansion options and adjust Project.toml extras/targets for testing.
Add a dedicated docs workflow and documentation source to build and deploy the site automatically (docs/Project.toml, docs/make.jl, docs/src assets and index). Update CI workflow (.github/workflows/ci.yml) to run on pushes to main, include PR-aware concurrency grouping, and use --color=yes + Pkg.test() for running tests. Update Project.toml to remove the unused Pkg extra/target. Ignore built docs in .gitignore. Also include assorted changes to examples, src (gradient_cache, hypersurfaces, pseudo_witness_sets) and tests to accompany these updates.
@johndcobb
johndcobb marked this pull request as ready for review June 17, 2026 21:11
Rename `ProjectedHypersurfaceRegions.jl` to `ProjectedHypersurfaces.jl` throughout the project. Add sampling, interpolation, and irreducible decomposition workflows; introduce structured routing and partition results with interrupt-safe partial results and status codes; and update documentation, examples, tests, plotting, and generated quadratic artifacts for the new APIs.

@oskarhenriksson oskarhenriksson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See below.

Comment thread src/critical_points.jl
Comment on lines +84 to +86
expand_start_solutions = true,
expand_start_solutions_newton = true,
expand_start_solutions_gradient_flow = true,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For simplicity (and to avoid the possibility of the user making inconsistent calls), perhaps it's enough to have the keywords expand_start_solutions_newton and expand_start_solutions_gradient_flow (and then simply use expand_start_solutions_newton || expand_start_solutions_gradient_flow instead of expand_start_solutions)?

Comment thread src/critical_points.jl
Comment on lines 81 to 82
start_grid_width = 5,
start_grid_stepsize = 0.2,

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Only indirectly related to the goal of the PR, but perhaps we should keep the grid size smaller, to avoid the preliminary computation of start solutions taking too long (which isn't great for demonstration purposes). Alternatively, or additionally, one could consider setting the deffault of expand_start_solutions_newton to false, since this usually doesn't give a lot extra start solutions in my experience.

@oskarhenriksson oskarhenriksson left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Made some quick comments. Will look more carefully at this next week.

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.

2 participants