Skip to content

Commit

Permalink
Make --log wait automatically in run
Browse files Browse the repository at this point in the history
Summary: 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: 66aa5cd9c5043e03182e708d4cf44c6b4b35d395
  • Loading branch information
kunalb authored and facebook-github-bot committed Aug 31, 2023
1 parent 022fb24 commit 9ab0645
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 9ab0645

Please sign in to comment.