Skip to content

[tensorboard] Remove dependence on torch.onnx#82628

Closed
justinchuby wants to merge 1 commit intopytorch:masterfrom
justinchuby:justinchu/tensorboard-onnx-decouple
Closed

[tensorboard] Remove dependence on torch.onnx#82628
justinchuby wants to merge 1 commit intopytorch:masterfrom
justinchuby:justinchu/tensorboard-onnx-decouple

Conversation

@justinchuby
Copy link
Collaborator

@justinchuby justinchuby commented Aug 2, 2022

Description

The graph function takes a dependency on torch.onnx.select_model_mode_for_export, which was used because it implicitly patches torch._C.Node to allow for key access. This change removed the need for the patch and decoupled the tensorboard util from torch.onnx.

This is needed to unblock #82511 because we are removing the monkey patch

Issue

Testing

cc @ezyang @orionr @BowenBao

@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Aug 2, 2022

🔗 Helpful links

❌ 1 New Failures

As of commit a39934d (more details on the Dr. CI page):

Expand to see more
  • 1/1 failures introduced in this PR

🕵️ 1 new failure recognized by patterns

The following CI failures do not appear to be due to upstream breakages

See GitHub Actions build pull / linux-docs / build-docs (cpp) (1/1)

Step: "Build cpp docs" (full log | diagnosis details)

2022-08-02T16:35:07.1871121Z ##[error]Process completed with exit code 137.
2022-08-02T16:28:52.3080874Z �[01mwriting output... �[39;49;00m[ 90%] �[32mapi/structat_1_1native_1_1_descriptor_deleter .. api/structtorch_1_1enumtype_1_1k_conv_transpose3_d�[39;49;00m
2022-08-02T16:29:01.3764158Z �[01mwriting output... �[39;49;00m[ 92%] �[32mapi/structtorch_1_1enumtype_1_1k_fan_in .. api/structtorch_1_1nn_1_1_huber_loss_options�[39;49;00m
2022-08-02T16:29:18.8285946Z �[01mwriting output... �[39;49;00m[ 93%] �[32mapi/structtorch_1_1nn_1_1_instance_norm_options .. api/structtorch_1_1nn_1_1functional_1_1_normalize_func_options�[39;49;00m
2022-08-02T16:29:26.1796679Z �[01mwriting output... �[39;49;00m[ 95%] �[32mapi/structtorch_1_1nn_1_1functional_1_1_pad_func_options .. api/typedef_namespacetorch_1_1nn_1_1functional_1a872abe58e376dc403b3bea4259d4d2b5�[39;49;00m
2022-08-02T16:29:30.8237899Z �[01mwriting output... �[39;49;00m[ 96%] �[32mapi/typedef_namespacetorch_1_1nn_1_1functional_1a8c6ad6948f1e1c554bc731c5d7081408 .. api/typedef_namespacetorch_1_1python_1_1detail_1a9808c29bfe27f974414c895b4ff37f2f�[39;49;00m
2022-08-02T16:29:43.0310762Z �[01mwriting output... �[39;49;00m[ 98%] �[32mapi/typedef_namespacetorch_1a23e4c6c3b3c89d2a8051db46fc003159 .. api/variable_namespacetorch_1aeaf16f038962bbc7c4a0f57696fa3fb1�[39;49;00m
2022-08-02T16:29:45.0499923Z �[01mwriting output... �[39;49;00m[100%] �[32mapi/variable_namespacetorch_1aec4dc7ff45a796efc14a599c307a9d10 .. notes/versioning�[39;49;00m
2022-08-02T16:29:45.0500418Z 
2022-08-02T16:29:45.0575092Z �[01mwaiting for workers...�[39;49;00m
2022-08-02T16:35:07.1232477Z /home/ec2-user/actions-runner/_work/_temp/a10b72ba-25f7-44a3-8c68-609ae0a86b87.sh: line 28: 14118 Killed                  docker exec -t "${container_name}" bash -c "sudo chown -R jenkins . && pip install dist/*.whl && ./.circleci/scripts/${DOCS_TYPE}_doc_push_script.sh"
2022-08-02T16:35:07.1871121Z ##[error]Process completed with exit code 137.
2022-08-02T16:35:07.2278748Z Prepare all required actions
2022-08-02T16:35:07.2354290Z ##[group]Run ./.github/actions/chown-workspace
2022-08-02T16:35:07.2354679Z ##[endgroup]
2022-08-02T16:35:07.2378871Z ##[group]Run docker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .
2022-08-02T16:35:07.2379520Z �[36;1mdocker run --rm -v "$(pwd)":/v -w /v "${ALPINE_IMAGE}" chown -R "$(id -u):$(id -g)" .�[0m
2022-08-02T16:35:07.3520520Z shell: /usr/bin/bash --noprofile --norc -e -o pipefail {0}
2022-08-02T16:35:07.3520971Z env:
2022-08-02T16:35:07.3521436Z   ALPINE_IMAGE: 308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine
2022-08-02T16:35:07.3521882Z ##[endgroup]
2022-08-02T16:35:07.9815456Z Unable to find image '308535385114.dkr.ecr.us-east-1.amazonaws.com/tool/alpine:latest' locally

This comment was automatically generated by Dr. CI (expand for details).

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Copy link
Contributor

@ezyang ezyang left a comment

Choose a reason for hiding this comment

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

sure

@justinchuby
Copy link
Collaborator Author

@pytorchbot merge -g

@justinchuby
Copy link
Collaborator Author

thanks for the review!

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Merge failed due to Refusing to merge as mandatory check(s) pull failed for rule superuser
Raised by https://github.com/pytorch/pytorch/actions/runs/2783117532

@justinchuby
Copy link
Collaborator Author

@pytorchbot merge -f "This PR is unrelated to the cpp doc failures"

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Contributor

github-actions bot commented Aug 2, 2022

Hey @justinchuby.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Aug 3, 2022
Summary:
### Description
<!-- What did you change and why was it needed? -->

The `graph` function takes a dependency on `torch.onnx.select_model_mode_for_export`, which was used because it implicitly patches `torch._C.Node` to allow for key access. This change removed the need for the patch and decoupled the tensorboard util from `torch.onnx`.

This is needed to unblock #82511 because we are removing the monkey patch

### Issue
<!-- Link to Issue ticket or RFP -->

### Testing
<!-- How did you test your change? -->

cc ezyang orionr BowenBao

Pull Request resolved: #82628
Approved by: https://github.com/ezyang

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/c7dde7da6d27d81555e44d9f9e416b81697b02d5

Reviewed By: kit1980

Differential Revision: D38359651

fbshipit-source-id: d2c3e4f0db75b54d224e11c76830ca642edaa2e9
jamt9000 added a commit to unitaryai/clip-torch2 that referenced this pull request Jul 6, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
jamt9000 added a commit to unitaryai/clip-torch2 that referenced this pull request Jul 6, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
jongwook pushed a commit to openai/CLIP that referenced this pull request Jul 8, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
vepadulano added a commit to vepadulano/root that referenced this pull request Sep 6, 2023
As seen in pytorch/pytorch#82628. This should remove the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
vepadulano added a commit to vepadulano/root that referenced this pull request Sep 6, 2023
As seen in pytorch/pytorch#82628. This should remove the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
vepadulano added a commit to vepadulano/root that referenced this pull request Sep 6, 2023
As seen in pytorch/pytorch#82628. This removes the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
vepadulano added a commit to root-project/root that referenced this pull request Sep 12, 2023
As seen in pytorch/pytorch#82628. This removes the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
guitargeek pushed a commit to guitargeek/root that referenced this pull request Oct 2, 2023
As seen in pytorch/pytorch#82628. This removes the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
guitargeek pushed a commit to root-project/root that referenced this pull request Oct 2, 2023
As seen in pytorch/pytorch#82628. This removes the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
grandcyw pushed a commit to grandcyw/CLIP that referenced this pull request Nov 21, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
grandcyw added a commit to grandcyw/CLIP that referenced this pull request Nov 21, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
grandcyw added a commit to grandcyw/CLIP that referenced this pull request Nov 21, 2023
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
Jung-Hoon-Sung pushed a commit to Jung-Hoon-Sung/Drone-images-finetuning-clip that referenced this pull request Jan 8, 2024
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
maksgraczyk pushed a commit to maksgraczyk/root that referenced this pull request Jan 12, 2024
As seen in pytorch/pytorch#82628. This removes the
`TypeError: 'torch._C.Node' object is not subscriptable` error.
rom1504 pushed a commit to rom1504/CLIP that referenced this pull request Jan 13, 2024
Attribute access with subscripting would previously work
due to patching in pytorch/pytorch#82511
but this has been removed.

This commit uses the fix proposed in pytorch/pytorch#82628
to define a helper method to call the appropriate access method.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants