You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Switching to a variant that checks if it's closed should work:
not sys.stdout.closed and sys.stdout.isatty()
Module (check all that applies):
torchx.spec
torchx.component
torchx.apps
torchx.runtime
torchx.cli
torchx.schedulers
torchx.pipelines
torchx.aws
torchx.examples
other
To Reproduce
I'm not sure how to repro this externally other than explicitly closing sys.stdout
I/O operation on closed file
Stack trace:
...
from torchx.cli.cmd_log import get_logs
File: <"/mnt/xarfuse/uid-27156/4adc7caa-seed-nspid4026533510_cgpid2017229-ns-4026533507/torchx/cli/cmd_log.py">, line 20, in <module>
from torchx.cli.colors import GREEN, ENDC
File: <"/mnt/xarfuse/uid-27156/4adc7caa-seed-nspid4026533510_cgpid2017229-ns-4026533507/torchx/cli/colors.py">, line 11, in <module>
if sys.stdout.isatty():
Expected behavior
Doesn't crash
Environment
torchx version (e.g. 0.1.0rc1): main
Python version:
OS (e.g., Linux):
How you installed torchx (conda, pip, source, docker):
🐛 Bug
Sometimes
sys.stdout
is closed andisatty()
throws an error at https://github.com/pytorch/torchx/blob/main/torchx/cli/colors.py#L11Switching to a variant that checks if it's closed should work:
Module (check all that applies):
torchx.spec
torchx.component
torchx.apps
torchx.runtime
torchx.cli
torchx.schedulers
torchx.pipelines
torchx.aws
torchx.examples
other
To Reproduce
I'm not sure how to repro this externally other than explicitly closing
sys.stdout
Expected behavior
Doesn't crash
Environment
conda
,pip
, source,docker
):Additional context
The text was updated successfully, but these errors were encountered: