Skip to content

Commit

Permalink
Updates GPU test timeout to use mcloud flag (#510)
Browse files Browse the repository at this point in the history
* timeout

* timeout

* isort
  • Loading branch information
mvpatel2000 authored Aug 8, 2023
1 parent 3072abb commit 7ac554d
Showing 1 changed file with 2 additions and 9 deletions.
11 changes: 2 additions & 9 deletions .github/mcp/mcp_pytest.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import time

from mcli.sdk import (RunConfig, RunStatus, create_run, follow_run_logs,
stop_run, wait_for_run_status)
wait_for_run_status)

if __name__ == '__main__':

Expand Down Expand Up @@ -109,6 +109,7 @@
image=args.image,
integrations=[git_integration],
command=command,
scheduling={'max_duration_seconds:': args.timeout},
)

# Create run
Expand All @@ -123,14 +124,6 @@
# Print logs
for line in follow_run_logs(run):
print(line, end='')
# Check if args.timeout seconds have elapsed
if time.time() - start_time > args.timeout:
print(
f'[GHA] Run timed out and did not complete in {args.timeout/60} minutes.'
)
run = stop_run(run)
print('[GHA] Run stopped.')
break

print('[GHA] Run completed. Waiting for run to finish...')
run = wait_for_run_status(run, status='completed')
Expand Down

0 comments on commit 7ac554d

Please sign in to comment.