ChanServ changed the topic of #mlpack to: "mlpack: a fast, flexible machine learning library :: We don't always respond instantly, but we will respond; please be patient :: Logs at http://www.mlpack.org/irc/
gtank___ has quit [Read error: Connection reset by peer]
gtank___ has joined #mlpack
kyrre has quit [Read error: Connection reset by peer]
kyrre has joined #mlpack
< shrit[m]> rcurtin: These result are with full bt I will try to use cout and see if I can anything else
ImQ009 has joined #mlpack
< R-Aravind[m]> <anjishnu[m] "If the loss function is L=f(x), "> How would I check if the backward method is working properly?
< R-Aravind[m]> and if we differentiate `max(0, 1 - (y - x))` w.r.t. x we get 1 right?
< anjishnu[m]> To check the correctness of your Backward method, you can compare it with the expected output from a different framework like PyTorch. You might want to take a look at the example notebooks in [this issue](https://github.com/mlpack/mlpack/issues/2444) to understand how.
< anjishnu[m]> max(0,f) is a piece-wise defined function. Obviously it won't have a single output. The differentiation will also give a piece-wise defined output.
< anjishnu[m]> * max(0,f) is a piece-wise defined function. Most probably it won't have a single output. The differentiation will also give a piece-wise defined output.
< himanshu_pathak[> Great work @anjishnu:matrix.org https://github.com/iamshnoo/mlpack-testing I think I need to learn from you. How to represent my work :)
< anjishnu[m]> 😅 aah, thank you!!
< himanshu_pathak[> It's looking really nice and also your github profile readme is awesome :)
< anjishnu[m]> I wanted to sort of make them look aesthetic so that I could present them as good samples of what I do. Most of my other repos are not so well-maintained :)
< himanshu_pathak[> oh 😃
< himanshu_pathak[> Hey sakshamb189 are you there I think we have a meet today
< sakshamb189[m]> yes I am here
< himanshu_pathak[> My work with DBN is pretty much complete.
< sakshamb189[m]> From the static code analysis build I see that it is showing
< sakshamb189[m]> `Not all members of a class are initialized inside the constructor. Consider inspecting: numFunctions.`
< himanshu_pathak[> > <@sakshamb189:matrix.org> From the static code analysis build I see that it is showing
< himanshu_pathak[> > `Not all members of a class are initialized inside the constructor. Consider inspecting: numFunctions.`
< himanshu_pathak[> Ahh yes because I can't do that because I not passing predictors when initilizing RBM
< himanshu_pathak[> I pass predictors when calling Train() of RBM inside my DBN class
< sakshamb189[m]> can you initialise it to 0
< sakshamb189[m]> ?
< himanshu_pathak[> <sakshamb189[m] "can you initialise it to 0"> Ahh yes that will also work :)
< himanshu_pathak[> will change in next commit
< himanshu_pathak[> So, my remaining tasks will be solving that bug and adding some more tests
< sakshamb189[m]> Also you should start working on your final report for GSoC submission as this would be the last week.
< himanshu_pathak[> <sakshamb189[m] "Also you should start working on"> Yeah that is also important I will start from tomorrow
< himanshu_pathak[> Should I create a Readme
< sakshamb189[m]> yes you can share it here once you are done
< himanshu_pathak[> or write in a blog
< sakshamb189[m]> I think either should be fine.
< himanshu_pathak[> Ahh ok I will prefer Readme :)
< himanshu_pathak[> Time flies So early
< sakshamb189[m]> yup it did happen pretty fast.
< sakshamb189[m]> Is there anything else we should discuss?
< himanshu_pathak[> No everything fine with me have a great week ahead :)
< sakshamb189[m]> yup you too. Just remember to share the final report once so, that we can make sure it looks good.
< himanshu_pathak[> <sakshamb189[m] "yup you too. Just remember to sh"> Yeah sure I know I am bad at presenting things will share soon :) :)
< rcurtin> shrit[m]: yes, but you have to use the `bt` and `frame` commands to be able to inspect variables in individual stack frames
< rcurtin> based on the "No locals" output you gave, that looks like stack frame 0, which probably isn't likely to be very useful; I imagine you want the stack frame in which serialize() is called
< rcurtin> I was busy yesterday but have some time to put into this today, so I will try and debug the issue too. I believe that something is wrong in pointer_wrapper, but I am not yet sure what (or if that is a correct diagnosis)
< rcurtin> if you're here, I'd be happy to help out and work together in the process
< R-Aravind[m]> <anjishnu[m] "To check the correctness of your"> Got it. thanks
< R-Aravind[m]> <anjishnu[m] "max(0,f) is a piece-wise defined"> piece-wise defined function, thats something new I learned today.
< shrit[m]> rcurtin I am here
< R-Aravind[m]> <R-Aravind[m] "image.png"> so this would be the result of the differentiation . right? @anjishnu:matrix.org
< shrit[m]> I got a good amount of time today, I have tried to disable to serialization entirely, but I am still getting the memory issue
< anjishnu[m]> <R-Aravind[m] "so this would be the result of t"> I haven't looked too closely but yeah most probably that is correct. You would also need to define the value at f=0 I guess.
< shrit[m]> rcurtin: Actually after a lot of debug, the tree seems do not have a Dataset when passed in the CheckTree function. However, just before being passed in this function the dataset does exist and can be printed
< shrit[m]> At the same time I have noticed that the random generated dataset is not the same dataset that is printed by the tree function Dataset
< shrit[m]> The error is very strange, it seems to me as if the tree.Dataset(return *dataset) have been deleted somehow just at the moment after it has been serialized
< shrit[m]> I think it is related to the serialization name
< sakshamb189[m]> Hey kartikdutt18 since this would be the last week you should start working on your final GSoC report and try to share it here so, that we can verify it once.
< shrit[m]> Since in serialization.hpp in line 264 and line 283 the name of t and newT is not the same.
< kartikdutt18[m]> Sure, I will start working on it.
< kartikdutt18[m]> * Hey sakshamb189 ,Sure, I will start working on it.
< jeffin143[m]> @walragatver:matrix.org:
< jeffin143[m]> Are you there ?
ImQ009 has quit [Read error: Connection reset by peer]
< rcurtin> shrit[m]: ok, done with lunch, let me catch up with your messages
< rcurtin> can you tell me what you mean when you say the tree doesn't seem to have a dataset when passed to CheckTree()?
< rcurtin> in any non-root nodes, the dataset pointer should be NULL, but in the root node it should point to something
< rcurtin> is the problem happening before or after serialization?
< jeffin143[m]> rcurtin (@freenode_rcurtin:matrix.org): may be we should get a auto land feature mm
< rcurtin> jeffin143[m]: I don't know what you mean, can you explain? :)
< jeffin143[m]> After 2 days of approval , auto land the commit ..?
< jeffin143[m]> I mean let Mlpack bot merge the pr ?
< rcurtin> oh, I think sometimes there are reasons to not do that, like if the PR should wait for some other PR or something
< jeffin143[m]> Since you are almost done with the automatical release
< rcurtin> I don't think we've had too many problems with PRs that were forgotten to merge :)
< jeffin143[m]> Yeah , true :)
< rcurtin> I dunno if I'm almost done... for ensmallen I think the scripts all work right, but for mlpack there's a bit more work to do
< jeffin143[m]> Currently we had lot of automation in our repo
< jeffin143[m]> Even the mail for Thursday meetings are automated :)
< jeffin143[m]> Also I wanted to ask
< rcurtin> true
< jeffin143[m]> We have examples on binding and python in cmake
< jeffin143[m]> Should we add go julia and r ???
< jeffin143[m]> In readm
< jeffin143[m]> > We have examples on binding and python in cmake
< jeffin143[m]> Sry , readme.md file
< jeffin143[m]> We have examples on binding and python in readme file *
< rcurtin> yeah, if you want to add those links it would be awesome! at least for julia and go for now, R isn't merged yet
< jeffin143[m]> Yes :)
< jeffin143[m]> I will find some out
< jeffin143[m]> Summer went soon
< rcurtin> agreed! the time really got away from me too
< jeffin143[m]> Now agin contribution would decrease :)
< jeffin143[m]> It's close to 18 months for me :)
< jeffin143[m]> 2019 march my first pr
< rcurtin> :)
< jeffin143[m]> Are you in julia development team ??
< jeffin143[m]> I mean do you develop julia langauge ?
< rcurtin> no, the company I work for is building a database in the Julia language, but not so much contributing to the language itself
< jeffin143[m]> Oh I see
< rcurtin> by the way, I haven't been able to keep up with the mlboard work, but if you have a tutorial or something that can be presented, it can be publicized, and that would be really cool
< jeffin143[m]> Is it faster than c++ databases present currently ?
< rcurtin> not at the moment, but we are adding features at the current time, not so much optimizing them :) there are some DB benchmarks we do really well on
< jeffin143[m]> Oh I see , and then you provide it as a service ??
< rcurtin> jeffin143[m]: awesome! I think that if we can do a good job of publicizing all the different components we're making, then we can get a lot of attention and spotlight on the work, which is awesome
< jeffin143[m]> I mean the db ?? To enterprise ??
< rcurtin> I think that a lot of people overlook the abilities of mlpack, in part because there may not be enough publicized material about it
< shrit[m]> I mean after searialization the pointer of tree.Dataset is 0
< rcurtin> yeah, the plan is that the DB is provided as a cloud service, so people interact with it directly, not from Julia or anything
< jeffin143[m]> Shrit had a tough time this summer , template error could be tough
< rcurtin> shrit[m]: ok, I'm reproducing it right now, let's see if we can figure out why tree.Dataset() == 0 after serialization
< jeffin143[m]> rcurtin (@freenode_rcurtin:matrix.org): oh I see :)
< rcurtin> agreed, I think he did not sign up to debug serialization :-D but it is awesome work, really really helpful to pull boost out as a dependency
< jeffin143[m]> Yes , awsm work :)
< jeffin143[m]> Was porting some test of tree based files
< jeffin143[m]> Mikhail did a great job :)
< jeffin143[m]> Wooh
< rcurtin> agreed
< jeffin143[m]> May be if get kotlin bindings then we can get into mobile application :)
< jeffin143[m]> But that's far away
< rcurtin> :)
< jeffin143[m]> I forgot to ask you , what about the java bindings 😂
< rcurtin> I don't think it would be too hard to write; Yashwant has shown it's not too hard to pump out bindings for different languages
< jeffin143[m]> It's too much on your hands
< rcurtin> yeah, exactly, it's too much---I can't keep up
< rcurtin> vasniktel's contribution was awesome, I just haven't had a chance to return to it
< jeffin143[m]> yashwants19 has now become proficient enough
< rcurtin> agreed
< jeffin143[m]> Was there any proposal from him this summer ?
< rcurtin> surprisingly there wasn't; I had expected to see one
< jeffin143[m]> I too thought , may be he might have been caught up some where
< rcurtin> either that, or he wrote the java bindings not as a part of a plan to join the GSoC program or something
< shrit[m]> You do not have to worry about, I am more than happy to be part of mlpack, just these days are being tough, but I am still finding the time for mlpack
< jeffin143[m]> I guess you have touched every file in mlpack :)
< rcurtin> I think so :)
< shrit[m]> I think so :)
< rcurtin> ok, I reproduced it---you're right, after serialize(), tree.Dataset() is NULL
< rcurtin> now I am adding some `cout` statements to pointer_wrapper::save(), to see what the values of localPointer are before and after we create smartPointer, and to see what the values of smartPointer are before and after the call ar(CEREAL_NVP(smartPointer))
< rcurtin> this should hopefully help determine whether the problem is in pointer_wrapper, or in BinarySpaceTree::serialize()
< shrit[m]> Also I have used cout to print when serializing and deserializing in serialize_arma.hpp. It seems to be called for the first time fine in for serializing and deserialzing and then the second time it only serialize and them it shows error mapping.
< rcurtin> ok, I see, good to check that too
< rcurtin> it takes a long time to rebuild, so it may be a while until I have results :)
< shrit[m]> It was the same for me, I have also noticed that the dataset is not the same, the dataset generated by randomlly in the test suits is not the same that is printed by tree.Dataset() before serialization
< shrit[m]> You can try to print the dataset after the line 332 and after the line 335 in serializtion_test.cpp
< shrit[m]> I will go and take dinner, see you in a while
< rcurtin> yeah, exactly, that is what I did
< rcurtin> enjoy dinner! hopefully the linking will be complete by the time you get back :)
jeffin143 has joined #mlpack
< jeffin143> rcurtin : Sorry to interrupt in between of the debugging
< jeffin143> but I applied for a fellowship program yesterday , starting sept end , but I noticed that you can host your project too
< jeffin143> It is similar to GSOC, if we have the bandwith we can apply to :)
< jeffin143> It is program by Github and MLH
< rcurtin> that seems cool, can you send a link?
< jeffin143> Yes it is exact replica of GSOC, students with their application , pods ( As in a chunk of students along with two maintainers )
< jeffin143> I guess the different is instead of google it is MLH
< rcurtin> right, I think that would be totally reasonable; I don't think I have the time to help with the project, but if there are folks who want to apply for it, I say go for it!
< jeffin143> Yes true :)
< rcurtin> if you want, maybe send an email to the mailing list to see if anyone is interested?
< jeffin143> Yes sure, I will do it :) that's a good suggestion since IRC chats could be missed
jeffin143 has quit [Remote host closed the connection]
< rcurtin> shrit[m]: I found that localPointer *changes* between the beginning of pointer_wrapper::save() and the end
< rcurtin> that's not what I expected
< rcurtin> but, I guess it is okay, since the process of make_unique() will use the move constructor
< rcurtin> I'm going to look into whether we can do any better
< rcurtin> shrit[m]: it appears that we can avoid making a copy; we can use the contructor of unique_ptr<> directly, like this:
< rcurtin> smartPointer = std::unique_ptr<T>(localPointer);
< rcurtin> once I changed the code to use that, now the tree dataset pointer is not NULL after serialization
< rcurtin> now the error I see is this:
< rcurtin> /home/ryan/src/mlpack/src/mlpack/tests/serialization_test.cpp(312): fatal error: in "SerializationTest/BinarySpaceTreeTest": critical check &xmlTree.Dataset() == &xmlTree.Child(i).Dataset() has failed [0x55923971a570 != 0]
< rcurtin> I think that this may be because some of my advice from earlier is incorrect---I had previously said that only the root node holds a pointer to the dataset
< rcurtin> but I think maybe the root "owns" the dataset, but all nodes should point at the same pointer
< rcurtin> I will try setting left->dataset = dataset and right->dataset = dataset in loading
< rcurtin> shrit[m]: this appears to fix the BinarySpaceTree serialization: https://gist.github.com/ac64e2ad6edd169fa98eeea6cb102d3a
< rcurtin> there is still some debugging output there, so you can see where I did some debugging
< rcurtin> the important changes are from make_unique<> to unique_ptr<> in pointer_wrapper.hpp
< rcurtin> and in binary-space_tree_impl.hpp, where I do a depth-first recursion on the tree, only if we are the parent, in order to set the child dataset pointers correctly
< rcurtin> I believe that change will be necessary for the RectangleTree too, and perhaps some other tree types
< shrit[m]> Ok I see
< shrit[m]> I will apply this tomorrow, thanks for the fix
< rcurtin> sure, it may not be the only error, but it should at least get us closer
< rcurtin> hopefully the debugging strategy that I used makes sense too; if it doesn't, I'd be more than happy to explain
< rcurtin> for any other serialization issue I'd use a virtually identical strategy
< rcurtin> (it sounds like at least the first steps, we were both doing the same thing)