Skip to content

Graceful Exits#323

Open
kiankyars wants to merge 4 commits intomainfrom
graceful-exit
Open

Graceful Exits#323
kiankyars wants to merge 4 commits intomainfrom
graceful-exit

Conversation

@kiankyars
Copy link
Copy Markdown
Collaborator

@kiankyars kiankyars commented Aug 25, 2025

closes #315

Here is how code exits gracefully now upon control + c

kian@sampo:~/factorio-learning-environment$ uv run -m fle.run eval --config .fle/test.json 
Using local Factorio container at 127.0.0.1:27000
Connected to 127.0.0.1 client at tcp/27000.
Initial score: 0
/home/kian/factorio-learning-environment/.venv/lib/python3.12/site-packages/gym/utils/passive_env_checker.py:31: UserWarning: WARN: A Box observation space has an unconventional shape (neither an image, nor a 1D vector). We recommend flattening the observation to have only a 1D vector or use a custom policy to properly process the data. Actual observation shape: ()
  logger.warn(
No valid programs found for version 4163 
/home/kian/factorio-learning-environment/.venv/lib/python3.12/site-packages/gym/spaces/box.py:227: UserWarning: WARN: Casting input x to numpy array.
  logger.warn("Casting input x to numpy array.")
^Ckian@sampo:~/factorio-learning-environment$ 

@JackHopkins
Copy link
Copy Markdown
Owner

I think this will fail on Windows. Could you please add a fallback?

@kiankyars
Copy link
Copy Markdown
Collaborator Author

I think this will fail on Windows. Could you please add a fallback?

Thanks a lot for checking this Jack, will add fallback or ideally a platform agnostic solution.

@kiankyars
Copy link
Copy Markdown
Collaborator Author

I think this will fail on Windows. Could you please add a fallback?

can you check and see if it fails please?

@kiankyars
Copy link
Copy Markdown
Collaborator Author

kiankyars commented Aug 27, 2025

@MartBakler if you are able to test this branch on your windows machine I will be very happy.

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.

graceful exiting an eval when using ctrl c

2 participants