Skip to content

Conversation

@jessica-moylan
Copy link
Collaborator

@jessica-moylan jessica-moylan commented Jan 15, 2026

Summary

Allows the user to be more involved within optimization loop having the ability to manually approve/reject suggested points as well as suggesting custom points throughout the process.

Interactive Optimization Workflow

  1. Would you like to run in interactive mode?

    • NoAutomatic mode
      • Run optimize_normal()
      • Complete all iterations automatically
    • YesInteractive mode
      • Proceed to Step 2
  2. Manually approve suggestions?

    • NoAutomated suggestions
      • Run optimize_step()
      • Proceed to Step 3 (post-iteration options)
    • YesManual approval mode
      • Approval cadence
        • Specify number of steps before next approval (x)
      • Per every x iterations
        • Suggest a point
        • Prompt: > “Do you approve this point?”
        • Yes → evaluate point
        • No → discard point and suggest a new one
      • After all suggested points:
        • Proceed to Step 3
  3. Next action
    Prompt the user: > "What would you like to do?"

    • c — Continue optimization (no manual suggestions)
      • Return to Step 1
    • s — Suggest points manually
      • Enter DOF values and objective values
      • Ingest values into the model
      • Return to Step 1
    • q — Quit optimization

Comments

Interactive agent is not available when stdin is not avaliable (when running pytests, build-docs, and doctest)

Closes #132

Copy link
Contributor

@thopkins32 thopkins32 left a comment

Choose a reason for hiding this comment

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

Looks great so far. I like the proposed flow of user input.

I know we talked about making optimize the main plan to use and branching off to other plans for interactive vs. automatic. However, I think that this won't work well. We can always refactor later if we feel they are similar enough.

Here are a few design changes:

  1. Keep the original optimize intact with optimize_step the exact same as before this PR. We should only add net new functionality for now (no lines of code deleted, only added).
  2. Let's do an optimize_interactive plan at a top level that removes the iterations and n_points parameter, since the user can provide those inputs interactively.
  3. Remove the pytest and IPython logic in plans.py, these are not dependencies of Blop. I can help you figure out your issue with this.
  4. Users must provide only DOF (aka parameter) values, never objective values. Objective values are derived from the acquired data after.

There is a remaining difficulty of getting the DOF names from the optimizer which would make the user input nice. Let's assume that we can't for now and simply have the user provide the full dictionary themselves. In a future PR we can work to improve this.

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.

User suggested trials

2 participants