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

Coot S01E01 #3596

Open
wants to merge 33 commits into
base: master
Choose a base branch
from
Open

Coot S01E01 #3596

wants to merge 33 commits into from

Conversation

shrit
Copy link
Member

@shrit shrit commented Jan 5, 2024

@rcurtin This PR is a draft and may not compile, I want to get your opinion on these modifications because most of the remaining modifications are repetitions over all layers and init functions.

If the structure is good, then I will go over the other layers, if not I am happy to apply better suggestions.

Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
@shrit shrit requested a review from rcurtin January 5, 2024 21:05
Copy link
Member

@rcurtin rcurtin left a comment

Choose a reason for hiding this comment

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

Looks good, I think this is the right direction to go. My main comment is that I think MakeAlias() needs an offset parameter, and then you can combine it with MakeTmp().

src/mlpack/methods/ann/make_alias.hpp Outdated Show resolved Hide resolved
src/mlpack/methods/ann/make_alias.hpp Outdated Show resolved Hide resolved
src/mlpack/methods/ann/init_rules/network_init.hpp Outdated Show resolved Hide resolved
src/mlpack/methods/ann/init_rules/network_init.hpp Outdated Show resolved Hide resolved
src/mlpack/methods/ann/layer/linear_impl.hpp Outdated Show resolved Hide resolved
src/mlpack/methods/ann/make_alias.hpp Outdated Show resolved Hide resolved
shrit and others added 13 commits January 10, 2024 07:31
Co-authored-by: Ryan Curtin <ryan@ratml.org>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
@@ -15,42 +16,150 @@
#define MLPACK_METHODS_ANN_MAKE_ALIAS_HPP

#include <mlpack/prereqs.hpp>
#include <bandicoot>
Copy link
Member

Choose a reason for hiding this comment

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

I think that we shouldn't actually include Bandicoot anywhere in the mlpack headers since it's not a strict dependency. I had imaged a user would use bandicoot+mlpack in their source like this:

#include <bandicoot>
#include <mlpack.hpp> // detects that bandicoot is available and sets MLPACK_HAS_COOT or similar

I'm open to other possibilities if you have other ideas. But basically this would just mean there needed to be a check somewhere in prereqs.hpp or similar that would set MLPACK_HAS_COOT accordingly, and then we would need to wrap any usage of anything Bandicoot-specific (e.g. any explicit naming of coot::) in a macro guard.

Getting the tests to automatically test against Bandicoot will be a little trickier and involve some CMake changes, but we don't have to do that in this PR for sure. 👍

Copy link
Member Author

Choose a reason for hiding this comment

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

For sure, I agree, less dependencies is better, you know me, I am not too fan of dependencies 👍
Actually, by doing this I was thinking, that once we have made mlpack entirely generic, there is no reason to include armadillo internally at all, we can remove it, and push it to the user side how to include it.

Copy link
Member Author

Choose a reason for hiding this comment

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

I probably add it there by error while testing,

Copy link
Member Author

Choose a reason for hiding this comment

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

Actually, this is very hard to do, so maybe in the very far future, it also worth considering

Copy link
Member

Choose a reason for hiding this comment

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

We do need a linear algebra library; I don't think we can remove Armadillo as a dependency. Especially since Bandicoot itself depends on Armadillo.

Copy link

mlpack-bot bot commented Feb 29, 2024

This issue has been automatically marked as stale because it has not had any recent activity. It will be closed in 7 days if no further activity occurs. Thank you for your contributions! 👍

@mlpack-bot mlpack-bot bot added the s: stale label Feb 29, 2024
@mlpack-bot mlpack-bot bot closed this Mar 7, 2024
@shrit shrit reopened this Mar 21, 2024
@mlpack-bot mlpack-bot bot removed the s: stale label Mar 21, 2024
@shrit
Copy link
Member Author

shrit commented Mar 21, 2024

I have no idea how this went to stale 😄

@rcurtin
Copy link
Member

rcurtin commented Mar 21, 2024

@shrit is it ready to review? Just let me know and I can do that 👍

@shrit
Copy link
Member Author

shrit commented Mar 22, 2024

@rcurtin not yet, probably there is a need for one or two PR's and then I need to do some cleaning.

Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
Signed-off-by: Omar Shrit <omar@avontech.fr>
@shrit
Copy link
Member Author

shrit commented Apr 16, 2024

I will move the part related to MakeAlias implementation for armadillo to a new PR, otherwise, it would not make sense to add the offset in the middle of the function, because I want to have a default value for it.
Keeping the offset parameter in the middle of the function means that I have to refactor half of the library which is something to avoid when possible

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants