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

[App] Improve debug triggering #15951

Merged
merged 30 commits into from
Dec 8, 2022
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
Show all changes
30 commits
Select commit Hold shift + click to select a range
a6afb68
rely on debug from python
Dec 7, 2022
4cf48aa
update
Dec 7, 2022
4cb4f6c
update
Dec 7, 2022
9e04e8f
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
feb5e00
Merge branch 'master' into improve_debug
Dec 8, 2022
29c6081
Merge branch 'improve_debug' of https://github.com/Lightning-AI/light…
Dec 8, 2022
6c127d5
Merge branch 'master' into improve_debug
Borda Dec 8, 2022
0a64fd1
Merge branch 'master' into improve_debug
Borda Dec 8, 2022
62f420a
Merge branch 'master' into improve_debug
Dec 8, 2022
3e4f960
Merge branch 'improve_debug' of https://github.com/Lightning-AI/light…
Dec 8, 2022
fad5904
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
1a4a513
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
636cf19
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
6943a0d
Merge branch 'master' into improve_debug
Dec 8, 2022
1cbded7
Merge branch 'improve_debug' of https://github.com/Lightning-AI/light…
Dec 8, 2022
26633e6
update
Dec 8, 2022
754ec54
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
99c77fa
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
745b0f6
update
Dec 8, 2022
9c4a01d
Merge branch 'improve_debug' of https://github.com/Lightning-AI/light…
Dec 8, 2022
9388e4a
update
Dec 8, 2022
deddd3a
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
b06b5db
Merge branch 'master' into improve_debug
tchaton Dec 8, 2022
362ed46
update
Dec 8, 2022
5aa035d
update
Dec 8, 2022
0f55ffc
update
Dec 8, 2022
c27f4e0
update
Dec 8, 2022
1fe087e
update
Dec 8, 2022
e5a2a27
update
Dec 8, 2022
235956b
update
Dec 8, 2022
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lightning_app/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,13 @@ The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/).

- Fixed the `enable_spawn` method of the `WorkRunExecutor` ([#15812](https://github.com/Lightning-AI/lightning/pull/15812)


- Fixed Sigterm Handler causing thread lock which caused KeyboardInterrupt to hang ([#15881](https://github.com/Lightning-AI/lightning/pull/15881))


- Fixed detection of a Lightning App running in debug mode ([#15951](https://github.com/Lightning-AI/lightning/pull/15951))


## [1.8.3] - 2022-11-22

### Changed
Expand Down
7 changes: 1 addition & 6 deletions src/lightning_app/utilities/app_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -511,14 +511,9 @@ def is_static_method(klass_or_instance, attr) -> bool:
return isinstance(inspect.getattr_static(klass_or_instance, attr), staticmethod)


def _debugger_is_active() -> bool:
"""Return if the debugger is currently active."""
return hasattr(sys, "gettrace") and sys.gettrace() is not None


def _should_dispatch_app() -> bool:
return (
_debugger_is_active()
__debug__
and not bool(int(os.getenv("LIGHTNING_DISPATCHED", "0")))
and "LIGHTNING_APP_STATE_URL" not in os.environ
)
Expand Down