Skip to content

modal run -q option does not do what it says #2076

@zsiegel92

Description

@zsiegel92

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!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions