IRC logs of #shogun for Thursday, 2019-01-24

--- Log opened Thu Jan 24 00:00:41 2019
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]00:04
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun00:06
-!- mode/#shogun [+o wiking] by ChanServ00:06
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]00:42
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun01:55
-!- mode/#shogun [+o wiking] by ChanServ01:55
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 240 seconds]01:59
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun02:44
-!- mode/#shogun [+o wiking] by ChanServ02:44
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 250 seconds]02:48
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun06:45
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host]06:45
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun06:45
-!- mode/#shogun [+o wiking] by ChanServ06:45
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 246 seconds]06:49
-!- gf712 [8028b333@gateway/web/freenode/ip.128.40.179.51] has joined #shogun08:38
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun09:59
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]10:07
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun10:12
gf712wiking_ hey10:16
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Ping timeout: 245 seconds]10:16
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun10:41
gf712wiking_ hey10:58
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Ping timeout: 240 seconds]10:59
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun11:24
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]11:29
-!- HeikoS [5aae0441@gateway/web/cgi-irc/kiwiirc.com/ip.90.174.4.65] has joined #shogun11:43
-!- mode/#shogun [+o HeikoS] by ChanServ11:43
@HeikoSgf712 yo11:43
@HeikoSlisitsyn yo11:43
lisitsynHeikoS: hello11:43
@HeikoSlisitsyn I have a suggestion11:43
lisitsynyas11:43
lisitsynwhat is?11:44
@HeikoSI want to get rid of all swig related code in libshogun11:44
@HeikoSand move it to the swig c++ code11:44
@HeikoSlike parameter_names etc11:44
@HeikoSthings that would only be necessary from interfaces11:44
@HeikoSas otherwise we have the c++ strongly typed api11:44
lisitsynwell sounds good11:44
@HeikoSthis means that the c++ api and the swig api will change11:44
@HeikoSas for example factories will be moved to swig code11:45
@HeikoSthis means no more meta examples in c++11:45
@HeikoSwhat are your thoughts on that?11:45
lisitsynwhy to move factories?11:45
@HeikoSbecause there are constructors11:45
lisitsynbut what about plugins?11:46
@HeikoSah11:46
@HeikoSyou see, this is why I ask :)11:46
@HeikoSplugins need factories as well11:46
@HeikoSmmh11:46
lisitsynyeah but if you have other way to use plugins without factories11:46
@HeikoSactually this then might not make sense11:46
lisitsynit would work11:46
@HeikoSthings like getting the parameter names11:47
@HeikoSis this also necessary?11:47
lisitsynthis one I am not sure11:47
@HeikoSI give you a plugin for a machine11:47
@HeikoSyou want to use it from c++ but you dont have the source11:47
lisitsynwell I have one idea though11:48
@HeikoSthen you would want parameter names and description or?11:48
lisitsynit might be that plugin always comes with a header11:48
lisitsynbecause it is C++ and you're gonna compile that anyway11:48
lisitsynso basically plugin might be distributed as .h + .so11:49
lisitsynthen we need no factories11:49
lisitsynand no introspection things11:49
@HeikoSah11:49
lisitsynsee what I mean?11:49
@HeikoSis that what we had in mind initially?11:49
lisitsynno11:49
lisitsynI think no11:49
@HeikoSyes the header as part of plugin I guess11:49
lisitsynit is a new idea for me11:50
lisitsyn:D11:50
lisitsynjust realized it might be good11:50
@HeikoSso this is for the case of using the plugin in c++ program11:50
lisitsynthe header basically defines the objects11:50
lisitsynand its parameters also11:50
@HeikoSotherwise I would just use the .so and shogunswig.so11:50
lisitsynbecause tags11:50
@HeikoShow do you mean for the parameters?11:50
lisitsynclass LibSVM { static Tag<float> C }11:51
lisitsynsomething like that11:51
@HeikoSI see11:51
lisitsynso you can use typed thing11:51
@HeikoSthe name registration is not visible though as that is runtime11:51
lisitsynyeah11:51
@HeikoSbut that is for swig11:51
@HeikoSfor c++ one can use tags11:51
lisitsynyes11:51
lisitsyntags are defined in .h11:51
@HeikoSso actually, we can even more the getters/setters that use strings into swig right?11:51
lisitsynyes11:52
@HeikoSok that is good11:52
lisitsynI think they make not much sense in C++11:52
@HeikoSwhat about the meta examples?11:52
@HeikoSthey will break11:52
@HeikoSbecause API is not unified anymore11:52
@HeikoSso we won't have c++ examples unless we write them11:52
lisitsynwhat wouldn't work?11:52
@HeikoSlike factories11:52
lisitsynah11:52
@HeikoSwhich are used in there11:52
@HeikoSor generic put/get11:53
@HeikoSwell get we have typed11:53
@HeikoSbut then we would also have to make the meta language for put11:53
@HeikoSsomething like11:53
@HeikoSsvm.putReal("C", 1.0)11:53
lisitsynI am unsure about this thing yet11:53
@HeikoSI mean it is not the worst thing11:53
@HeikoSthe meta examples having a unified api in c++ and swig is awkward anyways11:53
@HeikoSfor many reasons11:53
@HeikoStype safety11:54
@HeikoSwrap11:54
lisitsynI feel like targeting python/etc is a bit more important anyway11:54
@HeikoSsome11:54
lisitsynbut I can't decide there11:54
@HeikoSI wonder whether we could convince ourselves that pelple who want the c++ api can just read the doxygen? :D11:54
@HeikoSsince they know c++ code, they can read unittests and the API11:54
@HeikoSwell I am asking for opinions11:55
@HeikoSso that we can discuss with the others11:55
lisitsynyeah C++ is something more advanced11:55
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun11:55
@HeikoSwiking_ yo11:56
wiking_almost11:56
wiking_not yet11:56
gf712HeikoS hey, trying to understand this conversation :D11:56
@HeikoSgf712 hi11:57
@HeikoSwiking_ let me know once you have a minute I would like to run something by you11:57
@HeikoSgf712 questions / opinions welcome :)11:57
gf712ok, so from basics, so I can just find my bearings...11:58
lisitsynHeikoS: but why to drop C++ api?11:58
lisitsynI mean is it causing any problems now?11:59
gf712the idea is to separate all the low level stuff from the ML algorithm implementations11:59
@HeikoSlisitsyn I have the feeling it would be good design wise to separate the interface code from the c++ code11:59
@HeikoSsince it would make a few things much more clear11:59
@HeikoSsee the latest pipeline problems11:59
@HeikoSthey have a neat c++ api which is typed and good11:59
lisitsynI don't know about pipeline problems12:00
@HeikoSthere is a pr12:00
@HeikoSbut generally it is just to make it a bit more neat12:00
lisitsynchecking12:00
@HeikoSlisitsyn I feel sometimes there is a risk of imposing questionable design into the libshogun code just because of the interfaces12:01
lisitsynuhm can't see12:01
lisitsynHeikoS: well C++ should target for tag-based/typed and others should target string-based12:01
lisitsynthat's I agree12:01
@HeikoSso I guess my motivation comes from looking at the cpp meta examples and the fact that they dont really look like c++12:02
@HeikoSso I am like, why not accept that it will be a different API12:02
lisitsynHeikoS: I have a thought that12:03
@HeikoSand then, why would we need all the code to make the swig examples work in libshogun12:03
lisitsynit would be good to still have it12:03
lisitsynbut also try to develop more typed one12:03
lisitsynin parallel12:03
@HeikoSwhat is "a typed one"12:03
lisitsyne.g. develop an interface without factories12:03
lisitsynthen with tags instead of strings12:03
@HeikoSyes this is kind of what I mean12:03
@HeikoSthat interface is there right?12:03
@HeikoSwe have it12:03
lisitsynyeah but I don't have a feeling that you need to drop anything to do that12:04
@HeikoSjust a matter of keeping things tidy: code that is not part of c++ api can go to swig interface12:04
@HeikoSthen there is no risk of convoluting libshogun12:04
@HeikoSgf712 shall I merge?12:05
gf712HeikoS just need to fix the push_bask12:06
@HeikoSok I will wait12:06
gf712does it mater where the doxygen string is btw?12:06
@HeikoSno it doesnt12:06
gf712ok, cool12:06
@HeikoSsorry I didnt hit reply12:06
gf712btw unrelated12:06
gf712but would it be possible to get a version string for python API12:07
gf712like in conda there is version 6.1.312:07
lisitsynHeikoS: can you show me an example of non-cpp api? I am checking now and it looks more or less good12:07
@HeikoSlike this stuff12:09
@HeikoS28 auto d = wrap(distance("EuclideanDistance")); 29 d->put("lhs", features_train);12:09
@HeikoSgf712 what do you mean?12:09
gf712HeikoS sg.__version___12:09
gf712It is needed for openml12:09
@HeikoSgf712 ah I see12:09
@HeikoSgf712 I think we have that somewhere12:09
lisitsynHeikoS: a small step would be to make it12:10
@HeikoSgf712 Version.h12:10
lisitsynd->put(Tag<decltype(features_train)>("lhs"), features_train);12:10
gf712HeikoS yup, but I don't think there is a way to get MAINVERSION12:10
lisitsynthen gradually make it12:10
@HeikoSlisitsyn that we can do now already :D12:10
gf712which is what is used in the conda versioning12:10
gf712I think?12:10
@HeikoSgf712 we can modify the current mechanism?12:10
@HeikoSlisitsyn the enums are another issue12:11
lisitsynsomehow make it "d->put(Tags::lhs, features_train);" or whatever like that12:11
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]12:11
@HeikoSlisitsynwell the problem is that then we need to change the meta example language12:11
lisitsynHeikoS: one easy thing would be to pollute some auxillary namespace with all possible tags12:11
@HeikoSas it is12:11
@HeikoSDistance d = distance("EuclideanDistance", lhs=features_train, rhs=features_train)12:11
gf712HeikoS cool, I can do that, just wanteed to ask if that's fine12:11
@HeikoSgf712 sure do it :)12:12
@HeikoSlisitsyn all good ideas12:12
lisitsynHeikoS: shogun::tag::<every possible parameter>12:12
@HeikoSlisitsyn this breaks the cpp meta examples12:12
lisitsynno, why?12:12
@HeikoSbecause mapping from the example.sg file to the cpp output is hard12:13
@HeikoSwe dont have typed put calls in there12:13
lisitsynHeikoS: you just drop the ""12:13
lisitsyn"something" becomes tag::something12:13
@HeikoScan you elaborate?12:13
lisitsynthe hardest part is to create such a .h with tags12:13
lisitsynHeikoS: you can easily replace all the strings with tags12:14
lisitsynwe just have to declare them somehow12:14
lisitsynthis would become more C++y12:14
@HeikoSI am not that sure12:14
@HeikoSbecause there we are making another weird construct to unify things12:14
@HeikoSwhy not just go with the normal c++ way12:14
lisitsynthat's the normal C++ way12:15
@HeikoSthat12:15
lisitsyn:)12:15
@HeikoSa list with all possible tags?12:15
lisitsynno12:15
@HeikoSgenerated by a python script? :D12:15
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun12:15
lisitsynit is a step before we have plugins12:15
lisitsynthen this tags would go to the plugin header12:15
lisitsynbut before we have that we have a giant plugin (shogun itself)12:15
lisitsynthat's the point12:15
lisitsynthe conversion to plugins would be much easier then12:15
@HeikoSsure12:15
@HeikoSok the other thing that is an example are enums12:16
@HeikoSin swig these are ints12:16
lisitsynyes?12:16
@HeikoSwouldnt it be nice to have them typesafe in c++?12:16
lisitsynoh that's really minor, isn't it ?12:17
lisitsyn:)12:17
@HeikoSit is12:17
@HeikoSjust adds to the list12:17
@HeikoSjust like "wrap"12:17
@HeikoSand the factory12:18
@HeikoSinstead of some and ctor12:18
lisitsynwell we basically need to convert T("name") to some<T>()12:18
@HeikoSlisitsyn just to clarify what you meant above12:18
@HeikoSlisitsyn mmh that seems almost possbible to do now or?12:19
lisitsynHeikoS: just needs proper header to include12:19
lisitsynI don't know how to detect that12:20
@HeikoSwe have the ctags for that no?12:20
lisitsynyes if you know how that's nice12:20
@HeikoSso questions12:20
@HeikoSDistance d = distance("EuclideanDistance", lhs=features_train, rhs=features_train)12:20
@HeikoSwe have this12:20
lisitsynok you detect the header12:21
lisitsyninclude it12:21
lisitsynthen do auto d = some<EuclideanDistance>();12:21
@HeikoSwhich becomes12:21
@HeikoS 28 auto d = wrap(distance("EuclideanDistance")); 29 d->put("lhs", features_train); 30 d->put("rhs", features_train);12:21
@HeikoSwe make it12:21
@HeikoSsome<EuclideanDistance>()12:21
@HeikoSand then12:21
lisitsynauto lhs_tag = Tag<decltype(features_train)>("lhs");12:21
lisitsynd->put(lhs_tag, features_train);12:22
lisitsynthen gradually we move lhs_tag away somehow12:22
@HeikoSlet me try that12:22
@HeikoSjust now12:22
lisitsynokay (shrug) :)12:22
@HeikoSah12:22
@HeikoSno12:22
@HeikoS    "Init": {        "Construct": "auto $name = some<C$typeName>($arguments)$kwargs",        "Copy": "auto $name = wrap($expr)$kwargs",12:23
@HeikoSwe are using some already for ctor12:23
@HeikoSbut since all is factory12:23
@HeikoSwe have this "wrap" for all copy asignments12:23
lisitsynwrap is some hack I don't remember what for12:23
@HeikoSwhich covers both factory and CFeatures::apply12:23
lisitsynsomebody would fix it some day I believe12:23
@HeikoSto put raw pointers into Some12:23
@HeikoShow?12:24
@HeikoSCLabels* CFeatures::apply12:24
@HeikoSraw pointer12:24
lisitsynah12:24
lisitsynwe get rid of pointers12:24
lisitsynthis is how12:24
lisitsyn:D12:24
lisitsynahhh ok12:24
lisitsynwe need to make the great transition12:24
lisitsyntough thing12:24
@HeikoShehe12:24
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]12:24
@HeikoSok I will try the put instead12:24
lisitsyntags is something doable I believe12:25
lisitsynit would crash if we put it two times though12:25
lisitsynyou'd declare the tag twice12:26
@HeikoSgive me a one liner12:26
lisitsynHeikoS: give you what?12:26
@HeikoSfor the put12:26
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun12:27
lisitsynit is just the same12:27
lisitsyneh?12:27
lisitsynd->put(Tag<decltype($value)>($name), $value);12:27
lisitsynsomething like that12:27
lisitsynHeikoS: ^?12:28
@HeikoStrying12:29
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]12:31
@HeikoS35 kmeans->put(Tag<decltype<2>("k")>, 2);  36 kmeans->put(Tag<decltype<d>("distance")>, d);12:32
lisitsynHeikoS: oops12:36
lisitsyndecltype<2>12:36
lisitsyn:)12:36
lisitsyndoes it work?12:36
@HeikoS29 d->put(Tag<decltype(features_train)>("lhs")>, features_train);  30 d->put(Tag<decltype(features_train)>("rhs")>, features_train);12:37
@HeikoSyeah was playing with the meta generator12:37
@HeikoSstill not12:37
lisitsyndoesn't work? what fails?12:37
lisitsynah12:38
lisitsynyou forgot ()12:38
lisitsyncreate tag12:38
lisitsynHeikoS: is it possible to put the definitions of those tags to the beginning of the snippet?12:39
@HeikoShttps://github.com/shogun-toolbox/shogun/pull/448312:39
@HeikoSdoes this have the double tag problem?12:40
@HeikoSit compiles12:40
lisitsynHeikoS: what's the double tag problem?12:40
@HeikoSyou said something above12:40
lisitsynHeikoS: ah this one doesn't12:40
@HeikoSah12:40
@HeikoSnice runtime error12:40
@HeikoSold problem12:40
@HeikoSonce again meta cpp12:40
@HeikoSSome12:40
@HeikoSand put12:40
@HeikoSah wait I know how to fix12:40
lisitsyneh?12:40
@HeikoS182: [ERROR] In file /home/heiko/git/shogun/src/shogun/base/SGObject.h line 366: Cannot put parameter EuclideanDistance::lhs of type shogun::CFeatures*, incompatible provided type shogun::Some<shogun::CFeatures>.12:41
lisitsynah ok12:41
lisitsynHeikoS: I don't know how to fix that :)12:42
lisitsyndo you?12:42
@HeikoSyes12:42
@HeikoSoverload put12:43
@HeikoSfor Some12:43
@HeikoShide it from swig12:43
@HeikoSI did that for the put by name already12:43
@HeikoSbut put by name can be moved to swig c++12:43
@HeikoSso adding anotoher one12:43
lisitsynoh12:44
@HeikoSLet's see what the CI says12:46
@HeikoSthanks for the discussion!12:46
lisitsynHeikoS: wilkommen :)12:47
lisitsynHeikoS: ah you can also do the same with get12:49
lisitsynkmeans->get<SGMatrix<float64_t>>("cluster_centers")12:50
lisitsynkmeans->get(Tag<SGMatrix<float64_t>>("cluster_centers"))12:50
@HeikoSbut why?12:50
lisitsynjust the same reason12:50
@HeikoSalready typed or?12:50
lisitsynto prepare for the transition12:50
@HeikoSbut here get is a template12:50
@HeikoSi dont see a difference between get<> and get(Tag<>12:51
lisitsynHeikoS: I believe the next step is to move all the Tag<...> to the top of the script12:51
@HeikoSThat will be tricky12:51
@HeikoSalthough12:51
lisitsynHeikoS: some postprocessing12:51
@HeikoSmaybe not12:51
lisitsynHeikoS: perfect would be to declare a namespace in the beginning12:52
lisitsynnamespace tags { ... }12:52
lisitsynand then put them there12:52
@HeikoSlisitsyn oh one thing12:54
@HeikoSPipeline basically has the problem12:54
@HeikoStogether with xvalidation12:54
@HeikoSthat xvalidation has a member of type CMachine12:55
@HeikoSand Pipeline inherits from machine12:55
@HeikoSso we would like to "put" a pipeline12:55
@HeikoSbut that doesnt work with tags12:55
@HeikoSyou can only put a CMachine12:55
@HeikoSlisitsyn no subclasses allowed12:55
@HeikoSlisitsyn solutions? we thought about doing that via c++ api (factory that accepts Pipeline and then casts or so)12:56
@HeikoSI gotta go12:56
@HeikoSbut maybe talk to wuwei[m] about this12:56
lisitsynHeikoS: uhm no solution so far12:56
@HeikoSwould be good to have that sorted12:56
@HeikoSok see you12:56
@HeikoS??????12:57
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun12:59
-!- wiking__ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun13:14
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Read error: Connection reset by peer]13:15
-!- HeikoS [5aae0441@gateway/web/cgi-irc/kiwiirc.com/ip.90.174.4.65] has quit [Ping timeout: 240 seconds]13:19
lisitsynoh I was scaried with that word haha13:21
-!- wiking__ is now known as wiking_14:00
-!- wiking_ is now known as wiking14:01
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host]14:01
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:01
-!- mode/#shogun [+o wiking] by ChanServ14:01
@wikingmmm i needed to ghost the guy14:01
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]14:08
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:09
-!- mode/#shogun [+o wiking] by ChanServ14:09
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]14:09
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:12
-!- mode/#shogun [+o wiking] by ChanServ14:12
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 268 seconds]14:17
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:28
-!- mode/#shogun [+o wiking] by ChanServ14:28
gf712wiking: hey14:50
@wikinggf712: hey14:51
gf712I have a question about openml14:51
gf712do you know how openml uses the 'oml-python:serialized_object' entries internally?14:51
gf712I am not sure if it something do just help serialising/deserialising14:52
gf712to*14:52
gf712or if the server actually uses this information in the flows?14:52
gf712for example here https://github.com/openml/openml-python/blob/7a612eaece2fd28315d99dda3e2393ada2f27478/openml/flows/sklearn_converter.py#L50114:55
@wikingmmm14:57
@wikingin case of sklearn that's a pickle file or what?14:57
@wikingno it's 'function'14:58
@wikingi mean i think there's no real object ever14:58
@wikingserialized14:58
@wikingit's only the 'flow'14:58
gf712in the case of pipelines it creates {'oml-python:serialized_object':"component_reference"}14:58
gf712ah ok14:58
@wikingwhich is just a bunch of metadata14:58
@wikingof the objects14:58
gf712so it's probably just a helper to get an object from flow14:58
@wikingyes14:59
gf712OK cool! thanks14:59
@wikinggf712: what would you use for a std::map<std::set<>, std::function>14:59
@wikingthis?14:59
@wikingor you have a better idea?14:59
@wikingapart from using unordered version ;)15:00
gf712in which situation are you using it?15:00
@wikingah yeah set = std::set<std::string>15:02
@wikingso bascially i have 1 function for the same bunch of strings15:02
@wikinggf712: this is in re how to identify machines and export them to coreml15:02
gf712so the function has nothing bound right?15:03
@wikingthat's just the function that does the converting15:03
gf712ah ok, I think I would do that15:03
@wikingonly thing is that there's not better way to do this dispatching15:04
gf712std::function<T(std::string)> no?15:04
gf712or whatever the signature is15:04
@wikingstd::function<T(CMachine*)>15:05
@wikingbut yeah15:05
gf712otherwise you could do SFINAE and create custom structs to call the right function?15:08
gf712not sure if that is any better though15:08
@wikingyeah that might look ugly15:09
@wiking:)15:09
gf712but that woudn't work with std::string anyway15:10
gf712would have to use something compile time15:10
gf712anyway, yup the map works well15:10
gf712feels pythonic15:10
wuwei[m]hi, I added a new factory but I got "splitting_strategy() takes no keyword arguments", anyone knows what I missed?16:37
@wikingdamn16:37
@wikinga static variable cannot be assigned by a lambda expression16:37
@wiking?16:37
@wikinganybody knows why this isn't evaluated https://pastebin.com/ZuYBc7vT16:38
@wiking?16:38
@wikingif i call this macro as if it doesn't do anything16:39
wuwei[m]what's the rhs? a lambda? but the lhs is a bool16:41
wuwei[m]maybe you should add () at the end16:41
@wikingnoup :(16:42
@wikingdidn't help16:42
@wikingapparently https://stackoverflow.com/questions/15581662/is-it-possible-to-initialize-static-variable-with-lambda16:43
@wikingshould do it what u said wuwei[m]16:43
gf712are you trying to store the lambda or the result of it?16:44
@wikingi just need to call the lambda16:44
@wikingdont care about it's result16:45
@wikingas u see its just a placeholder16:45
@wiking:)16:45
@wikingbut i wanna init that variable on load time16:45
@wikingof the lib16:45
@wikingfunny16:46
@wikingif i export this as a shared lib16:46
@wikingthen it works16:46
@wikingmmmm i guess maybe the static vars are being optimized out if its a static lib16:46
@wikingsince they are not used?16:46
gf712it seems like it16:49
gf712tried it on compiler explorer16:50
gf712and when you use optimiser the static disappears16:50
gf712when it isn't used16:50
gf712something like this https://godbolt.org/z/ArKqDY16:53
gf712doesn't compile result when O3 but does on O0, when you remove static it gets compiled either way16:54
gf712is that what you mean?16:54
@wikingyeah16:55
@wikingnow if i use shared lib things getting better16:55
@wikingbuuuut16:55
@wikingso actually the lambda is being evaluated16:55
@wikingbut somehow when i fill up that static hashmap16:55
@wikingit's as if didn't happen16:55
gf712are you doing that in c++14 or 17?16:56
@wiking14 atm16:57
@wikingits weird17:00
@wikingthat's a static var17:00
@wikingif i change content17:01
@wikingthen it should remain like that17:01
@wiking:)17:01
gf712do you capture &kConverters?17:02
@wikinggf712: shoudln't need to capture it17:03
@wikingas its a static17:03
@wikingbut i've tried passing the static var as an arg of the lambda17:04
@wikingsame result17:04
@wikinggf712: here?17:56
@wikinglisitsyn: here?17:57
@wikingis there any particular reason why this is not a const17:59
@wikinghttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L44717:59
@wiking?17:59
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]18:04
gf712not anymore I think? it was changing self->map before (bug), but not it isnt so should be const18:07
gf712now*18:07
-!- gf712 [8028b333@gateway/web/freenode/ip.128.40.179.51] has quit [Quit: Page closed]18:15
-!- shubham808 [~atom@14.139.240.247] has joined #shogun18:19
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun18:41
-!- mode/#shogun [+o wiking] by ChanServ18:41
@wikinglisitsyn: around?20:33
lisitsynwiking: hey20:33
@wikingok so do you know why this is not const20:33
@wikinghttps://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/SGObject.h#L44720:33
@wikingand the other question20:33
@wikingif i just create an empty CLibSVM20:33
@wikingand i do20:33
@wikingc->get("kernel")20:34
@wikingshould it return anything or throw exception?20:34
@wikingbtw its a magical exercise to try to work with a const CMachine* and use its getters20:34
@wiking:D20:34
@wikingeverything screams20:35
lisitsynwiking: I think if you make it const and it works20:35
lisitsynthen you should make it const :)20:35
@wikingyeah i made it20:35
@wikingi ust wondered if there's special reason20:35
lisitsynI don't know any20:35
@wikingbut still get("kernel")20:35
@wikinglibc++abi.dylib: terminating with uncaught exception of type shogun::ShogunException: [ERROR] In file /Users/wiking/shogun/src/shogun/base/SGObject.cpp line 1075: Cannot get parameter LibSVM::kernel of type shogun::CKernel* as object, not object type.20:36
@wikingbut i guess its because i'm calling this on an empty CLibSVM20:36
@wikingyep yepo it was only that20:37
@wiking:)20:37
@wikinglisitsyn: https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/kernel/Kernel.h#L5220:38
@wikingthis as well is > /dev/null20:38
lisitsynoh yes please :)20:38
-!- shubham808 [~atom@14.139.240.247] has quit [Quit: Leaving.]21:47
@wikinglisitsyn: asdf21:57
@wiking:)21:57
@wikingi think our polynomial kernel is rather simple :)21:57
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]22:31
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun22:38
-!- mode/#shogun [+o wiking] by ChanServ22:38
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 246 seconds]22:42
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun22:51
-!- mode/#shogun [+o wiking] by ChanServ22:51
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]23:46
--- Log closed Fri Jan 25 00:00:42 2019

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