-
Notifications
You must be signed in to change notification settings - Fork 161
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 local development hot-reloading for experiment reports #862
Comments
A small note: There's a
|
Hi @myanvoos, I'm very interested in working on this feature. I agree that having automatic hot-reloading of the experiment reports would greatly improve the local development workflow, especially when running experiments with Could you please assign this issue to me so I can start working on it? Thanks! |
Hi everyone, I've submitted PR #869 which implements the hot-reloading functionality for experiment reports. This PR introduces a new --watch flag to run_all_experiments.py that uses Python's watchdog library to monitor the results directory. When changes are detected, it automatically triggers an update of the results-report directory by running the report generation command. Thank you for the discussion and feedback so far. I'm looking forward to your review and am happy to make further adjustments if needed! |
Hi @Vinay152003 and @Karanjot786 , I think before working on this issue we should discuss with @DonggeLiu and @DavidKorczynski about whether this is worth doing or not first. I opened the issue for discussion only as I am not a maintainer of this repo and this is just an idea of mine. We should consider how the idea fits into the broader structure of the project before jumping ahead to implement it since it may lead to headaches for maintainers later on. Especially since as mentioned there's the |
Hi @myanvoos, I completely agree with your points. That’s exactly why I’m reaching out—to open a discussion with @DonggeLiu and @DavidKorczynski about how this idea might fit into the broader project structure. I want to ensure that if we move forward, it aligns well with the maintainers' vision and minimizes potential headaches. |
Thanks @myanvoos for proposing this, @Vinay152003 for the PR, and @Karanjot786 for the discussion.
|
Hi @DonggeLiu, Thanks for the feedback. I agree that a separate, manually-triggered script for hot-reloading makes sense, especially to avoid overloading |
A separate process sounds good since this task is mainly targeting local development workflows and should be optional. I reckon we can have something like ./run-report-server.py \
-r <results-dir> \
-o <output-dir> \
[-p <port>] \
[-i <interval-seconds>] \
[-w | --watch-fs] \
[-t | --watch-template] where # Generate reports once and serve them, no hot-reloading (default)
./run-report-server.py -r <results-dir> -o <output-dir>
# Generate reports with time-based reloading (every 10 minutes to match with the cloud script)
./run-report-server.py -r <results-dir> -o <output-dir> -i 600
# Generate reports with filesystem watching (reload on changes)
./run-report-server.py -r <results-dir> -o <output-dir> -w
# Generate reports with both time and filesystem-based reloading
./run-report-server.py -r <results-dir> -o <output-dir> -i 600 -w
# Generate reports with both time and filesystem-based reloading
# This watches the report/ folder too for development purposes
./run-report-server.py -r <results-dir> -o <output-dir> -i 600 -w -t Edit: Or we can extend the existing command line argument parser in |
Yep, extending |
Related discussion #862 This PR extends the command line parser in [`web.py`](https://github.com/google/oss-fuzz-gen/blob/main/report/web.py) to take in some additional inputs as outlined [here](#862 (comment)). It also adds an optional server-side hot-reloading functionality with the `watchdog` library. Happy to iterate upon this @DonggeLiu, and whenever you're ready --------- Co-authored-by: Dongge Liu <donggeliu@google.com>
Related discussion #862 This PR extends the command line parser in [`web.py`](https://github.com/google/oss-fuzz-gen/blob/main/report/web.py) to take in some additional inputs as outlined [here](#862 (comment)). It also adds an optional server-side hot-reloading functionality with the `watchdog` library. Happy to iterate upon this @DonggeLiu, and whenever you're ready --------- Co-authored-by: Dongge Liu <donggeliu@google.com>
To my understanding, right now while an experiment is running locally with
./run-all-experiments.py
, the results go in theresults
directory (or as specified by the user) whenever they're available. Theresults-report
directory is only updated after we manually runpython -m report.web -r results -o results-report
. This means that currently there's no automatic refresh/update of the report while the experiment is still running locally.It might be good to add a functionality that watches the
results
directory for any new finished experiment, then automatically updatesresults-report
(or equivalent) and hot-reloads the HTTP server accordingly. So you can run the local HTTP server alongside experiments. Perhaps this can be triggered with a--watch
flag on./run_all_experiments.py
or onpython -m report.web -r results -o results-report
.Discussion much appreciated :) I'll have an experimental PR for demonstration up later this week.
The text was updated successfully, but these errors were encountered: