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

Adds snapshots slider for sim engine plots #851

Merged
merged 3 commits into from
Apr 4, 2024
Merged

Conversation

calina-c
Copy link
Contributor

@calina-c calina-c commented Apr 2, 2024

No description provided.

@calina-c calina-c marked this pull request as ready for review April 2, 2024 13:44
@calina-c calina-c requested a review from idiom-bytes April 2, 2024 13:44
@calina-c calina-c force-pushed the add-streamlit-snapshots branch from ac8058d to 8bf0f99 Compare April 2, 2024 13:48
snapshots = SimPlotter.available_snapshots()
timestamp = inputs.select_slider("Go to snapshot", snapshots, value="final")
st, new_ts = sim_plotter.load_state(timestamp)
load_canvas_on_state(timestamp)
Copy link
Member

Choose a reason for hiding this comment

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

i might not have waited until the very end to see this come up.
This looks good, but i did not verify/test the slider.

Copy link
Member

@idiom-bytes idiom-bytes left a comment

Choose a reason for hiding this comment

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

tested, everything worked except i didn't wait for engine to end so slider would show up

@calina-c
Copy link
Contributor Author

calina-c commented Apr 4, 2024

tested, everything worked except i didn't wait for engine to end so slider would show up

@idiom-bytes If you want to delve into this some more, you can run the sim for as much time as comfortable. Then go into the sim_state folder and rename the last state for st_{timestamp}.pkl and aimodel_plotter_{timestamp}.pkl as st_final.pkl and aimodel_plotter_final.pkl respectively. That will trick the streamlit runner into thinking the simulation has finished. I am merging this in the meantime, but just letting you know if you want to follow up on it.

@calina-c calina-c merged commit 9331825 into main Apr 4, 2024
5 checks passed
@calina-c calina-c deleted the add-streamlit-snapshots branch April 4, 2024 08:57
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.

2 participants