-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Refs/heads/add nightly test multi gpu configs #12870
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from 14 commits
Commits
Show all changes
15 commits
Select commit
Hold shift + click to select a range
16d1d47
add multi GPU config to nightly-test.yml
alisonshao 29afa8b
add kernel build step to nightly tests
alisonshao ce9713d
revert kernel build step - not needed for nightly tests
alisonshao 0222a21
add new nightly test jobs to CI monitor
alisonshao 8fca818
increase timeout for nightly-test-1-gpu to 60 minutes
alisonshao b875b8f
Add continue-on-error to nightly test jobs
alisonshao 52bbb27
Merge branch 'main' into add-nightly-test-multi-gpu-configs
alisonshao f287d92
Fix test suite names to match available suites in run_suite.py
alisonshao 544e1a4
Create nightly test suites for multi-GPU configs
alisonshao d94ee9b
Implement continue-on-error for nightly tests
alisonshao 2cb570a
Add test summary at end showing passed/failed tests
alisonshao 4cd2949
Add retry logic for VLM eval test to handle flaky CUDA graph capture
alisonshao a8e75b7
Merge branch 'main' into add-nightly-test-multi-gpu-configs
Fridge003 8445d13
Format run_unittest_files function signature
alisonshao bdd2df1
Update .github/workflows/nightly-test.yml
Fridge003 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -735,9 +735,22 @@ class TestFile: | |
| estimated_time: float = 60 | ||
|
|
||
|
|
||
| def run_unittest_files(files: List[TestFile], timeout_per_file: float): | ||
| def run_unittest_files( | ||
| files: List[TestFile], timeout_per_file: float, continue_on_error: bool = False | ||
| ): | ||
| """ | ||
| Run a list of test files. | ||
|
|
||
| Args: | ||
| files: List of TestFile objects to run | ||
| timeout_per_file: Timeout in seconds for each test file | ||
| continue_on_error: If True, continue running remaining tests even if one fails. | ||
| If False, stop at first failure (default behavior for PR tests). | ||
| """ | ||
| tic = time.perf_counter() | ||
| success = True | ||
| passed_tests = [] | ||
| failed_tests = [] | ||
|
|
||
| for i, file in enumerate(files): | ||
| filename, estimated_time = file.name, file.estimated_time | ||
|
|
@@ -769,24 +782,52 @@ def run_one_file(filename): | |
| ret_code = run_with_timeout( | ||
| run_one_file, args=(filename,), timeout=timeout_per_file | ||
| ) | ||
| assert ( | ||
| ret_code == 0 | ||
| ), f"expected return code 0, but {filename} returned {ret_code}" | ||
| if ret_code != 0: | ||
| print( | ||
| f"\n✗ FAILED: {filename} returned exit code {ret_code}\n", | ||
| flush=True, | ||
| ) | ||
| success = False | ||
| failed_tests.append((filename, f"exit code {ret_code}")) | ||
| if not continue_on_error: | ||
| # Stop at first failure for PR tests | ||
| break | ||
| # Otherwise continue to next test for nightly tests | ||
| else: | ||
| passed_tests.append(filename) | ||
| except TimeoutError: | ||
| kill_process_tree(process.pid) | ||
| time.sleep(5) | ||
| print( | ||
| f"\nTimeout after {timeout_per_file} seconds when running {filename}\n", | ||
| f"\n✗ TIMEOUT: {filename} after {timeout_per_file} seconds\n", | ||
| flush=True, | ||
| ) | ||
| success = False | ||
| break | ||
| failed_tests.append((filename, f"timeout after {timeout_per_file}s")) | ||
| if not continue_on_error: | ||
| # Stop at first timeout for PR tests | ||
| break | ||
| # Otherwise continue to next test for nightly tests | ||
|
Comment on lines
769
to
+810
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The failure handling logic for non-zero exit codes and timeouts is very similar and contains duplicated code. You can refactor this to reduce duplication and improve readability by handling the failure condition after the failure_reason = None
try:
ret_code = run_with_timeout(
run_one_file, args=(filename,), timeout=timeout_per_file
)
if ret_code == 0:
passed_tests.append(filename)
else:
print(
f"\n✗ FAILED: {filename} returned exit code {ret_code}\n",
flush=True,
)
failure_reason = f"exit code {ret_code}"
except TimeoutError:
kill_process_tree(process.pid)
time.sleep(5)
print(
f"\n✗ TIMEOUT: {filename} after {timeout_per_file} seconds\n",
flush=True,
)
failure_reason = f"timeout after {timeout_per_file}s"
if failure_reason:
success = False
failed_tests.append((filename, failure_reason))
if not continue_on_error:
break |
||
|
|
||
| if success: | ||
| print(f"Success. Time elapsed: {time.perf_counter() - tic:.2f}s", flush=True) | ||
| else: | ||
| print(f"Fail. Time elapsed: {time.perf_counter() - tic:.2f}s", flush=True) | ||
|
|
||
| # Print summary | ||
| print(f"\n{'='*60}", flush=True) | ||
| print(f"Test Summary: {len(passed_tests)}/{len(files)} passed", flush=True) | ||
| print(f"{'='*60}", flush=True) | ||
| if passed_tests: | ||
| print("✓ PASSED:", flush=True) | ||
| for test in passed_tests: | ||
| print(f" {test}", flush=True) | ||
| if failed_tests: | ||
| print("\n✗ FAILED:", flush=True) | ||
| for test, reason in failed_tests: | ||
| print(f" {test} ({reason})", flush=True) | ||
| print(f"{'='*60}\n", flush=True) | ||
|
|
||
| return 0 if success else -1 | ||
|
|
||
|
|
||
|
|
||
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.