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

Add concrete_args to feature extraction tracing. #8393

Merged
merged 3 commits into from
Apr 29, 2024

Conversation

rwightman
Copy link
Contributor

No description provided.

Copy link

pytorch-bot bot commented Apr 23, 2024

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/vision/8393

Note: Links to docs will display an error until the docs builds have been completed.

❌ 17 New Failures, 4 Unrelated Failures

As of commit 6e5787c with merge base 305330f (image):

NEW FAILURES - The following jobs have failed:

FLAKY - The following jobs failed but were likely due to flakiness present on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@facebook-github-bot
Copy link

Hi @rwightman!

Thank you for your pull request and welcome to our community.

Action Required

In order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you.

Process

In order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA.

Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with CLA signed. The tagging process may take up to 1 hour after signing. Please give it that time before contacting us about it.

If you have received this in error or have any questions, please contact us at cla@meta.com. Thanks!

@facebook-github-bot
Copy link

Thank you for signing our Contributor License Agreement. We can now accept your code for this (and any) Meta Open Source project. Thanks!

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @rwightman . Some minor comments below that I'll just address myself. LGTM otherwise.

@@ -203,6 +203,7 @@ def _set_default_tracer_kwargs(original_tr_kwargs: Optional[Dict[str, Any]]) ->
def get_graph_node_names(
model: nn.Module,
tracer_kwargs: Optional[Dict[str, Any]] = None,
concrete_args: Optional[Dict[str, Any]] = None,
Copy link
Member

Choose a reason for hiding this comment

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

Unfortunately this parameter must be added as the last parameter, otherwise there's a (low) risk of breaking code that is using non-keyword parameters. This API should have been using keyword-only parameters to avoid that, but it didn't.

Comment on lines 237 to 238
not be treated as Proxies. This parameter is experimental and
its backwards-compatibility is *NOT* guaranteed.
Copy link
Member

Choose a reason for hiding this comment

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

The original pytorch docs are confusing and also state https://pytorch.org/docs/stable/fx.html#torch.fx.Tracer.trace

Backwards-compatibility for this API is guaranteed.

🤔

@NicolasHug NicolasHug changed the title Add concrete_args to feature extraction tracing. Fix #6817 Add concrete_args to feature extraction tracing. Apr 29, 2024
@NicolasHug NicolasHug merged commit ff31b6e into pytorch:main Apr 29, 2024
28 of 48 checks passed
Copy link

Hey @NicolasHug!

You merged this PR, but no labels were added.
The list of valid labels is available at https://github.com/pytorch/vision/blob/main/.github/process_commit.py

facebook-github-bot pushed a commit that referenced this pull request May 8, 2024
Reviewed By: vmoens

Differential Revision: D57099459

fbshipit-source-id: 9e3a386f12f6a1a9e3a9b4708da8b6c0a6e72d87

Co-authored-by: Nicolas Hug <contact@nicolas-hug.com>
Co-authored-by: Nicolas Hug <nh.nicolas.hug@gmail.com>
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.

3 participants