Lightning-AI / pytorch-lightning

Pretrain, finetune ANY AI model of ANY size on multiple GPUs, TPUs with zero code changes.
https://lightning.ai
Apache License 2.0
28.22k stars 3.38k forks source link

Running the cloud tests opens the UI #16070

Closed carmocca closed 1 year ago

carmocca commented 1 year ago

Bug description

Running tests that use CloudRuntime.dispatch will open a ton of browser tabs.

This is caused by the open_ui = True default set in https://github.com/Lightning-AI/lightning/pull/15875

One solution could be to do add an and not _running_tests() condition to https://github.com/Lightning-AI/lightning/blob/c4b27fb69cde2da72876c19184ef7494600ba86a/src/lightning_app/runners/cloud.py#L484

How to reproduce the bug

pytest tests/tests_app/runners/test_cloud.py

Error messages and logs

N/A

Environment

current master

More info

No response

cc @borda

carmocca commented 1 year ago

cc @ethanwharris @tchaton

carmocca commented 1 year ago

Fixed in https://github.com/Lightning-AI/lightning/pull/16114/files#diff-2d6c317d04ba3f0c68eaf887efc70f9b7f8dd241bcfe5fe6888ca07ae2bd38e3R501-R502