IRC logs of #shogun for Monday, 2016-08-01

--- Log opened Mon Aug 01 00:00:46 2016
-!- mizari [~mizari@95-174-213-100.nts.su] has joined #shogun04:43
-!- mizari [~mizari@95-174-213-100.nts.su] has quit [Quit: Leaving]05:01
-!- sanuj [~sanuj@117.203.0.4] has joined #shogun07:39
@wikingsanuj, ping09:17
sanujwiking, hi09:18
@wikingwhat do you mean by this "The latter part is rather tricky and I think modifying SG_ADD is not a good way to do it. Modifying SG_ADD won't mean not touching rest of the shogun classes, there is no way to avoid that. The point of tags parameters was to get rid of setters-getters in shogun and provide a better API. "09:18
@wiking?09:18
@wikingi mean SG_ADD is just to add parameters to the ParamaterMap09:18
@wikingnothing else09:18
sanujwiking, i mean we want to switch from parameter.h to tags-parameter09:18
sanujright?09:18
@wikingyes09:18
@wikingbut SG_ADD is just a simple macro09:19
@wikingthat can be changed into anything you want09:19
sanujwiking, yes, but i'm saying that tweaking SG_ADD will break everything09:19
@wikingwhy?09:19
@wikingif you tweak it correctly09:20
@wikingit should just work as it was working before?09:20
@wikingi meant ! instead of ? :)09:20
sanujwiking, only tweaking SG_ADD won't work, all other classes would also need modifications09:20
@wikingwhy?09:20
@wikingi mean09:20
@wikingyou have paramter X09:21
@wikingyou want to add that parameter to ParameterMap09:21
@wikingno?09:21
sanujyes09:21
@wikingor what you want is to drop actually on interface level09:21
@wikingthe variables09:21
@wikingthat you add to the parameterMap?09:21
@wikingi mean i dont see when is the momemnt that everythign breaks09:22
@wikingand that you have modify everything?09:22
sanujwiking, see this PR https://github.com/shogun-toolbox/shogun/pull/340509:22
sanujin this i have just modified one parameter09:22
@wikingand this is what we want ?09:22
@wikinglisitsyn, ^09:22
sanujnot exatly09:23
sanujbut somewhat like this09:23
@wikingwhy do we wnat to remove parameters09:23
@wikingfrom the class itself09:23
@wikingi mean explicitly the param09:23
@wikingwe could just pass the reference to the param to the param map09:23
@wikingor?09:23
@wikingi mean i'm just putting here ideas09:23
sanujyeah09:24
-!- mode/#shogun [+o shogun-buildbot] by wiking09:24
-!- mode/#shogun [-o shogun-buildbot] by ChanServ09:24
@wikingfucking ChanServ09:24
sanujwiking, if we use tags-parameters then there is no point to have member variables09:24
sanujor is there?09:24
@wikingnot necessarily09:24
@wikingi mean see the point here09:24
@wiking:)09:24
@wikingi mean the paramter map09:24
@wikingis not only about removing the members09:25
@wikingbut as well to have an easy way for serialization framework09:25
@wikingto serialize the classes09:25
sanujyes09:25
@wikingand as well for the model param framework09:25
@wikingto do the parameter tuning09:25
@wikingso it's not really just about having the membervariables eliminated from the class09:26
sanujwiking, but if we have member variables then there will be 2 copies of variables09:26
@wikingno09:26
sanujone in map and one in member variable09:26
@wikingobviously09:26
@wikingjust in case the old param framework09:26
@wikingif we do it like that09:26
@wikingthen you just pass the reference09:27
@wikingto that param09:27
@wikingnot the value of it09:27
sanujwiking, map stores variables as Any objects09:28
@wikingyeah but your variable can be a reference?09:28
@wikingor not? :)09:28
sanujyes it can09:28
@wikingSaurabh7, ping ping09:28
@wikingsanuj, so?09:29
sanujwiking, actually, i'm a bit confused09:29
@wikingwhy?09:29
sanujwiking, there is one more thing09:29
@wikingbtw these are just ideas now09:29
sanujwiking, open GaussianARDKernel_unittest.cc09:29
@wikingbut let's try to first exhaust all our options09:29
@wikingbefore going with statements you did09:30
@wikingin your email09:30
@wikingwhich branch?09:30
sanujdevelop09:30
sanujgot to line 17909:30
@wikingyes09:31
sanujwiking, we will have to remove things like these09:31
@wikingyou mean marking that something is a gradient param? :)09:31
@wikingbtw do we have a way to support this?09:31
sanujwiking, i mean the usage of TParameter09:33
sanujwe can implement it differently using tags-parameter09:33
@wikingyeah09:33
@wikingsure i mean of course changing the whole backend09:33
sanujwiking, do we want to stop using TParameter?09:33
@wikingwill mean some major refactors09:33
@wikingbut again09:33
@wikinglets have a discussion about this09:33
@wiking:)09:33
sanujwiking, yeah, i wanted to start a discussion09:34
@wikingmmm that email sounded like things are decided09:34
@wikingnevermind09:34
sanujbut i just said that it is not just tweaking SG_ADD and it will work09:34
sanujwiking, i discussed with heiko and lisitsyn, we thought that tweaking SG_ADD would let us make it work without touching many other shogun classes09:36
sanujbut that would be a dirty fix even if it works09:36
sanujbecause with tags parameters we also want to get rid of setters and getters in each shogun class09:36
sanujand provide a cleaner api09:36
sanujwiking, what do you think?09:36
@wikingyeah that i get09:37
@wikingi mean setter/getter09:37
@wikingwell the only thing is that about TParameter09:37
@wikingwe still want to be able to set which params09:37
@wikingare actually possible to optimize09:38
@wikingin a param optimization fw09:38
@wiking(again this is not the universal truth.. just my opinion)09:38
sanujwiking, yeah, i'll have a better look at TParameter09:38
@wikingbut yeah about SG_ADD and having parameters still in the class itself09:39
@wikingsince we need to remove all the setter/getter methods (do we want to do this)09:39
@wikingthen we might think about removing09:39
@wikingthe object params09:39
@wikingbut maaaybe09:39
@wikingwe dont wanna do this kind of full upgrade09:39
@wikingand old classes can have both getter/setters, i.e. keep the old ones09:40
@wikingand just have what the tag based fw provides as well09:40
@wikingi mean they are never gonna overlap09:40
@wikingand they are gonna just provide the same functionality09:40
@wikingright?09:40
@wikingit doesn't really hurt to have those setter/getters there09:40
@wikingbut at least that way we dont have to do a major big commit09:41
@wikingwhere we clear up classes09:41
@wikingand of course when somebody sends in a new implementation/class09:41
@wikingthen we require not to have those setters getters anymore09:41
@wikingjust rely on the tag based one09:41
sanujwiking, yeah, we need to go step by step09:41
sanujwiking, i see what you are saying09:42
sanujseems like a good approach09:43
@wikingsonney2k, ping09:47
sanujwiking, so what this means is09:47
sanujthe first step is09:47
@wikingi mean first i wanna understand09:47
@wikingwhat was lisitsyn idea here09:47
lisitsynwe need some kind of trickery to make *some* of tags to access m_my_member09:48
sanujto keep the parameter stuff as it is09:48
@wikingif he imagined a huge cleanup09:48
@wikingok he is alive09:48
@wiking:)09:48
lisitsynnot the map but the member09:48
@wikingk09:48
@wikingso somehow the reference09:48
lisitsynthis is some kind of transition phase09:48
lisitsynyeah09:48
@wikingyep yeo09:48
@wikingokok and then new things09:48
@wikinghave to just rely on tags09:48
@wikingi suppose09:48
lisitsynyeap09:48
sanujand add a layer of tags-parameter, just to have another api to change the same set of parameters09:48
@wikingyeah seems teh best approach here09:48
lisitsynthen we can start dropping get_something set_something09:48
@wikinglisitsyn, do we wanna actively drop it?09:49
@wikingi mean do a backward cleanup of already created classes?09:49
lisitsynyeah if we want plugins09:49
@wikingah ok09:49
@wikingbut that's only when we already refactor things09:49
@wikingso anyways when we touch the classes09:49
@wikingthat's ok09:49
@wikingthen it's justified to have the change09:49
sanujwiking, lisitsyn i think as someone writes plugins for some old class, dropping unwanted stuff can happen then09:49
lisitsynyes09:49
@wikingsanuj, indeed09:49
lisitsynsomething like that09:50
sanujlisitsyn, even if we have member variables, the tags map will only store a reference09:52
sanujso no duplication of stuff09:52
lisitsynsanuj: yeah09:53
lisitsynsanuj: we need to trick any09:53
lisitsynto use exactly this area of memory09:53
sanujlisitsyn, i think it already does that09:53
sanujno?09:53
lisitsynno it allocates new one09:53
lisitsynI think I can come up with some implementation09:53
sanujlisitsyn, *(storage) = new T(*reinterpret_cast<T const*>(v));09:53
sanujhere is "new"09:54
lisitsynyeah but we need to force storage to be09:54
lisitsynm_some_member of class09:54
sanujlisitsyn, so currently there is duplication happening if we use member variables09:54
lisitsynright09:54
sanujlisitsyn, do we need to use SG_REF etc with tags-params09:55
lisitsynnope09:56
lisitsynsanuj: if we use Some09:56
sanujlisitsyn, this memory, scope, references are driving me a bit crazy :D09:56
lisitsynit's programming :D09:56
sanujlisitsyn, so how do you plan to use the m_member memory in any?09:57
lisitsynwe just need to create any with storage=&m_member09:57
lisitsynah and also force it not to delete it afterwards09:58
lisitsynotherwise it would kill the object09:58
-!- sanuj [~sanuj@117.203.0.4] has quit [Ping timeout: 264 seconds]10:01
-!- sanuj [~sanuj@117.203.0.4] has joined #shogun10:04
sanujlisitsyn, open any.h10:04
lisitsynsanuj: I remember it by heart ;)10:05
lisitsynjk10:05
sanujhaha10:05
sanujlisitsyn, so you mean "v" is getting deleted?10:05
lisitsynsanuj: v = m_member10:05
lisitsynand it should not be deleted10:05
lisitsynyes10:05
sanujyes10:05
lisitsynso we need other policy10:05
lisitsynlike external one10:05
sanujlisitsyn, which code is responsible for deleting "v"10:06
lisitsynhttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/any.h#L12010:07
lisitsynsanuj: will commute to job now, then I think I can get some time to do that10:08
sanujokay!10:08
sanujlisitsyn, but, in MockObject i use m_member to set a variable and everything works fine10:09
sanujwill have to check again now10:09
-!- sanuj [~sanuj@117.203.0.4] has quit [Remote host closed the connection]11:30
-!- sanuj [~sanuj@117.203.0.4] has joined #shogun11:42
lisitsynsanuj: in progress11:52
sanujlisitsyn, i have a few doubts11:52
sanujlisitsyn, the clear() function is only called in destructor and operator=11:52
lisitsynsanuj: yeah no worries11:52
sanujso how is it deleting "v"11:52
sanujlisitsyn, the Any object is alive till the map is alive i guess11:53
lisitsynyes11:53
lisitsynthe map is alive as long as object is alive11:53
sanujlisitsyn, so the member function is not getting deleted then11:53
sanujmember variable*11:54
lisitsynyes11:54
lisitsynit should not be deleted11:54
sanujcool11:54
sanujlisitsyn, shall we make get/set virtual?11:55
lisitsynwhy?11:55
sanujlisitsyn, if you see GaussianKernel11:55
sanujlisitsyn, it takes parameter width but saves log_width11:56
lisitsynthat sounds crazy11:56
sanujthe computation happens in set_width() or get_width()11:56
sanuj:D11:56
sanujlisitsyn,11:57
sanujvoid CGaussianKernel::set_width(float64_t w)11:57
sanuj{11:57
sanujREQUIRE(w>0, "width (%f) must be positive\n",w);11:57
sanujm_log_width=CMath::log(w/2.0)/2.0;11:57
sanuj}11:57
sanujlisitsyn, so if we want this to happen for set<float64_t>("width", 1.0) then it has to be overloaded11:57
lisitsynI am not sure what's the idea11:57
lisitsynwe can think of adding some transformation functions11:58
lisitsynto our get/set11:58
lisitsynit is easy to do11:58
lisitsynwith lambdas11:58
sanujokay11:58
sanujlisitsyn, yes actually11:58
sanujnow that we have c++1111:58
sanujlisitsyn, and we still need to add a list_parameters() to list all parameters in an object11:58
sanujit was removed due to the std::vector and SGVector decision11:59
lisitsynrigght11:59
lisitsynsanuj: ok writing test for this thing12:01
sanujlisitsyn, cool cool12:01
sanujlisitsyn, how to become a c++ god ? :D12:14
lisitsynsanuj: what for?12:14
lisitsyn:D12:14
sanujnice question12:14
sanujhaha12:14
sanuji dunno12:14
sanujlisitsyn, yandex makes coursera courses!12:17
sanujhttps://www.coursera.org/specializations/data-structures-algorithms12:17
lisitsynsanuj: yeap12:24
lisitsynsanuj: it is also HSE12:24
lisitsynwhere I used to work (or work)12:24
lisitsynnot sure :D12:24
sanujhaha12:25
sanujlisitsyn, you are a project manager right?12:26
lisitsynsanuj: no12:26
lisitsynkind of team leader12:26
lisitsynI do code stuff12:26
lisitsyn:)12:26
sanujokay12:26
sanujlisitsyn, what's the next thing?12:26
lisitsynsanuj: which next thing?12:26
sanujlike what do you want to do next? be in software forever?12:27
sanuji have seen people get bored12:27
sanujlisitsyn, btw i'm trying sets/gets and checking if it works with R12:27
lisitsynsanuj: anything that gets me yacht12:28
lisitsynhahah12:28
sanujhaha12:28
lisitsynand some house in sardinia12:28
lisitsynlol12:28
lisitsynsanuj: yeah would be cool if it works12:29
lisitsynlets merge if it does12:29
sanujokay12:29
sanujlisitsyn, sardinia looks like a nice place :D12:30
lisitsynnever been there but it must be12:30
sanuji see12:30
lisitsynsanuj: oh I don't compile shogun often but now it eats my cpu like crazy :D12:31
sanujyes it does12:31
sanujlisitsyn, which machine do you use12:32
lisitsynsanuj: macbook pro 201312:32
sanujaaah12:32
sanujnever used mac12:32
lisitsynmy eyes bleed when it is not retina12:32
sanujhaha12:32
sanujlisitsyn, time to upgrade your machine! :D12:33
sanujwhen apples releases new macs12:33
lisitsynI broke my previous mac12:33
lisitsyn:D12:33
sanujapple* :D12:33
lisitsynthey replaced it12:33
sanujyeah but they are still boring12:33
lisitsynI don't think they're going to replace it soon again12:33
sanujoh man i forgot to update sgbase.i12:34
sanujwill have to build again12:34
sanujlisitsyn, what does this comment mean? https://github.com/shogun-toolbox/shogun/pull/3357/files#diff-d1db47426b779ea8c77a30e93058c0abR312:46
lisitsynsanuj: you put GPL license header12:47
sanujlisitsyn, what is BSD license header?12:48
lisitsyncheck any new code12:48
sanuj * Copyright (c) 2016, Shogun-Toolbox e.V. <shogun-team@shogun-toolbox.org>12:48
sanuj * All rights reserved.12:48
sanujokay12:49
sanujand lisitsyn https://github.com/shogun-toolbox/shogun/pull/3357/files#diff-d1db47426b779ea8c77a30e93058c0abR3812:51
sanujdo i need to use """ blah """12:51
lisitsynif __name__ == "__main__"12:52
sanujoh12:52
lisitsynand also check some argparse12:52
sanujokay12:52
lisitsynor anything else12:52
lisitsynargparse is in base python thus best choice12:52
lisitsynI also like docopt but it needs installation12:53
sanujokay12:53
-!- shogun-notifier- [~irker@7nn.de] has joined #shogun12:55
shogun-notifier-shogun: Sergey Lisitsyn :feature/external_any_policy * 9d34252 / src/shogun/lib/any.h,tests/unit/lib/Any_unittest.cc: https://github.com/shogun-toolbox/shogun/commit/9d34252b1d85e97e038704e8bf03b81cb690cca312:55
shogun-notifier-shogun: Add non-owning Any policy12:55
shogun-notifier-shogun:12:55
shogun-notifier-shogun: This would enable us to implement SG_ADD so that12:55
shogun-notifier-shogun: parameters are used through map12:55
shogun-notifier-shogun: and member variables at the same time.12:55
lisitsynsanuj: https://github.com/shogun-toolbox/shogun/pull/3406/files12:57
sanujlooking12:57
sanujlisitsyn, this is neat13:01
lisitsynsanuj: C++17 will have any13:10
sanujlisitsyn, but we won't be using c++17 for ages13:10
lisitsynyeah we will adopt it in 2019 in the best case13:11
lisitsyn:D13:11
sanujhaha13:11
-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has joined #shogun13:40
travis-ciit's Sergey Lisitsyn's turn to pay the next round of drinks for the massacre he caused in shogun-toolbox/shogun: https://travis-ci.org/shogun-toolbox/shogun/builds/14884349013:40
-!- travis-ci [~travis-ci@ec2-54-167-78-142.compute-1.amazonaws.com] has left #shogun []13:40
lisitsynwhat?13:40
sanujlol13:40
lisitsynits green13:40
sanujno clue13:41
sanujit does that i guess13:41
sanujlisitsyn, https://twitter.com/smilevector13:51
lisitsynsanuj: booring13:52
sanujhaha13:52
sanujlisitsyn, have you read the deeplearningbook.org?13:54
lisitsynnope13:54
sanujit was one of the suggested learning for the dl project13:55
sanujlisitsyn, reading these kinds of books is difficult13:55
lisitsynwhy?13:56
sanujrequires patience and diligence13:57
sanujlisitsyn, i have updated this PR https://github.com/shogun-toolbox/shogun/pull/335714:07
sanujtell me if you want anything else changes14:07
sanujchanged*14:07
sanujand then we can merge once travis passes14:07
sanujwiking, ^14:07
@wikingyeah please work on that patch14:08
@wikingas that one is still not adequate14:08
sanujokay14:14
sanujwiking, what do you mean by your second comment?14:25
sanujhttps://github.com/shogun-toolbox/shogun/pull/3357#discussion-diff-72966702R96214:25
lisitsynwiking: https://github.com/shogun-toolbox/shogun/pull/3406 could you review and merge when you get time?14:26
shogun-notifier-shogun: Sergey Lisitsyn :feature/tags * 9d34252 / src/shogun/lib/any.h,tests/unit/lib/Any_unittest.cc: https://github.com/shogun-toolbox/shogun/commit/9d34252b1d85e97e038704e8bf03b81cb690cca314:43
shogun-notifier-shogun: Add non-owning Any policy14:43
shogun-notifier-shogun:14:43
shogun-notifier-shogun: This would enable us to implement SG_ADD so that14:43
shogun-notifier-shogun: parameters are used through map14:43
shogun-notifier-shogun: and member variables at the same time.14:43
shogun-notifier-shogun: Viktor Gal :feature/tags * 2cf0195 / src/shogun/lib/any.h,tests/unit/lib/Any_unittest.cc: https://github.com/shogun-toolbox/shogun/commit/2cf019538e75249810def33bc8cf24bf3d76f56f14:43
shogun-notifier-shogun: Merge pull request #3406 from shogun-toolbox/feature/external_any_policy14:43
shogun-notifier-shogun:14:43
shogun-notifier-shogun: Add non-owning Any policy14:43
-!- sanuj [~sanuj@117.203.0.4] has quit [Ping timeout: 252 seconds]15:03
@wikingSaurabh7: ?15:45
lisitsynwiking: gonna send PR15:49
lisitsynwith SG_ADD registering member15:49
@wikinglisitsyn, sounds good15:49
@wikingi'm here15:49
lisitsynso that it can be used by getterr15:49
@wikingwaiting15:49
@wikingand working on js15:50
lisitsyn:D15:50
lisitsynlol15:50
lisitsynjs15:50
@wikinghttp://www.networkworld.com/article/3101430/application-development/javascript-keeps-its-spot-atop-programming-language-rankings.html15:50
-!- c4goldsw [5da420e6@gateway/web/cgi-irc/kiwiirc.com/ip.93.164.32.230] has joined #shogun16:23
c4goldswHello World16:24
@wikingpong16:45
Saurabh7hi17:00
Saurabh7wiking: sry was aaway since afternoon17:00
Saurabh7let me type in quick17:01
@wikingno worris17:01
@wikingk17:01
@wikingthnx17:01
-!- shogun-notifier- [~irker@7nn.de] has quit [Quit: transmission timeout]17:43
@wikingrcurtin, are you areound?17:48
@wiking*around17:48
rcurtinwiking: yeah, just got back from lunch18:20
rcurtinI have a meeting at 1800 UTC though, so I won't be here forever :)18:21
lisitsynwiking: equals of CSGObject is not const18:21
lisitsyn:D:D18:21
lisitsynlol18:21
-!- sanuj [~sanuj@117.203.0.4] has joined #shogun18:39
-!- sanuj [~sanuj@117.203.0.4] has quit [Read error: Connection reset by peer]18:52
-!- sanuj [~sanuj@117.203.0.4] has joined #shogun19:09
-!- sanuj [~sanuj@117.203.0.4] has quit [Remote host closed the connection]19:34
c4goldswEarth to wiking20:36
--- Log closed Tue Aug 02 00:00:48 2016

Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!