Skip to content

Commit c7a8a46

Browse files
Tony Kaofacebook-github-bot
authored andcommitted
torchx - profile scheduler validate call (#972)
Summary: track torchx scheduler validate() call. Will capture elapse time and whether validation failed. There is no behavior impact to torchx users as this change only add logging for monitoring purpose verified scuba log has the validate record: https://fburl.com/scuba/pytorch_elastic_tsm_log/jza7f33n Differential Revision: D66166216
1 parent 5e44f20 commit c7a8a46

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

torchx/runner/api.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -433,7 +433,11 @@ def dryrun(
433433
" Either a patch was built or no changes to workspace was detected."
434434
)
435435

436-
sched._validate(app, scheduler, resolved_cfg)
436+
with log_event(
437+
"validate",
438+
scheduler,
439+
):
440+
sched._validate(app, scheduler, resolved_cfg)
437441
dryrun_info = sched.submit_dryrun(app, resolved_cfg)
438442
dryrun_info._scheduler = scheduler
439443
return dryrun_info

0 commit comments

Comments
 (0)