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

jit trace will fail for parameter check if it contains param whose ki… #94032

Closed
wants to merge 3 commits into from

Conversation

sywangyi
Copy link
Contributor

@sywangyi sywangyi commented Feb 3, 2023

…nd is _ParameterKind.VAR_KEYWORD

@pytorch-bot
Copy link

pytorch-bot bot commented Feb 3, 2023

🔗 Helpful Links

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

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

✅ No Failures

As of commit ef4d483:
💚 Looks good so far! There are no failures yet. 💚

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

@linux-foundation-easycla
Copy link

linux-foundation-easycla bot commented Feb 3, 2023

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: sywangyi / name: Wang, Yi (aa202b9)

@sywangyi
Copy link
Contributor Author

sywangyi commented Feb 3, 2023

the jit failure for bloom model whose forward contains “**deprecated_arguments” see https://github.com/huggingface/transformers/blob/main/src/transformers/models/bloom/modeling_bloom.py#L880

the return of [] of this function cause failure in check https://github.com/pytorch/pytorch/blob/master/torch/jit/_trace.py#L1036

@sywangyi
Copy link
Contributor Author

sywangyi commented Feb 3, 2023

@yao-matrix @jgong5 please help review

@bdhirsh bdhirsh added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Feb 6, 2023
Copy link
Contributor

@davidberard98 davidberard98 left a comment

Choose a reason for hiding this comment

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

@sywangyi do you think you could add a test for the behavior that previously would fail? you can add it in test/jit/test_tracer.py

@sywangyi
Copy link
Contributor Author

sywangyi commented Feb 8, 2023

@sywangyi do you think you could add a test for the behavior that previously would fail? you can add it in test/jit/test_tracer.py

Hi. @davidberard98 thanks for the review. I have added it.

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@davidberard98
Copy link
Contributor

davidberard98 commented Feb 10, 2023

@sywangyi can you take a closer look at the test failures? I think this change looks okay but please fix the test failures first.

also, I recommend you rebase/merge off of the viable/strict branch. This branch tracks the most recent commit on master that passes all CI tests.

@davidberard98
Copy link
Contributor

adding my thoughts on why this change is reasonable, in case I forget later.

First, why I initially thought this might be concerning: we silently allow users to proceed in cases where the function takes **kwargs, which we don't support. It may not be obvious to the user why the failure is occuring.

Counterpoint (why this change is okay): This PR doesn't change the fact that **kwargs is silent; it just increases support for that scenario. In addition, this problem only occurs with example_kwarg_inputs (where you provide kwargs input to jit.trace, instead of a list of args when you use the usual example_inputs) so this improves the user experience.

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

Copy link
Contributor

@davidberard98 davidberard98 left a comment

Choose a reason for hiding this comment

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

actually I retract my approval based on the test failures... can you take a look at those?

@sywangyi
Copy link
Contributor Author

actually I retract my approval based on the test failures... can you take a look at those?

Hi. @davidberard98 . I check the failure case, one is test_coalesce_reference_cycle_cpu_float64 in test_sparse.py. I run all the test_sparse.py case in my env. all success. and even it does not enter the logic I change, I place a breakpoint there.
same as the failure case under "linux-bionic-py3.11-clang9"

@davidberard98
Copy link
Contributor

@pytorchbot rebase -s

@davidberard98
Copy link
Contributor

test_coalesce_reference_cycle_cpu_float64 looks unrelated, it is failing in a number of PRs. I am more concerned about test_empty_class_serialization, it sounds vaguely related.

Let's see if a rebase fixes the issues.

@pytorchmergebot
Copy link
Collaborator

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

@pytorchmergebot
Copy link
Collaborator

Successfully rebased bloom_trace onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout bloom_trace && git pull --rebase)

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@davidberard98
Copy link
Contributor

@pytorchbot rebase -s

@pytorchmergebot
Copy link
Collaborator

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

Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
Signed-off-by: Wang, Yi A <yi.a.wang@intel.com>
@pytorchmergebot
Copy link
Collaborator

Successfully rebased bloom_trace onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout bloom_trace && git pull --rebase)

@facebook-github-bot
Copy link
Contributor

@davidberard98 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@davidberard98
Copy link
Contributor

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Feb 13, 2023
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ciflow/trunk Trigger trunk jobs on your pull request Merged open source triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

7 participants