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 __eq__ to Device #1063

Merged
merged 6 commits into from
Jan 23, 2023
Merged

add __eq__ to Device #1063

merged 6 commits into from
Jan 23, 2023

Conversation

mtar
Copy link
Collaborator

@mtar mtar commented Dec 20, 2022

Description

This PR overloads the '==' operator such that devices can be compared locally.

Issue/s resolved: #1062

Changes proposed:

  • add __eq__ operator

Type of change

  • New feature

Memory requirements

n/a

Performance

n/a

Due Diligence

  • All split configurations tested
  • Multiple dtypes tested in relevant functions
  • Documentation updated (if needed)
  • Title of PR is suitable for corresponding CHANGELOG entry

Does this change modify the behaviour of other functions? If so, which?

no

@mtar mtar added the enhancement New feature or request label Dec 20, 2022
@ghost
Copy link

ghost commented Dec 20, 2022

👇 Click on the image for a new way to code review
  • Make big changes easier — review code in small groups of related files

  • Know where to start — see the whole change at a glance

  • Take a code tour — explore the change with an interactive tour

  • Make comments and review — all fully sync’ed with github

    Try it now!

Review these changes using an interactive CodeSee Map

Legend

CodeSee Map Legend

@codecov
Copy link

codecov bot commented Dec 20, 2022

Codecov Report

Merging #1063 (2c317e2) into main (efe1fdc) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@           Coverage Diff           @@
##             main    #1063   +/-   ##
=======================================
  Coverage   91.79%   91.79%           
=======================================
  Files          72       72           
  Lines       10403    10409    +6     
=======================================
+ Hits         9549     9555    +6     
  Misses        854      854           
Flag Coverage Δ
unit 91.79% <100.00%> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
heat/core/devices.py 98.11% <100.00%> (+0.24%) ⬆️

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

@mtar mtar marked this pull request as draft December 21, 2022 10:50
@mtar mtar closed this Dec 21, 2022
@mtar mtar reopened this Jan 2, 2023
@mtar mtar marked this pull request as ready for review January 2, 2023 15:17
heat/core/devices.py Outdated Show resolved Hide resolved
heat/core/devices.py Outdated Show resolved Hide resolved
Copy link
Contributor

@ClaudiaComito ClaudiaComito left a comment

Choose a reason for hiding this comment

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

Great, thanks @mtar!

@ClaudiaComito ClaudiaComito merged commit 17e5e89 into main Jan 23, 2023
@ClaudiaComito ClaudiaComito deleted the features/1062-device-eq branch January 23, 2023 13:57
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

comparing devices
3 participants