-
Notifications
You must be signed in to change notification settings - Fork 68
Description
Hello,
During development, I frequently run Modal applications like this:
@app.local_entrypoint()
def main():
outputs = some_modal_function.remote()
import ipdb; ipdb.set_trace() # fmt: skip # noqa
That starts a debugging shell where the output can be inspected, etc. I have been using pdb
and ipdb
in this way for many years.
It is necessary to run a script like this with the -q
option. That is, modal run -iq script.py
is necessary, or else the Modal progress indicators get in the way of the debug shell.
modal run --help
shows the following:
-q, --quiet Don't show Modal progress indicators.
But actually, modal run -q script.py
doesn't just hide the Modal progress indicators, it also redirects all console output that remote functions print to stdout
and stderr
. To see this output, I have to open a browser tab to modal.com, which I usually have open anyway.
This is a bit annoying, but more importantly it deviates from the CLI's description of that argument. For me, if it honored the CLI description (hide Modal progress indicators but don't hide other output), that would be ideal. I suppose if that's a huge lift you could just edit the CLI description to say "Don't show Modal progress indicators or stdout/stderr from remote containers.", but for me that would not be preferred.
Thanks so much!