IRC logs of #shogun for Thursday, 2018-08-09

--- Log opened Thu Aug 09 00:00:45 2018
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:3078:e3f2:a766:5a01] has joined #shogun00:45
-!- mode/#shogun [+o HeikoS] by ChanServ00:45
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:3078:e3f2:a766:5a01] has quit [Ping timeout: 256 seconds]01:02
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4390 synchronized by vinx1304:16
-!- sukey [~nodebot@ks312251.kimsufi.com] has quit [Read error: Connection reset by peer]08:48
-!- sukey [~nodebot@ks312251.kimsufi.com] has joined #shogun08:49
-!- mode/#shogun [+o sukey] by ChanServ08:49
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:3078:e3f2:a766:5a01] has joined #shogun10:46
-!- mode/#shogun [+o HeikoS] by ChanServ10:46
wuwei[m]HeikoS: hi10:48
@HeikoShi10:48
@HeikoSwuwei[m]: how are things?10:48
wuwei[m]i will finish peer review today10:48
wuwei[m]but now i have a problem with pipeline xval meta10:48
@HeikoSwuwei[m]: could you prioritise the peer review over the problem?10:49
@HeikoSsince shubham then can do things in parallel10:49
wuwei[m]sure10:49
@HeikoSwuwei[m]: ping me once you are done, then maybe I can help with the problem with xval10:50
@HeikoSwuwei[m]: what problem do you have?10:50
wuwei[m]the problem is that i can't put a Some<CPipeline> into CMachine*10:50
wuwei[m]if the pipeline builder returns Some<CMachine>, then Some can be implicitly cast to raw pointer10:51
@HeikoSyeah10:51
@HeikoSwe decided to only have those base types in the outside API in meta examples10:52
@HeikoSthis is one of the reasons why I suggested that this type is transparent10:52
@HeikoSie return Machine10:52
@HeikoSand then c++ users can cast it if they need the interface10:52
@HeikoSand we can add a factory for casting from swig10:53
@HeikoSCPipeline* pipeline(CMachine*)10:53
@HeikoSin factory.h10:53
@HeikoSwuwei[m]: see what I mean>10:53
@HeikoS?10:53
wuwei[m]yeah this should work10:53
@HeikoSit is a bit ugly as we are forcing C++ users to use .as if they want the Pipeline API10:54
@HeikoSbut I dont see another way of making this work with the examples10:55
@HeikoSyou could add two finalizing methods maybe10:55
@HeikoSsee shogun.i10:55
@HeikoSwhere we define methods just for the swig interface10:55
@HeikoSbut here I would see something like10:55
wuwei[m]can we add an overload of put, that accepts Some<T>?10:55
@HeikoSwe have that already10:56
@HeikoSbut you cannot convert Some<Subclass> to Some<Baseclass>10:56
@HeikoSyou can add two pipeline builder finalisers10:56
@HeikoSone that returns CPipeline (hidden from swig)10:56
@HeikoSand one that returns CMachine10:57
@wikingHeikoS, why hide it from swig?10:57
@wikingi mean if you hide it from swig10:57
@HeikoSactually it doesnt have to be hidden10:57
@HeikoStrue10:57
@wikingthere's really no need to actually have it as CPipeline10:57
@HeikoSthen swig peeps can also get the API10:57
@HeikoSto access machines10:57
@HeikoStrue10:57
@HeikoSso just two methods for now10:57
@HeikoSuntil we can regiuster the parameters of this thing10:58
@HeikoSthen we can remove one10:58
wuwei[m]i mean the overload of put that accepts Some<T> can explicitly take the raw pointer, and then forward to put(T*)10:58
@HeikoSwuwei[m]: that is there already10:59
@HeikoSvoid put(const std::string& name, Some<T> value)10:59
@HeikoS{10:59
@HeikoSput(name, value.get());10:59
@HeikoS}10:59
wuwei[m]ah didnt see this11:00
wuwei[m]but i wonder why T* cannot be put to base*11:01
@HeikoSsmart pointer problem11:01
@HeikoSah11:02
@HeikoSno11:02
@HeikoStemplate <class T, class = typename std::enable_if_t<is_sg_base<T>::value>>11:02
@HeikoSthe trait11:02
wuwei[m]i see11:02
@HeikoSwuwei[m]: also put is type ultra safve11:02
@HeikoSif something is registered as CMachine11:02
@HeikoSyou cannot put CMachineImplementation11:02
@HeikoSyou  have to call put<CMachine>11:03
@HeikoSthis is why we cannot do the downcasting with Some and put11:03
@HeikoSI mean11:04
@HeikoSwe can add an exception11:04
@HeikoSof explicitly allowing a put for CPipeline11:04
@HeikoSthat then forwards it to put<CMachine>11:04
@HeikoSwe would do this in shogun.i11:04
@HeikoSwhere we can overload the C++ classes11:04
@HeikoSthis would in fact be a workaround that doesnt require our C++ api to change11:05
@HeikoSwiking: what do you think?11:05
@HeikoSthen the pipeline builder returns Some<CPipelein>11:05
wuwei[m]sure, i will check that11:05
@HeikoSand we add SObject::put(Some<CPipeline>) inside the shogun.i11:05
@HeikoShacky as fuck11:06
@HeikoSbut cleaner for the C++ API11:06
@HeikoSah no11:06
@HeikoSwont work with cpp meta examples I think11:06
@HeikoSno then the first option is better11:06
wuwei[m]ah yes11:06
@HeikoSpipline builder returns CMachine11:06
@HeikoSand another option for CPipeline11:06
@HeikoSwuwei[m]: btw11:07
@HeikoSdid you try to register the paramerters of CPipeline?11:07
@wikingHeikoS, just a sec11:07
@wikingneed to organize11:07
@wikingsome other stuffg11:07
@HeikoSof course eq2uals and clone wont work11:07
@HeikoSbut put/get might11:07
@HeikoSanyways11:07
@HeikoSgotta run11:08
@HeikoSwuwei[m]: pls make sure to send this peer review (draft) soon, so we can have a look. Would also be good if you put that into your blog later on11:08
wuwei[m]HeikoS: aren't parameters of pipeline, vector<pair<string, variant>>  registerable?11:09
@HeikoSwuwei[m]: I think they might be11:10
@HeikoSgotta try11:10
@HeikoSjust clone equals serialization wont work11:10
@HeikoSbut those dont work anyways11:10
@HeikoSand then we can ask sergey to fix things with any :)11:10
@HeikoSlisitsyn: ^11:10
wuwei[m]sure11:10
@HeikoSwuwei[m]: btw11:16
@HeikoSif you add the CMachine return type method for the pipeline builder11:16
@HeikoSyou can still add a CPipeline* pipeline(CMachine*) method to factory.h11:17
@HeikoSin order to show how to use the CPipeline API in the meta examples11:17
@wikingHeikoS, jok just a sec i'll read back the logs11:20
wuwei[m]HeikoS: hi16:16
wuwei[m]https://docs.google.com/document/d/1gu3DdaFTfZB5TsDmE05qjz6yoOlwEb9szEOxkCW8H5o/edit?usp=sharing this is my peer review16:17
@HeikoSwuwei[m]: Id like to make a few comments, could you allow that for me?16:50
wuwei[m]sure16:50
wuwei[m]HeikoS: done, sorry didn't the email from google doc for permission request17:22
wuwei[m]*didn't see*17:23
-!- HeikoS [~heiko@2a00:23c5:e10a:5c00:3078:e3f2:a766:5a01] has quit [Ping timeout: 256 seconds]19:52
-!- witness [uid10044@gateway/web/irccloud.com/x-eoccyknjkfodfuwe] has joined #shogun20:48
--- Log closed Fri Aug 10 00:00:47 2018

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