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

Restore the Pausetimes Apps in the UI #130

Merged
merged 18 commits into from
Jun 3, 2023

Conversation

punchagan
Copy link
Contributor

@punchagan punchagan commented May 30, 2023

This PR re-enables the previously disabled Pausetimes apps. The apps have been updated to display the data in the new benchmark directories pausetimes_seq and pausetimes_par produced using olly latency.

The PR also:

  1. Adds a script that fixes pausetimes bench files to be formatted similar to the new formatting implemented in Improve JSON output produced by olly gc-stats tarides/runtime_events_tools#13
  2. Calls this script when copying data to the main branch to ensure any new data is formatted correctly. This is required until we are able to use the latest version of runtime_events_tools in Sandmark, which depends on ppxlib being compatible with OCaml 5.1 and 5.2.
  3. Updates existing bench files pausetimes_* to use the new formatting, along with fixing an issue with the bench files having pretty printed JSON which breaks the assumption that every line in the bench file is a valid JSON string. This was fixed in Print the JSON for each pausetimes benchmark in a single line sandmark#452

@@ -1,27 +1,21 @@
import streamlit as st
Copy link
Contributor

Choose a reason for hiding this comment

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

The runtime is no longer instrumented. Best to call it pausetimes_parallel.py. Similarly for the sequential one.

@kayceesrk
Copy link
Contributor

Left a minor comment. Otherwise, LGTM.

FWIW, I'm not able to review this UI/UX PRs easily without being able to test the app. We'll have to merge the PR and then fix any issues observed.

Do we have a staging area where we can deploy the app and then test it before we deploy it in production?

@punchagan
Copy link
Contributor Author

@kayceesrk Thanks for the review!

Do we have a staging area where we can deploy the app and then test it before we deploy it in production?

We don't have a staging area, but I just deployed the branch on the Streamlit (free) hosting. You can check it out here.

The deployment doesn't seem to use the exact versions of dependencies specified in our requirements.txt, probably since they try to be smart by installing some dependencies (pandas, altair, etc.) by default for all the apps. Currently the Parallel pausetimes app is crashing, but the sequential one works. I'm looking around to see if there's a quick fix for the crash.

Left a minor comment. Otherwise, LGTM.

Thanks, I'll address this soon, along with any other comments you may have after using the UI.

@punchagan
Copy link
Contributor Author

I'm looking around to see if there's a quick fix for the crash.

We were using an older version of streamlit in our requirements.txt and the deployment logic for supporting older versions of Streamlit on the cloud was causing issues with other dependencies. I've pushed a commit to update our dependency to the latest version of Streamlit, and everything seems to work okay.

@kayceesrk You can look at the deployed branch here for a more complete review. Thanks!

@kayceesrk
Copy link
Contributor

kayceesrk commented Jun 2, 2023

image

The features look really awesome.

  1. Remove "Instrumented" from all the locations.
  2. Having both "sequential benchmarks" and "pausetimes sequential" seems odd. Can the "pausetimes sequential" appear at the bottom of the "sequential benchmarks" results?
  3. In fact, the pausetimes are no longer computed on instrumented programs. If we are clever about isolating noise, the pausetimes numbers could be computed along with the sequential and parallel runs. FWIW earlier pausetimes were computed on the instrumented runtime, which caused slowdown of programs. This is no longer the case as the pausetimes are read from the shared ring buffer. This will cut down the running time of the nightly runs by 1/2 CC @Sudha247 thoughts?

Please do (1) in this PR as it is quick. For (2), given that the results are computed from different runs unlike suggested in (3), it might be a little tricky. As a stop-gap measure, may I suggest reordering the pages in the following way?

Goto
* Home
* Sequential - throughput
* Sequential - latency
* Parallel - throughput
* Parallel - latency

It may be useful to track (3) in a separate issue.

@punchagan punchagan force-pushed the restore-pausetimes branch 2 times, most recently from a77824c to 4331547 Compare June 2, 2023 07:17
NOTE: The Perfstat output app uses a different `get_dataframe` implementation
than the one used by the other apps which have their data in the JSON format.
We automatically copy successful outputs added by Sandmark builds from the
testing branch to the main branch. Until Sandmark is updated to use the latest
runtime_events_tools, the output would need to be fixed. This commit ensures
that new bench files are fixed before being committed to the main branch.
Make the UI similar to other apps
We were using an outdated version of Streamlit 1.14.0 and this commit updates
to the latest version 1.22.0. This makes it easier to deploy any PR branches of
the app to Streamlit Cloud.

With the older version, we run into a bug in the Streamlit deployment where the
deploy process tries to be smart about "downgrading" Altair to a compatible
version. I'm not sure why a different version of Altair is installed in the
first place, and why it is later downgraded. This results in different versions
of some packages being installed than those specified in our requirements.txt.
@punchagan
Copy link
Contributor Author

@kayceesrk Thanks for the review and the suggestions to make the results less confusing. I've changed the UI and the names of the apps as suggested by you. The staging deployment from this branch can be viewed here.

@Sudha247
Copy link

Sudha247 commented Jun 2, 2023

I also think we can extract both running times and pausetimes from the same run. I've observed the overheads added by olly to be quite low, though we may have to confirm this for the benchmarks in sandmark. Good idea to track this in a separate issue.

We use a unique slug for apps that is used in the URL query parameters to allow
changing the app titles without breaking old/existing URLs.  This change also
ensures that any existing production app URLs in the wild are still functional.
@punchagan
Copy link
Contributor Author

Good idea to track this in a separate issue.

I've created ocaml-bench/sandmark#454. Feel free to edit or add more information.

@kayceesrk kayceesrk merged commit 1e29b73 into ocaml-bench:main Jun 3, 2023
@kayceesrk
Copy link
Contributor

LGTM. Thanks.

@punchagan punchagan deleted the restore-pausetimes branch June 5, 2023 07:55
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.

3 participants