Skip to content
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

Add override state value field to initialize_from #416

Open
skrawcz opened this issue Nov 4, 2024 · 0 comments
Open

Add override state value field to initialize_from #416

skrawcz opened this issue Nov 4, 2024 · 0 comments
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Contributors wanted! storage

Comments

@skrawcz
Copy link
Contributor

skrawcz commented Nov 4, 2024

Is your feature request related to a problem? Please describe.
When forking from state, we might want to augment the state as part of debugging/forking.

Describe the solution you'd like
To be able to modify the starting state when using initialize_from to build the initial state.

Use cases:

  • fix state (e.g. I saw in the state it was bad, let me fix it)
  • turn on other logic via state
  • override values, e.g. change the email, etc.
values_i_want_to_override = {"key": "value"} 

app = (ApplicationBuilder().
    ...
  .initialize_from(
   ..., 
   override_state_values=values_i_want_to_override
  ).build()
)

For the UI:

  • we should call the override out. E.g. via some marker to indicate we forked, but modified state...

Describe alternatives you've considered
You can do this today, it just happens outside of the application builder:

  1. manually load state via the persister.
  2. adjust the state as needed
  3. create a graph from that state and that point in the graph

Additional context
This just reduces some boilerplate.

@skrawcz skrawcz added enhancement New feature or request good first issue Good for newcomers help wanted Contributors wanted! storage labels Nov 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers help wanted Contributors wanted! storage
Projects
None yet
Development

No branches or pull requests

1 participant