Skip to content

Commit

Permalink
Make --log wait automatically in run (#764)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #764

I generally used to find it confusing and assume that `--log` was broken before realizing I always need to specify `--wait` to make it work -- I think it would be better to have `--log` automatically wait for the job to finish.

Differential Revision: D48874784

fbshipit-source-id: 728325213d695b5077b8b4139e42b763875d8a91
  • Loading branch information
kunalb authored and facebook-github-bot committed Sep 1, 2023
1 parent 4d21860 commit 2059c78
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion torchx/cli/cmd_run.py
Original file line number Diff line number Diff line change
Expand Up @@ -223,7 +223,7 @@ def _run(self, runner: Runner, args: argparse.Namespace) -> None:
app_status = runner.status(app_handle)
if app_status:
logger.info(app_status.format())
if args.wait:
if args.wait or args.log:

Check warning on line 226 in torchx/cli/cmd_run.py

View check run for this annotation

Codecov / codecov/patch

torchx/cli/cmd_run.py#L226

Added line #L226 was not covered by tests
self._wait_and_exit(runner, app_handle, log=args.log)

except (ComponentValidationException, ComponentNotFoundException) as e:
Expand Down

0 comments on commit 2059c78

Please sign in to comment.