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
Adapting armadillo's parser for mlpack(Removing Boost Dependencies) #2942
Conversation
|
Hey, @conradsnicta Thank you for having a look.
Sorry, I forgot to mention that file is taken from the armadillo, I will add that right away.
@rcurtin @shrit how should we proceed then? |
@heisenbuug I suggest writing the code from scratch, but using the Armadillo implementation as an inspiration and reference. You'll get a much better understanding of how things work. The code in mlpack doesn't need |
@heisenbuug I agree with @conradsnicta, it would be a better idea to rewrite the parser from scratch by using the same implementation of armadillo as a reference, also we need to mention that the implementation is inspired by Armadillo. |
@shrit @conradsnicta okay, I will start rewriting the parser from the scratch. I have one doubt now that I am writing the code from the scratch we also need to follow So, should I first think about how will I structure the whole parser? Or should I first just try @conradsnicta, my initial idea was actually to implement a Let me know what you all think. |
I would vote for keeping the same implementation as the one provided by Armadillo because it would be impossible to write a better one during the 3 months of the summer. However, this does not mean copying the code directly from armadillo into mlpack, but this would require a complete rewrite of the code to provide the same performance and the same functionalities. Once this step is complete it would be easier to add additional functionalities similar to one provided by Considering the design, the next release is mlpack 4.0, which means we can have some changes in the public API. However, we need to try to keep the same interface as the old one, with only minor changes if it is required most. @heisenbuug Let me know if this is helpful 👍 |
So I will start by rewriting the basic data loading code, as suggested I will reimplement the functions that are not described in armadillo's public API documentation or I will try to find existing C++ 11 feature... |
@heisenbuug, let me know if you need any help, do not hesitate in pushing the last modification, even if they are not complete yet, this will allow me to check and review it when I have time 👍 |
@shrit We talked about how we want to modify So we need to rewrite the function declarations of Now based on whether the user selects namespace How can we achieve this behavior? |
Yes, exactly,
Yeah, in the meanwhile you can use |
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.
It's all good from my side so @zoq if you're happy with it then feel free to go ahead and merge. :) Awesome work @heisenbuug! |
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.
Should we add an armadillo attribution for the code, something along the lines of this was inspired by armadillo's parser, or did the code deviate from the armadillo parse quite a bit?
No attribution necessary -- the parser is pretty basic. I suggest merging this in its current state, as it has been in development since May (ie. ~6 months). It's good enough. Further optional improvements can always be done afterwards. |
@heisenbuug If you do not mind, I am going to commit all these propositions. |
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
Co-authored-by: Marcus Edel <marcus.edel@fu-berlin.de>
@conradsnicta Agreed, I am merging this one once these tests are passing. |
Thank you for doing this. I was a bit busy with some other things and I was planning to look at them later. I hope all cases pass. If this gets merged soon I will open another PR for the parallel loading using OpenMP before the end of Sunday. Can't wait to finally get this merged. |
For background knowledge, look at these
Sample code to use the feature