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

Potential crash when frontend is not fast enough #11

Open
edwin0cheng opened this issue Nov 9, 2024 · 4 comments
Open

Potential crash when frontend is not fast enough #11

edwin0cheng opened this issue Nov 9, 2024 · 4 comments

Comments

@edwin0cheng
Copy link

I found that in the code below:

init_env_file = f"{sim_folder}/environment/{str(self.step)}.json"

Reverie::__init__ will try to open the current step environment file which is provided by frontend server.

But I saw in

if check_if_file_exists(curr_env_file):

It will wait for the frontend to produce it.

But Reverie::__init__ is called before Reverie::start_server, such that if the frontend is not fast enough, Reverie::__init__ one will crash.

Do I miss something here ?

@LuisESV
Copy link

LuisESV commented Nov 9, 2024

This might be a different issue but when running ./run_backend_automatic.sh -o base_the_ville_isabella_maria_klaus -t test_1 -s 4 --ui False it will stop the simulation every 200 steps (When saving) - Is that expected?

@drudilorenzo
Copy link
Owner

This might be a different issue but when running ./run_backend_automatic.sh -o base_the_ville_isabella_maria_klaus -t test_1 -s 4 --ui False it will stop the simulation every 200 steps (When saving) - Is that expected?

This is a wanted behavior (by me). Reason:

  • The code was full of bugs.
  • I really needed something working, and I hadn't time for investigating and solving every problem.
  • If the simulation fails after 2000 steps you loose lots of hours. Thus, i decided to divide the simulation in chunk by saving every 200 steps. In this case, even if it fails, it is possible to restart from a checkpoint not too far in time.

Does it make sense?

@LuisESV
Copy link

LuisESV commented Nov 15, 2024

That makes sense. Having said that, It should continue automatically right? OR is it expected for us to reload the browser?

@drudilorenzo
Copy link
Owner

That makes sense. Having said that, It should continue automatically right? OR is it expected for us to reload the browser?

It should automatically restart a new simulation. Here the code the make it happen: https://github.com/drudilorenzo/generative_agents/blob/fix-and-improve/reverie/backend_server/automatic_execution.py#L93

jackboyla pushed a commit to jackboyla/generative_agents that referenced this issue Dec 14, 2024
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

No branches or pull requests

3 participants