-
Notifications
You must be signed in to change notification settings - Fork 689
[BUG] Fix issue with plot_prediction_actual_by_variable
unsupported operand type(s) for *: 'numpy.ndarray' and 'Tensor'
#1903
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
base: main
Are you sure you want to change the base?
Conversation
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1903 +/- ##
=======================================
Coverage ? 86.28%
=======================================
Files ? 96
Lines ? 7775
Branches ? 0
=======================================
Hits ? 6709
Misses ? 1066
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we should add a test for this, if it fixes a bug
Can you explain why we are changing tests, and not adding one? I was expecting a new tests. In either case, I may need an explanation on your changes to the tests, that would be appreciated. |
In the old test cases we were defaulting to
With this modification we can cover both np.ndarray , pd.Series and torch.Tensor as inputs to the Normalizer.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
oh, you just moved it to the mark.parametrize
, and added code to translate string to the object, is that correct?
Minor, non-blocking comment: my gut feeling says pytest.fixture
in this case, for the str-to-object code, but it is clear enough what is happening (so, not blocking)
fixes #1822
This PR fixes the issue with
plot_prediction_actual_by_variable
where the inputnp.ndarray
was being multiplied totorch.Tensor
inTorchNormalizer
__call__