GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Enable flake8-bugbear B020 lint by dmage · Pull Request #110823 · pytorch/pytorch

Conversation

@dmage

@dmage dmage commented Oct 8, 2023 •
edited by pytorch-bot Bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor

Fixes part of #106571

cc @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @Xia-Weiwen @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@pytorch-bot pytorch-bot Bot added the release notes: fx release notes category label Oct 8, 2023
@pytorch-bot

pytorch-bot Bot commented Oct 8, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

🔗 Helpful Links

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

  • 📄 Preview Python docs built from this PR
  • 📄 Preview C++ docs built from this PR
  • ❓ Need help or want to give feedback on the CI? Visit the bot commands wiki or our office hours

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

✅ No Failures

As of commit 0416162 with merge base ad3572a (image):
💚 Looks good so far! There are no failures yet. 💚

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@linux-foundation-easycla

linux-foundation-easycla Bot commented Oct 8, 2023 •
edited
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown

CLA Signed

The committers listed above are authorized under a signed CLA.

  • ✅ login: dmage / name: Oleg Bulatov (3193c0f, 0416162)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@github-actions github-actions Bot added module: inductor ciflow/inductor labels Oct 8, 2023
@pytorchbot pytorchbot added the open source label Oct 8, 2023
@Skylion007

Skylion007 commented Oct 8, 2023

Copy link
Copy Markdown
Collaborator

You need to enable the rule for ruff in the pyproject.toml as well

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dmage

dmage commented Oct 8, 2023

Copy link
Copy Markdown
Contributor Author

@Skylion007 I removed B020 from tool.ruff.ignore, and tool.ruff.select seems to select all B checks. Should I make more changes to pyproject.toml?

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Skylion007

Skylion007 commented Oct 8, 2023

Copy link
Copy Markdown
Collaborator

The new errors should make it clear that it is working properly in RUFF now. :)

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@dmage
dmage force-pushed the fix-b020 branch from ae63a48 to 2e44718 Compare October 8, 2023 18:35
@github-actions github-actions Bot added the release notes: quantization release notes category label Oct 8, 2023
dmage
dmage commented Oct 8, 2023
View reviewed changes
Comment thread test/test_linalg.py Outdated

@dmage dmage Oct 8, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

I don't have ideas for a better name for all_batches, so I added noqa.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dmage
dmage force-pushed the fix-b020 branch from 2e44718 to 217ec0b Compare October 8, 2023 18:38
@Skylion007

Skylion007 commented Oct 8, 2023

Copy link
Copy Markdown
Collaborator

You'll also need to sign the CLA

dmage reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dmage
dmage commented Oct 8, 2023
View reviewed changes
Comment thread torch/_inductor/triton_heuristics.py
for frame in iter(lambda: frame.f_back, None): # type: ignore[union-attr]
while frame is not None:
frame.f_locals
frame = frame.f_back

@dmage dmage Oct 8, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This code is a bit magical for me. I suspect traversing through frames and calling frame.f_locals creates new objects that are accessible via gc.get_referrers, and my change doesn't break anything. I don't have CUDA to confirm that.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Skylion007 Skylion007 Oct 24, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This looks fine to me, but if anything breaks in this PR, it's likely this code.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
dmage
dmage commented Oct 9, 2023
View reviewed changes
Comment thread torch/testing/_internal/common_methods_invocations.py
idx = make_idx((0,), high=1)
src = make_arg((0,))
for tgt, acc in product(tgt, (True, False)):
for tgt, acc in product(tgt_gen, (True, False)):

@dmage dmage Oct 9, 2023

Copy link
Copy Markdown
Contributor Author

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

This one fixes the test, should this change be in its own PR?

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions

@Skylion007 Skylion007 Oct 24, 2023

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Great, bugbear actually caught something real. :)

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@dmage
dmage force-pushed the fix-b020 branch from 217ec0b to f70e6d4 Compare October 9, 2023 16:58
@dmage
dmage marked this pull request as ready for review October 9, 2023 18:09
@dmage
dmage requested review from Chillee, IvanYashchuk, ejguan, kshitij12345, lezcano, mrshenli, mruberry, ngimel, nikitaved, rohan-varma, zhaojuanmao and zou3519 as code owners October 9, 2023 18:09
@dmage
dmage requested review from albanD, d4l3k, fduwjj, fegin, jerryzh168, kiukchung, soulitzer, wanchaol and wz337 as code owners October 9, 2023 18:09
@cpuhrsch cpuhrsch added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 11, 2023
@zou3519
zou3519 removed their request for review October 24, 2023 17:16
Skylion007
Skylion007 approved these changes Oct 24, 2023
View reviewed changes

@Skylion007 Skylion007 left a comment

Copy link
Copy Markdown
Collaborator

There was a problem hiding this comment.

Choose a reason for hiding this comment

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

Looks good to me

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@Skylion007

Skylion007 commented Oct 24, 2023

Copy link
Copy Markdown
Collaborator

@pytorchbot rebase

pytorch-bot[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@Skylion007

Skylion007 commented Oct 24, 2023

Copy link
Copy Markdown
Collaborator

@pytorchbot merge

pytorch-bot[bot] reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pytorch-bot pytorch-bot Bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 24, 2023
@pytorchmergebot

pytorchmergebot commented Oct 24, 2023

Copy link
Copy Markdown
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

dmage added 2 commits October 24, 2023 19:28
@dmage @pytorchmergebot
Enable flake8-bugbear B020 lint
3193c0f
@dmage @pytorchmergebot
Fix formatting
0416162
@pytorchmergebot

pytorchmergebot commented Oct 24, 2023

Copy link
Copy Markdown
Collaborator

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pytorchmergebot
pytorchmergebot force-pushed the fix-b020 branch from eddf5ec to 0416162 Compare October 24, 2023 19:28
@pytorchmergebot pytorchmergebot added the merging label Oct 24, 2023
@pytorchmergebot

pytorchmergebot commented Oct 24, 2023

Copy link
Copy Markdown
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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@pytorchmergebot pytorchmergebot added Merged and removed merging labels Oct 24, 2023
@pytorchmergebot pytorchmergebot closed this in 192477b Oct 24, 2023
xuhancn pushed a commit to xuhancn/pytorch that referenced this pull request Nov 7, 2023
@dmage @xuhancn
Enable flake8-bugbear B020 lint (pytorch#110823)
3831b78
Fixes part of pytorch#106571

Pull Request resolved: pytorch#110823
Approved by: https://github.com/Skylion007
Skylion007 pushed a commit to Skylion007/pytorch that referenced this pull request Nov 14, 2023
@dmage @Skylion007
Enable flake8-bugbear B020 lint (pytorch#110823)
d81a262
Fixes part of pytorch#106571

Pull Request resolved: pytorch#110823
Approved by: https://github.com/Skylion007
@HumphreySun98 HumphreySun98 mentioned this pull request Aug 6, 2026
[inductor] Drop the dead frame walk in _find_names #192123
Closed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@Skylion007 Skylion007 Skylion007 approved these changes
@ejguan ejguan Awaiting requested review from ejguan
@Chillee Chillee Awaiting requested review from Chillee Chillee is a code owner
@kshitij12345 kshitij12345 Awaiting requested review from kshitij12345 kshitij12345 is a code owner
@mruberry mruberry Awaiting requested review from mruberry
@ngimel ngimel Awaiting requested review from ngimel
@lezcano lezcano Awaiting requested review from lezcano lezcano is a code owner
@nikitaved nikitaved Awaiting requested review from nikitaved nikitaved is a code owner
@IvanYashchuk IvanYashchuk Awaiting requested review from IvanYashchuk
@mrshenli mrshenli Awaiting requested review from mrshenli
@zhaojuanmao zhaojuanmao Awaiting requested review from zhaojuanmao
@rohan-varma rohan-varma Awaiting requested review from rohan-varma
@H-Huang H-Huang Awaiting requested review from H-Huang
@awgu awgu Awaiting requested review from awgu
@kwen2501 kwen2501 Awaiting requested review from kwen2501
@wanchaol wanchaol Awaiting requested review from wanchaol
@fegin fegin Awaiting requested review from fegin
@fduwjj fduwjj Awaiting requested review from fduwjj
@wz337 wz337 Awaiting requested review from wz337
@kiukchung kiukchung Awaiting requested review from kiukchung
@d4l3k d4l3k Awaiting requested review from d4l3k
@jerryzh168 jerryzh168 Awaiting requested review from jerryzh168 jerryzh168 is a code owner
@albanD albanD Awaiting requested review from albanD albanD is a code owner
@soulitzer soulitzer Awaiting requested review from soulitzer soulitzer is a code owner

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

ciflow/inductor ciflow/trunk Trigger trunk jobs on your pull request Merged module: inductor open source release notes: fx release notes category release notes: quantization release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@dmage @Skylion007 @pytorchmergebot @cpuhrsch @pytorchbot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.