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

Fix equality check for floats #2507

Closed

Conversation

danielcohenlive
Copy link

Summary:
same_elements() wasn't working for float('nan'), and it wasn't treating floats with np.is_close() like in object_attribute_dicts_find_unequal_fields().

Also, same_elements was generally broken. Example:
{F1676730235}

Differential Revision: D58289519

@facebook-github-bot facebook-github-bot added the CLA Signed Do not delete this pull request or issue due to inactivity. label Jun 7, 2024
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
@codecov-commenter
Copy link

codecov-commenter commented Jun 7, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.28%. Comparing base (40ae984) to head (5e7357e).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2507   +/-   ##
=======================================
  Coverage   95.28%   95.28%           
=======================================
  Files         485      485           
  Lines       47406    47411    +5     
=======================================
+ Hits        45171    45176    +5     
  Misses       2235     2235           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

danielcohenlive pushed a commit to danielcohenlive/Ax-1 that referenced this pull request Jun 7, 2024
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Differential Revision: D58289519
Summary:
Pull Request resolved: facebook#2507

`same_elements()` wasn't working for `float('nan')`, and it wasn't treating floats with `np.is_close()` like in `object_attribute_dicts_find_unequal_fields()`.

Also, `same_elements` was generally broken.  Example:
{F1676730235}

Reviewed By: saitcakmak

Differential Revision: D58289519
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D58289519

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 932746d.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed Do not delete this pull request or issue due to inactivity. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants