-
-
Notifications
You must be signed in to change notification settings - Fork 1.6k
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
mlpack Header only initiative #3091
Conversation
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
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.
(requesting changes just so mlpack-bot doesn't auto-approve and this gets accidentally merged before it's ready)
I will have to check for these compilation errors, since I do not remember having any on my machine |
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
@rcurtin, do you have an idea what is happening with the |
Just to write what we figured out while digging into this together today, the issue appears to be caused by various |
Signed-off-by: Omar Shrit <omar@shrit.me>
@rcurtin 👌 |
@shubham1206agra let's hold off on that one---I think that we can make STB work here. Maybe someday we can refactor our data loading utilities into a separate library. |
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.
Nice, great to see this all builds! I only have a couple small cleanup comments, and then I agree, we should go ahead and merge it. 👍
@@ -1,5 +1,5 @@ | |||
/** | |||
* @file core/data/save_image.cpp | |||
* @file core/data/save_image.hpp |
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.
This comment still applies---do you think we can handle it before merge?
*/ | ||
inline void RandVector(arma::vec& v) | ||
{ | ||
v.zeros(); |
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.
Agreed, I think we can remove this line (I know it was not part of the purpose of your PR, but it's a cleanup we could do anyway).
@@ -95,7 +93,7 @@ void ExtractSplits(std::vector<std::pair<ElemType, size_t>>& splitVec, | |||
const size_t minLeafSize) | |||
{ | |||
// It's common sense, but we also use it in a check later. | |||
Log::Assert(minLeafSize > 0); | |||
mlpack::Log::Assert(minLeafSize > 0); |
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 sure, but I think that you can revert most of the changes to this file, since these functions are now in the mlpack::det
namespace.
src/mlpack/methods/reinforcement_learning/q_networks/categorical_dqn.hpp
Outdated
Show resolved
Hide resolved
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Signed-off-by: Omar Shrit <omar@shrit.me>
src/mlpack/methods/reinforcement_learning/q_networks/simple_dqn.hpp
Outdated
Show resolved
Hide resolved
Signed-off-by: Omar Shrit <omar@shrit.me>
Signed-off-by: Omar Shrit <omar@shrit.me>
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.
Everything looks good to me here---I think if you handle the comments in dtree_impl.hpp
then the build will succeed, and once the build succeeds then from my side everything seems good and I think we should merge it. 👍
Signed-off-by: Omar Shrit <omar@shrit.me>
@rcurtin All tests are passing now, the main issue is the memory check |
Signed-off-by: Omar Shrit <omar@shrit.me>
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.
Awesome, the check is looking good; hopefully the comments are helpful. 👍
@shrit I spent some time today trying to debug the CMake checks, and after my debugging I put them together into two patches you could apply to this branch with https://gist.github.com/rcurtin/4e54a7163533045cf4297dd91ba03383 I tested this CMake script on both working and non-working versions of STB, and got the expected output. Once you apply these, I guess we'll have to update the version of STB in the mlpack jenkins Dockerfile (but that's easy enough). Take a look and let me know what you think. 👍 |
Signed-off-by: Omar Shrit <omar@shrit.me>
@rcurtin Great. Thank you for the patch, much better than what I have done before. |
@mlpack-jenkins test this please |
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.
Everything seems fine to me now! It will be great to get this merged. It looks like the Go job is failing perhaps because gonum uploaded a failing version (I see the failure also in #3186).
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Yeah, the same for the python build. |
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.
Looks good to me.
This is a first attempt to move mlpack to a header-only, I am not managing to push anything further to this PR, I think we can merge this one first and then open another one for the rest.
This is only to make the reviewing process easier.