Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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
added check_input_matrices option to python bindings #2787
added check_input_matrices option to python bindings #2787
Changes from 30 commits
266ae6e
f1368e2
6ef1eca
22f5932
124d39d
e5bfb40
c3ff8d3
ee889c7
8a8f0ea
62c9f50
be82a0d
990ef53
7d6a209
aeb0f49
bfff19e
7056aeb
5e0a347
dc398bf
6ad120a
04dee7e
0e8e6f1
acc559f
654e650
33af71d
723ecf8
0c60d8c
141b92d
0d31176
954f3c4
f5b32bc
7ec4058
16ff91b
458b302
ab3110e
0914fe9
5b76b2f
3664422
23c3903
9a3815f
File filter
Filter by extension
Conversations
Jump to
There are no files selected for viewing
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.
I think now you can remove these
if
statements, since it's not possible to find a NaN or Inf in a matrix that has typesize_t
. 👍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.
I think we should hunt down why this is
TUPLE_TYPE
; ideally it should actually bestd::tuple<mlpack::data::DatasetInfo, arma::mat>
. I think it's becausePARAM_MATRIX_AND_INFO_IN()
is defined like this:(That's in
src/mlpack/core/util/param.hpp
.) What happens if you inline thatTUPLE_TYPE
definition? Then we should hopefully get the right result here.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.
I am not able to fully understand what you are saying here. Should I remove the line
#define TUPLE_TYPE std::tuple<mlpack::data::DatasetInfo, arma::mat>
line and usestd::tuple<mlpack::DatasetInfo, arma::mat>
directly instead of usingTUPLE_TYPE
?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.
Right, exactly---give that a shot, and then I think
paramType
will bestd::tuple<mlpack::data::DatasetInfo, arma::mat>
.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.
@rcurtin the following error is thrown locally after I make this change:
macro "PARAM_IN" passed 8 arguments, but takes just 6
I guess this is because the macro is taking the tuple type as 2 arguments instead of 1. Is this supposed to happen ? I have pushed the changes can you take a look ?
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.
You're right... that must be why I defined
TUPLE_TYPE
to begin with. Perhaps we can't use thePARAM_IN()
macro then. Take a look at howPARAM_MATRIX()
is defined:You can see that it just constructs an
Option<arma::mat>
object, and the fifth argument is the name of the type that will beparam.cppType
. So instead of usingPARAM_IN
to definePARAM_MATRIX_AND_INFO_IN()
, do you think you could try an implementation like that ofPARAM_MATRIX
instead, which explicitly specifies the fifth parameter toOption<>
?