Created
December 23, 2024 00:45
-
-
Save elijahbenizzy/1426ef5cba174395e0c6c6629a163490 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from burr.integrations.ray import RayExecutor | |
persister = SQLitePersister(db_path="./db") | |
persister.initialize() | |
app = ( | |
ApplicationBuilder() | |
.with_actions(user_input, final_results, generate_all_poems=GenerateAllPoems()) | |
.with_transitions( | |
("user_input", "generate_all_poems"), | |
("generate_all_poems", "final_results"), | |
) | |
.with_tracker(project="demo:parallel_agents_fault_tolerance") | |
.with_parallel_executor(RayExecutor) | |
.with_state_persister(persister) | |
.initialize_from( | |
persister, | |
resume_at_next_action=True, | |
default_state={}, | |
default_entrypoint="user_input" | |
) | |
.with_identifiers(app_id=app_id) | |
.build() | |
) | |
return app |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment