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

Numpy Updates to Tests #2638

Merged
merged 7 commits into from Aug 16, 2021
Merged

Numpy Updates to Tests #2638

merged 7 commits into from Aug 16, 2021

Conversation

chukarsten
Copy link
Collaborator

Fixes tests to support changes to list comparison.

@codecov
Copy link

codecov bot commented Aug 16, 2021

Codecov Report

Merging #2638 (b617c26) into main (948e3b4) will not change coverage.
The diff coverage is 100.0%.

Impacted file tree graph

@@          Coverage Diff          @@
##            main   #2638   +/-   ##
=====================================
  Coverage   99.9%   99.9%           
=====================================
  Files        297     297           
  Lines      27071   27071           
=====================================
  Hits       27027   27027           
  Misses        44      44           
Impacted Files Coverage Δ
...del_understanding_tests/test_partial_dependence.py 100.0% <100.0%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 948e3b4...b617c26. Read the comment docs.

@@ -809,7 +809,7 @@ def test_graph_partial_dependence_regression_and_binary_categorical(
)
plot_data = fig.to_dict()["data"][0]
assert plot_data["type"] == "bar"
assert plot_data["x"] == ["0", "1", "2"]
assert all(plot_data["x"] == ["0", "1", "2"])
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The original error here comes from the data typing in the dictionary. Before, in plotly <5.1.0, plot_data["x"] was of type list. Now it's an array. Casting it to a list fixes it.

* Changes
* Renamed SMOTE samplers to SMOTE oversampler :pr:`2595`
* Changed ``partial_dependence`` and ``graph_partial_dependence`` to raise a ``PartialDependenceError`` instead of ``ValueError``. This is not a breaking change because ``PartialDependenceError`` is a subclass of ``ValueError`` :pr:`2604`
* Cleaned up code duplication in ``ComponentGraph`` :pr:`2612`
* Documentation Changes
* To avoid local docs build error, only add warning disable and download headers on ReadTheDocs builds, not locally :pr:`2617`
* Testing Changes
* Updated partial_dependence tests to change the element-wise comparison per the Numpy upgrade :pr:`2638`
Copy link
Collaborator Author

Choose a reason for hiding this comment

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

Pushing a correction to this to say Plotly instead of numpy.

Copy link
Contributor

@freddyaboulton freddyaboulton left a comment

Choose a reason for hiding this comment

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

Thank you @chukarsten !

core-requirements.txt Outdated Show resolved Hide resolved
@chukarsten chukarsten merged commit e7a5c25 into main Aug 16, 2021
@@ -1,5 +1,6 @@
docutils>=0.15.2,<0.17
pydata-sphinx-theme>=0.3.1
astroid<=2.6.6
Copy link
Contributor

Choose a reason for hiding this comment

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

What's this for?

@freddyaboulton freddyaboulton deleted the numpy_compatibility_updates branch May 13, 2022 15:20
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.

None yet

3 participants