Skip to content
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

Generate and update models ops tests and reimplement the models ops test failure updation script #1234

Merged
merged 8 commits into from
Feb 27, 2025

Conversation

vmilosevic
Copy link
Collaborator

@vmilosevic vmilosevic commented Feb 17, 2025

Summary:

  1. Generated models ops tests by extracting the unique ops configurations across all the pytorch models present inside the forge/test/models directory path.
  2. Skipped avgpool1d, avgpool3d, conv2d, pad and reshape ops test cases due to segmentation fault in CI and transpose ops test cases due to Insufficient host DRAM (requires 30 GB of memory)
  3. Reimplemented the model ops test failure updation script:
    The scripts/model_analysis/models_ops_test_failure_update.py script automates the extraction of detailed test failure information from pytest logs by identifying test cases along with their statuses (FAILED, XFAIL, or SKIP) and corresponding error messages, then compiles this data into a comprehensive Excel report with columns for test cases, marker statuses, and reasons. This report enables users to manually refine error messages by updating the "Reason" column, and once revised, the script can be rerun using the --use_report option with the report file path to automatically update the model ops test files with marker and more descriptive failure messages
  4. The adv_index ops test are failing with indexerror out of bound error(i.e IndexError: index 563 is out of bounds for dimension 0 with size 448) in evaluation. The adv_index ops takes two inputs one is reference tensor and other is indicies tensor based upon the indicies tensor values will pick the reference tensor in respective dim but the indicies values exceeds the range of reference tensor. To resolve these issue, added pytest param max_int which will be used by the create_from_shape method in forge/forge/tensor.py to generate the indices tensor values with the range of the reference tensor

Process:

  1. Triggered the nightly models ops pipeline for collecting the pytest logs
    Pipeline: https://github.com/tenstorrent/tt-forge-fe/actions/runs/13536357567
    Collected logs:
    test-log-n150-1
    test-log-n150-2
    test-log-n150-3
    test-log-n150-4

  2. Using the collected pytest logs, generated excel report by using scripts/model_analysis/models_ops_test_failure_update.py script
    Command:
    python scripts/model_analysis/models_ops_test_failure_update.py --log_files ci_logs/pytest_1.log ci_logs/pytest_2.log ci_logs/pytest_3.log ci_logs/pytest_4.log
    Generated models ops test report:
    model_ops_tests_report.xlsx

  3. Anlalyzed the excel report and update the models ops tests with xfail marker and failure reason by using the scripts/model_analysis/models_ops_test_failure_update.py script with use_report option enabled
    Command:
    python scripts/model_analysis/models_ops_test_failure_update.py --report_file_path model_ops_tests_report.xlsx --use_report

  4. Triggered the nightly models ops pipeline and all the test are passed.
    Pipeline: https://github.com/tenstorrent/tt-forge-fe/actions/runs/13540060061

Note:

This models ops test takes around 2hrs to run in push pipeline, so created a separate workflow to run this model ops test- #1316. So renamed the model ops test marker from push to nightly_models_ops

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

2 similar comments
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

3 similar comments
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

@chandrasekaranpradeep chandrasekaranpradeep force-pushed the generate_models_ops_test branch 2 times, most recently from d481e6e to 4a493d3 Compare February 19, 2025 12:59
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

2 similar comments
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

3 similar comments
Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ❌️SkippedFailed
TT-Forge-FE Tests0 ran0 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅SkippedFailed
TT-Forge-FE Tests419 ran419 passed0 skipped0 failed
TestResult
No test annotations available

3 similar comments
Copy link

TestsPassed ✅SkippedFailed
TT-Forge-FE Tests419 ran419 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅SkippedFailed
TT-Forge-FE Tests419 ran419 passed0 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅SkippedFailed
TT-Forge-FE Tests419 ran419 passed0 skipped0 failed
TestResult
No test annotations available

@chandrasekaranpradeep chandrasekaranpradeep force-pushed the generate_models_ops_test branch 2 times, most recently from f5af55f to df1f1f5 Compare February 20, 2025 09:42
@chandrasekaranpradeep chandrasekaranpradeep marked this pull request as ready for review February 26, 2025 11:32
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests672 ran536 passed136 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests613 ran481 passed132 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests672 ran536 passed136 skipped0 failed
TestResult
No test annotations available

Copy link
Contributor

@nvukobratTT nvukobratTT left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good!

General comment, let's see to create documentation for this one as well. Logic for generating model tests, collecting those data, etc. becomes more and more complex. It'll be good to have a robust documentation on this set of features.

Can you make a proposal how you would stracture doc? No need to have details for proposal. Let's agree on initial structure before we proceed further.

Note: Doc isn't major priority, let's finilize current efforts before we tackle with docs.

@chandrasekaranpradeep
Copy link
Contributor

chandrasekaranpradeep commented Feb 27, 2025

Looks good!

General comment, let's see to create documentation for this one as well. Logic for generating model tests, collecting those data, etc. becomes more and more complex. It'll be good to have a robust documentation on this set of features.

Can you make a proposal how you would stracture doc? No need to have details for proposal. Let's agree on initial structure before we proceed further.

Note: Doc isn't major priority, let's finilize current efforts before we tackle with docs.

@nvukobratTT Created issue for documenting this ops test feature which also contains doc structure

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests616 ran484 passed132 skipped0 failed
TestResult
No test annotations available

Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

1 similar comment
Copy link

TestsPassed ✅Skipped ⚠️Failed
TT-Forge-FE Tests675 ran538 passed137 skipped0 failed
TestResult
No test annotations available

@chandrasekaranpradeep chandrasekaranpradeep merged commit 0cde875 into main Feb 27, 2025
10 checks passed
@chandrasekaranpradeep chandrasekaranpradeep deleted the generate_models_ops_test branch February 27, 2025 11:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants