-
-
Notifications
You must be signed in to change notification settings - Fork 722
Fix: Call on_job_end and on_run_end on KeyboardInterrupt (v1.3.2) for [Bug] #3078 on hydra #3086
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
base: main
Are you sure you want to change the base?
Fix: Call on_job_end and on_run_end on KeyboardInterrupt (v1.3.2) for [Bug] #3078 on hydra #3086
Conversation
Previously running `nox -l` took about 5 seconds on my machine. After this change, `nox -l` takes about 3 seconds.
Bumps [express](https://github.com/expressjs/express) from 4.17.2 to 4.18.2. - [Release notes](https://github.com/expressjs/express/releases) - [Changelog](https://github.com/expressjs/express/blob/master/History.md) - [Commits](expressjs/express@4.17.2...4.18.2) --- updated-dependencies: - dependency-name: express dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Mutable default parameters are dangerous: https://docs.python-guide.org/writing/gotchas/#mutable-default-arguments
Bumps [json5](https://github.com/json5/json5) from 1.0.1 to 1.0.2. - [Release notes](https://github.com/json5/json5/releases) - [Changelog](https://github.com/json5/json5/blob/main/CHANGELOG.md) - [Commits](json5/json5@v1.0.1...v1.0.2) --- updated-dependencies: - dependency-name: json5 dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
Previously the error message for get_class failure-to-locate was imprecise.
Co-authored-by: Jasha <[email protected]>
Co-authored-by: Jasha <[email protected]>
Co-authored-by: Omry Yadan <[email protected]>
Bumps [http-cache-semantics](https://github.com/kornelski/http-cache-semantics) from 4.1.0 to 4.1.1. - [Release notes](https://github.com/kornelski/http-cache-semantics/releases) - [Commits](kornelski/http-cache-semantics@v4.1.0...v4.1.1) --- updated-dependencies: - dependency-name: http-cache-semantics dependency-type: indirect ... Signed-off-by: dependabot[bot] <[email protected]>
These changes were produced by running `FIX=1 nox -s lint-3.10` This fixes a number of problems reported by the lint tests. This does not fix all errors: bandit still reports security issues due to using pickle.
…esearch#2565) When constructing the config search path, allow callers to directly pass in a non-relative module name starting with `pkg://`. This allows callers to bypass the relative name lookup, and always get consistent behavior regardless of the current environment variables at runtime. This addresses issue facebookresearch#2564. Co-authored-by: Adam Simpkins <[email protected]> Co-authored-by: Jasha <[email protected]>
|
Hi @termux2o! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks! |

Motivation
This PR fixes a bug where
on_job_endandon_run_endcallbacks are not executed when the program is interrupted via Ctrl+C (KeyboardInterrupt).Without this fix, cleanup and logging callbacks may be skipped, potentially causing inconsistent state or incomplete logs.
The patch ensures that callbacks are called safely during a KeyboardInterrupt while still allowing the program to terminate normally.
Tested on Hydra v1.3.2.
Have you read the Contributing Guidelines on pull requests?
Yes
Test Plan
MyCallback:main.pyruns a small training loop.on_run_start→on_job_start→ Ctrl+C →on_job_end→on_run_endpytesttest forsafe_invoke_on_interrupt()to ensure callbacks are called.Related Issues and PRs