-
Notifications
You must be signed in to change notification settings - Fork 189
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
Add experimental dashboard to monitor simulations #6137
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These are all optional really. Just some things I noticed. We can't test any of this so once you feel it's ready we can just merge
tools/Status/Dashboard.py
Outdated
with open(outfile, "r") as open_outfile: | ||
st.code("".join(["...\n"] + open_outfile.readlines()[-30:])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Any way to make this scrollable?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried loading the full file but that broke the server :D Added a comment
tools/Status/Dashboard.py
Outdated
# Refresh the page regularly | ||
if st.toggle("Auto-refresh", True): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I found that if there is an error rending one of the plots of an executable status, then the auto-refresh is somehow disabled. Clicking on a different run brings it back. Any ideas on what to do for this?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ah ok I moved the auto refresh further up in the script, that should fix it
job: A dictionary of job information, including the input file and | ||
working directory. See the 'spectre.tools.Status.status' function |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
fetch_status
or render_status
to be explicit?
"L2Norm(PointwiseL2Norm(GaugeConstraint))", | ||
"L2Norm(PointwiseL2Norm(ThreeIndexConstraint))", | ||
"L2Norm(PointwiseL2Norm(FourIndexConstraint))", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe use
[col for col in df.columns if "Constraint" in col]
so that it will work if people stray from the pipeline a bit?
# Eccentricity | ||
# (can be enabled once EccentricityControl is available) | ||
# st.subheader("Eccentricity") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've updated this section since you opened this. Wanna add those changes in?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It's enabled now since #5895 was merged
|
||
class EllipticStatus(ExecutableStatus): |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you've also added a dashboard for the elliptic one too since you opened this. Wanna add that? I think the only thing is figuring out how to show the latest control step and not just the first one.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the elliptic dashboard. It only shows the convergence for the first control step atm, and also plots the convergence of the control parameter. I'll probably combine these somehow, but haven't decided how yet. Also AMR iterations are still missing from the status.
249873b
to
53f1077
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything else looks ok
# Compute separation | ||
num_obs = len(ObjectA_centers[:, 0]) | ||
|
||
if len(ObjectB_centers[:, 0]) < num_obs: | ||
num_obs = len(ObjectB_centers[:, 0]) | ||
num_obs = min(len(ObjectA_centers[:, 0]), len(ObjectB_centers[:, 0])) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Maybe this commit and the one before should be in a separate PR since they are a bug fix? That way they don't get buried in an experimental PR
@nilsvu once the tests are fixed, we can merge this |
Make sure isort always treats the `spectre` imports as first party. Before this fix, isort could get confused if the source directory was not named "spectre".
Allows to call the function separately from the CLI.
3876903
to
09402e2
Compare
- Fix issue with trajectories having different lengths - Pass in an MPL figure for plots instead of always writing the plot to a file.
Ok I squashed and rebased. Thanks for reviewing! |
Proposed changes
This takes the
status
data and displays it in a web browser for all running jobs on the cluster, along with lots of plots to show the current state of BBH simulations. It's experimental, in that to use it you have topip install streamlit
by yourself and runbin/python-spectre -m streamlit run tools/Status/Dashboard.py
to start the dashboard. There are some instructions in the file.Here's a glance at what it looks like:
I found this so useful when monitoring BBH simulations that I decided to open this experimental PR.
Upgrade instructions
Code review checklist
make doc
to generate the documentation locally intoBUILD_DIR/docs/html
.Then open
index.html
.code review guide.
bugfix
ornew feature
if appropriate.Further comments