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

Skip GPT-J fx tests for torch < 1.12 #24256

Merged
merged 2 commits into from
Jun 13, 2023
Merged

Skip GPT-J fx tests for torch < 1.12 #24256

merged 2 commits into from
Jun 13, 2023

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Jun 13, 2023

What does this PR do?

After #22069, the fx tests for gpt-j with torch < 1.12 gives an error

(line 941)  AssertionError: Couldn't trace module: 'len' is not supported in symbolic tracing by default. If you want this call to be recorded, please call torch.fx.wrap('len') at module scope

Guess it's best to skip in this case, as it works with recent torch versions.

@@ -385,6 +388,14 @@ class GPTJModelTest(ModelTesterMixin, GenerationTesterMixin, PipelineTesterMixin
test_model_parallel = False
test_head_masking = False

@unittest.skipIf(not is_torch_greater_or_equal_than_1_12, reason="PR #22069 made changes that require torch v1.12+")
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@ydshieh ydshieh requested a review from sgugger June 13, 2023 17:35
Copy link
Collaborator

@sgugger sgugger left a comment

Choose a reason for hiding this comment

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

Thnaks!

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Jun 13, 2023

The documentation is not available anymore as the PR was closed or merged.

@ydshieh ydshieh merged commit 2331131 into main Jun 13, 2023
@ydshieh ydshieh deleted the fix_gptj_fx_in_pt_1_11 branch June 13, 2023 18:33
novice03 pushed a commit to novice03/transformers that referenced this pull request Jun 23, 2023
* fix

* fix

---------

Co-authored-by: ydshieh <[email protected]>
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.

3 participants