KEMBAR78
[list] Implement list.count by guilhermeleobas · Pull Request #153969 · pytorch/pytorch · GitHub
Skip to content

Conversation

[ghstack-poisoned]
@pytorch-bot
Copy link

pytorch-bot bot commented May 20, 2025

🔗 Helpful Links

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

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

✅ No Failures

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

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

[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request May 20, 2025
ghstack-source-id: 77ec8ef
Pull Request resolved: #153969
guilhermeleobas added a commit that referenced this pull request May 21, 2025
ghstack-source-id: 77ec8ef
Pull Request resolved: #153969
[ghstack-poisoned]
guilhermeleobas added a commit that referenced this pull request Jun 14, 2025
ghstack-source-id: 0b369ca
Pull Request resolved: #153969
Comment on lines 66 to 67
def count(iterator, value):
return sum(it is value or it == value for it in iterator)
Copy link
Collaborator

Choose a reason for hiding this comment

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

Move this to polyfills.operator as operator.countOf.

[ghstack-poisoned]
a.py Outdated
@@ -1,34 +0,0 @@
# import torch
Copy link
Contributor

Choose a reason for hiding this comment

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

Uh, what is this file lol

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

This shouldn't be here 😅

Copy link
Collaborator Author

@guilhermeleobas guilhermeleobas Jun 20, 2025

Choose a reason for hiding this comment

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

Oh, wait. Did I commit this file in a previous PR? lol

Copy link
Contributor

Choose a reason for hiding this comment

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

Seems like it haha

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Oh man 🤦

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

it looks like this file doesn't exist in main or viable/strict.

Copy link
Collaborator Author

@guilhermeleobas guilhermeleobas Jun 20, 2025

Choose a reason for hiding this comment

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

I don't know how to actually fix this. a.py is not showing up on other branches or on main but it being tracked in this PR.

edit: git blame show the file was added in #150790 but it is not there as well

Oh: mistery solved! Found where the file came from.

Copy link
Contributor

@zou3519 zou3519 left a comment

Choose a reason for hiding this comment

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

Seems reasonable. The operator.countOf feedback seems reasonable too as long as it works

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@guilhermeleobas guilhermeleobas marked this pull request as ready for review June 20, 2025 18:47
[ghstack-poisoned]
[ghstack-poisoned]
guilhermeleobas and others added 3 commits June 23, 2025 15:18
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/guilhermeleobas/180/orig onto refs/remotes/origin/viable/strict because #156339 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/153969)

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #156339

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/guilhermeleobas/180/orig onto refs/remotes/origin/main because #156339 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/153969)

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #156339

[ghstack-poisoned]
@pytorchmergebot
Copy link
Collaborator

Rebased gh/guilhermeleobas/180/orig onto refs/remotes/origin/main because #156339 was rebased, please pull locally before adding more changes (for example, via ghstack checkout https://github.com/pytorch/pytorch/pull/153969)

@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #156339

1 similar comment
@pytorchmergebot
Copy link
Collaborator

Starting merge as part of PR stack under #156339

pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2025
pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2025
pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2025
pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2025
pytorchmergebot pushed a commit that referenced this pull request Jul 7, 2025
@github-actions github-actions bot deleted the gh/guilhermeleobas/148/head branch August 7, 2025 02:20
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