Skip to content

Use clamp with bincount approach#281

Merged
kmontemayor2-sc merged 6 commits intomainfrom
kmonte/clamp
Aug 23, 2025
Merged

Use clamp with bincount approach#281
kmontemayor2-sc merged 6 commits intomainfrom
kmonte/clamp

Conversation

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator

This got brought up in #273 (comment) -- I was unaware of clamp (or that it worked like this!) so let's fix this elsewhere :)

This fixes an issue where we could potentially see nodes get removed if their count mod 255 = 0, but clamp fixes this, see:

>>> torch.tensor(255, dtype=torch.uint8).add_(1).clamp(255)
tensor(255, dtype=torch.uint8)
>>> torch.tensor(255, dtype=torch.uint8).add_(1)
tensor(0, dtype=torch.uint8)

Thanks @svij-sc !

Comment thread python/gigl/distributed/dist_link_prediction_dataset.py Outdated
Comment thread python/gigl/utils/data_splitters.py
Comment thread python/gigl/distributed/dist_link_prediction_dataset.py Outdated
Copy link
Copy Markdown
Collaborator

@svij-sc svij-sc left a comment

Choose a reason for hiding this comment

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

Thanks.

Comment thread python/gigl/distributed/dist_link_prediction_dataset.py Outdated
Comment thread python/gigl/distributed/dist_link_prediction_dataset.py Outdated
Comment thread python/tests/unit/distributed/distributed_dataset_test.py Outdated
@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator Author

/unit_test

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator Author

/integration_test

@kmontemayor2-sc
Copy link
Copy Markdown
Collaborator Author

/test

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 22, 2025

GiGL Automation

@ 19:08:12UTC : 🔄 Unit Test started.

@ 19:47:08UTC : ✅ Workflow completed successfully.

@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented Aug 22, 2025

GiGL Automation

@ 19:08:18UTC : 🔄 Integration Test started.

@ 20:03:45UTC : ✅ Workflow completed successfully.

@kmontemayor2-sc kmontemayor2-sc marked this pull request as ready for review August 22, 2025 20:15
@kmontemayor2-sc kmontemayor2-sc added this pull request to the merge queue Aug 22, 2025
Merged via the queue into main with commit b85a997 Aug 23, 2025
5 checks passed
@kmontemayor2-sc kmontemayor2-sc deleted the kmonte/clamp branch August 23, 2025 00:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants