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 6 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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
4 changes: 4 additions & 0 deletions src/lightning_app/CHANGELOG.md
Expand Up @@ -56,11 +56,15 @@ 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 a bug where using `L.app.structures` would cause multiple apps to be opened and fail with an error in the cloud ([#15911](https://github.com/Lightning-AI/lightning/pull/15911))


- 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
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