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

unpin torch to use 1.12.1 #18514

Closed
wants to merge 2 commits into from
Closed

unpin torch to use 1.12.1 #18514

wants to merge 2 commits into from

Conversation

ydshieh
Copy link
Collaborator

@ydshieh ydshieh commented Aug 8, 2022

What does this PR do?

unpin torch to use 1.12.1

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Aug 8, 2022

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

@LysandreJik
Copy link
Member

Let's maybe add a !=1.12.0 as well. cc @sgugger, who also has a PR open here: #17925

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 8, 2022

Here are the tests to fix before we can use 1.12.1

  • tests/models/tapas/test_modeling_tf_tapas.py -k "TFTapasModelTest and test_pt_tf_model_equivalence"
  • tests/onnx/test_onnx_v2.py -k "StableDropoutTestCase and test_training"
  • tests/pipelines/test_pipelines_table_question_answering.py -k "TQAPipelineTests and test_slow_tokenizer_sqa_pt"
  • tests/pipelines/test_pipelines_table_question_answering.py -k "TQAPipelineTests and test_small_model_pt"
  • tests/models/tapas/test_modeling_tapas.py::TapasUtilitiesTest::

@LysandreJik
Copy link
Member

Most tapas tests will likely work given @sgugger's PR above, as it's probably linked to the version of the torch-scatter dependency

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 8, 2022

Yes! Thanks, @LysandreJik

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 8, 2022

(guess I can close this PR, and just merge #17925)
I will check StableDropoutTestCase and test_training though.

@@ -187,6 +187,8 @@ def backward(ctx, grad_output):

@staticmethod
def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Union[float, DropoutContext]) -> torch._C.Value:
from torch.onnx import symbolic_opset12
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Without this line, we get (for torch 1.12.x):

FAILED tests/onnx/test_onnx_v2.py::StableDropoutTestCase::test_training - AttributeError: module 'torch.onnx' has no attribute 'symbolic_opset12'

@@ -193,6 +193,8 @@ def backward(ctx, grad_output):

@staticmethod
def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Union[float, DropoutContext]) -> torch._C.Value:
from torch.onnx import symbolic_opset12
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Just applied the same change

@@ -597,6 +597,8 @@ def backward(ctx, grad_output):

@staticmethod
def symbolic(g: torch._C.Graph, input: torch._C.Value, local_ctx: Union[float, DropoutContext]) -> torch._C.Value:
from torch.onnx import symbolic_opset12
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

same

@sgugger
Copy link
Collaborator

sgugger commented Aug 8, 2022

Can you push necessary changes directly on #17925 (I'm too lazy to check this PR contains the same fixes as this one 😅 ) The branch is enable_pt12.

@ydshieh
Copy link
Collaborator Author

ydshieh commented Aug 8, 2022

Close this and work on #17925 instead

@ydshieh ydshieh closed this Aug 8, 2022
@ydshieh ydshieh deleted the pt-1.12.1 branch September 7, 2022 08:09
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