rcurtin_irc changed the topic of #mlpack to: mlpack: a scalable machine learning library (https://www.mlpack.org/) -- channel logs: https://libera.irclog.whitequark.org/mlpack -- NOTE: messages sent here might not be seen by bridged users on matrix, gitter, or slack
<jonpsy[m]> Can someone explain the difference between ```DiscreteActionEnvType``` and ```ContinuousActionEnvType```, they look pretty much the same thing to me
<RishabhGarg108Ri> I used `scp benchmark.cpp -P 2222 rishabh@orange.ratml.org:~` to copy a file, but it is giving me this error - `ssh: connect to host orange.ratml.org port 22: Operation timed out`
<RishabhGarg108Ri> Can somebody help me out with what am I doing wrong here?
<say4n[m]> <RishabhGarg108Ri> "I used `scp benchmark.cpp -P 222" <- You need to pass the port argument before the filename for scp to actually use the port. Usage would be something like `scp -P port path/to/local_file remote_host:path/to/remote_file`.
<RishabhGarg108Ri> Oops silly me, jumbled the order of arguments๐Ÿ˜…. Thanks @say4n:matrix.org :)
<say4n[m]> Np! :)
<RishabhGarg108Ri> @rcurtin How do I compile mlpack programs on your machine?
<RishabhGarg108Ri> When I tried linking with armadillo, it couldn't find it, but while building from source, cmake was able to find it
<shrit[m]> What is the message error you are getting?
<RishabhGarg108Ri> Hey @shrit:matrix.org I was trying `mosh`. I installed iit and when I run `mosh -p 2222 rishabh@orange.ratml.org` then nothing happens, while connecting via ssh is working just fine. Is there some initial setup which I have to do after installing `mosh`?
<RishabhGarg108Ri> Check this paste https://pastebin.com/DW7M5h5v for the error message @shrit:matrix.org
<heisenbuugGopiMT> Can you also paste the command you are using to compile `benchmark.cpp`?
<heisenbuugGopiMT> I think you are using something like `g++ -o benchmark benchmark.cpp`?
<RishabhGarg108Ri> `g++ benchmark.cpp -I $MLPACK_INCLUDE -lmlpack -larmadillo` Here `MLPACK_INCLUDE` is the path to the include folder of mlpack
<rcurtin[m]> hmm, and what is the output this gives? (sorry for the slow response, I slept in today ๐Ÿ˜ƒ)
<rcurtin[m]> oh! you pasted it already
<rcurtin[m]> here the situation is that there is a version of mlpack installed to `/usr/local/lib/` which is out of date
<shrit[m]> Maybe there are different version of armadillo
<shrit[m]> it is looking for armadillo9
<rcurtin[m]> so just like you specified `-I`, you'll also need to specify `-L /path/to/mlpack/build/lib/`, and I think the `-L` needs to come before the linker commands `-l`
<RishabhGarg108Ri> I also tried compiling with `g++ benchmark.cpp -I $MLPACK_INCLUDE -L $MLPACK_LIB -larmadillo. But that too gave some undefined reference errors
<rcurtin[m]> and, when you run, you'll need to set `LD_LIBRARY_PATH` to that same directory you used for `-L`
<RishabhGarg108Ri> Yeah. I did set the `LD_LIBRARY_PATH = $MLPACK_LIB` too.
<rcurtin[m]> you'll still need `-lmlpack` even if you specify `-L` (and `-L` should be a directory, not a library name)
<heisenbuugGopiMT> `g++ -g sample.cpp -o /sample -larmadillo -fopenmp -I/home/heisenbug/mlpack/build/include -L/home/heisenbug/mlpack/build/lib -lmlpack`
<heisenbuugGopiMT> Here is what I use
<heisenbuugGopiMT> The whole command, this might help maybe...
<heisenbuugGopiMT> Here is what I use
<heisenbuugGopiMT> * `g++ -g sample.cpp -o sample -larmadillo -fopenmp -I/home/heisenbug/mlpack/build/include -L/home/heisenbug/mlpack/build/lib -lmlpack`
<RishabhGarg108Ri> Adding `-L $MLPACK_LIB` and `-lmlpack` did the trick :)
<rcurtin[m]> awesome! sorry that I have an old mlpack installation floating around on that system ๐Ÿ˜ƒ
<RishabhGarg108Ri> That's fine. I am gradually getting used to these. Now its not that hard to debug these kind of issues as it used to be when I started on mlpack :)
<rcurtin[m]> :) I think that is how it always goes. the first time I encountered an error where there was another version of libmlpack.so that I was unintentionally linking to, it took me quite a while to figure it out
<heisenbuugGopiMT> Just a thought, maybe we can have a section on mlpack's website where we can address these common issues?
<heisenbuugGopiMT> Even I faced the same issue initially.
<rcurtin[m]> yeah, maybe a developer FAQ or something? that could be really nice
<RishabhGarg108Ri> @ryan:ratml.org If I install any python package, then will it create any problem for you?
<RishabhGarg108Ri> I am asking this because I want to install the xgboost python library. There are not many good tutorials on the usage of xgboost CLI
<rcurtin[m]> I can do it from the system package manager I think, hang on
<RishabhGarg108Ri> I did it myself :)
<RishabhGarg108Ri> I was just asking if it will interfere with your existing environment or not. If that's the case, I will work in a virtual environment
<rcurtin[m]> oh, ok, well in any case I installed python3-xgboost too
<rcurtin[m]> it won't interfere with the existing environment---everything you are doing is local to your user ๐Ÿ‘
<rcurtin[m]> if the python3-xgboost package causes an issue just let me know and I will remove it :)
<RishabhGarg108Ri> Sure. I will tell you if it causes issues :+1:
<RishabhGarg108Ri> @ryan:ratml.org I have started the benchmark script. I used the same datasets that I used last time for `DecisionTreeRegressor` and using just one core.
<rcurtin[m]> ๐Ÿ‘๏ธ sounds good
<RishabhGarg108Ri> Lets see how long it takes.
<RishabhGarg108Ri> Right now I used only the default parameters and single core for both
<RishabhGarg108Ri> Tomorrow, I am thinking of doing it for a variety of hyperparameters and multiple cores.
<heisenbuugGopiMT> I can see that one build the test.
<heisenbuugGopiMT> But when we havent build mlpack yet and then use `make mlacpk_test` what is happening?
<heisenbuugGopiMT> * But when we havent build mlpack yet and then use `make mlpack_test` what is happening?
<shrit[m]> you will build the mlpack library and the test
<shrit[m]> the first one will build everything
<heisenbuugGopiMT> What is included in everything?
<shrit[m]> The library the cli binding
<shrit[m]> oh, in the past, it would build the `mlpack_test`
<shrit[m]> now we have disabled that
<shrit[m]> so now it builds mlpack and mlpack_cli
<heisenbuugGopiMT> Ohh, now I understand...
<heisenbuugGopiMT> As we are not including mlpack_cli thats why `make mlpack_test` is way faster.
<shrit[m]> Thats seems to be faire
<shrit[m]> *fair
<shrit[m]> did you try it?
<heisenbuugGopiMT> Full error is here
<heisenbuugGopiMT> Is it due to reference?
<shrit[m]> it seems that std::is_same is not working here
<shrit[m]> Maybe there is a traits from armadillo than can detect the type directly
<shrit[m]> even if it is arma::Mat?
<heisenbuugGopiMT> No, if I pass `mat` i.e. an arma::Mat I am getting 0
<heisenbuugGopiMT> Edited the above code, have a look.
<shrit[m]> I agree, but the error you pasted have this which make things look stranger:
<shrit[m]> note: in passing argument 2 of โ€˜bool mlpack::data::LoadSparseMatrix(const string&, arma::SpMat<typename T1::elem_type>&, bool, bool) [with MatType = arma::Mat<double>; std::string = std::__cxx11::basic_string<char>; typename T1::elem_type = double]โ€™
<shrit[m]> * `note: in passing argument 2 of โ€˜bool mlpack::data::LoadSparseMatrix(const string&, arma::SpMat<typename T1::elem_type>&, bool, bool) [with MatType = arma::Mat<double>; std::string = std::__cxx11::basic_string<char>; typename T1::elem_type = double]โ€™`
<heisenbuugGopiMT> Yea, that's what I am not able to figure out...
<shrit[m]> would you try to use arma::is_SpMat<>?
<shrit[m]> * would you try to use `arma::is_SpMat<>`?
<heisenbuugGopiMT> When can we call a template fucntion with and without template argument?
<heisenbuugGopiMT> Can I call `oadDenseMatrix(filename, matrix, fatal, transpose, inputLoadType)` like this?
<heisenbuugGopiMT> * When can we call a template fucntion with and without template argument?
<heisenbuugGopiMT> Can I call `LoadDenseMatrix(filename, matrix, fatal, transpose, inputLoadType)` like this?
<heisenbuugGopiMT> Trying
<shrit[m]> `if (arma::is_SpMat<>) // to check instead of using is_same,
<shrit[m]> * `if (arma::is_SpMat<>) `// to check instead of using is_same,
<shrit[m]> and the else would go for load Dense matrices
<shrit[m]> no need for else if so far
<shrit[m]> Also there is a reference issue,
<heisenbuugGopiMT> Yea, I think the issue is with reference only.
<heisenbuugGopiMT> I am supposing that there is an `is_Mat<>` just like `is_SpMat<>`, is that okay?
<shrit[m]> no need for `is_Mat<>`
<heisenbuugGopiMT> /home/heisenbug/mlpack/branches/mlpack/src/mlpack/core/data/load_impl.hpp:92:30: error: expected unqualified-id before โ€˜)โ€™ token
<heisenbuugGopiMT> 92 | if (arma::is_SpMat<MatType>)
<heisenbuugGopiMT> I think we need to add value
<heisenbuugGopiMT> `is_SpMat<>::value`
<heisenbuugGopiMT> Yup
<shrit[m]> Exactly
<heisenbuugGopiMT> Yea, seems like it's inspired from `is_same` only. There also we are supposed to use `::value`.
<shrit[m]> Just interested to know what is the signature of the LoadSparse function that you are using?
<heisenbuugGopiMT> I am not passing `LoadInputType` if thats what's on your mind.
<shrit[m]> Actually the value is stored inside the struct `is_SpMat` if the matches then you get `true`
<shrit[m]> Yeah, but would you show me this function too? ` LoadSparseMatrix`
<shrit[m]> there is noting after an else { }
<shrit[m]> just a new paranthese
<shrit[m]> `else if ( some thing here)`
<shrit[m]> `else { execute }`
<shrit[m]> * `else if ( some condition here)`
<shrit[m]> * Actually the value is stored inside the struct `is_SpMat` if the MatType matches then you get `true`
<shrit[m]> Then the function is not taking `LoadDenseMatrix<MatType>`
<shrit[m]> but instead it is `<eT>`
<heisenbuugGopiMT> No, I've changed it in my branch. Sorry for the confusion
<shrit[m]> Okay, this should work fine,
<shrit[m]> Did you compile it?
<heisenbuugGopiMT> Same error
<heisenbuugGopiMT> Error
<heisenbuugGopiMT> * https://pastebin.com/0wUz5bsa
<shrit[m]> it is trying to initialize a SpMat with a Mat
<shrit[m]> that what I am understanding
<shrit[m]> would you compile this with -j1
<shrit[m]> ?
<heisenbuugGopiMT> Okay...
<shrit[m]> There is two errors, I think they are two separated errors, if you use -j1 it will stop at the first error
<shrit[m]> * There are two errors, I think they are two separated errors, if you use -j1 it will stop at the first error
<shrit[m]> Okay, I think you need to change the signature of `LoadSparseMatrix``to be same as it was back
<heisenbuugGopiMT> Back to `eT` one?
<shrit[m]> Exactly
<shrit[m]> header and impl
<heisenbuugGopiMT> What about `LoadDenseMatrix`?
<shrit[m]> It would be also great if you can do the same rapidly