IRC logs of #shogun for Wednesday, 2018-02-07

--- Log opened Wed Feb 07 00:00:52 2018
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has quit [Quit: Leaving.]00:26
-!- slayerjain [uid117577@gateway/web/irccloud.com/x-hzaguvshltgmtnia] has joined #shogun05:50
-!- durovo [~durovo@57.65.2ea9.ip4.static.sl-reverse.com] has quit [Remote host closed the connection]07:16
-!- durovo1 [~durovo@57.65.2ea9.ip4.static.sl-reverse.com] has joined #shogun07:16
-!- slayerjain [uid117577@gateway/web/irccloud.com/x-hzaguvshltgmtnia] has quit [Quit: Connection closed for inactivity]09:39
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has joined #shogun09:46
-!- mode/#shogun [+o HeikoS] by ChanServ09:46
@HeikoSwiking: whats your take on https://github.com/shogun-toolbox/shogun/pull/415409:48
@HeikoSlisitsyn: ^ the thing works for all interfaces now09:48
@HeikoSit's a bit of a brute force solution though ...09:48
lisitsynHeikoS: checking09:49
@wikingbut that huge hack is for which languages?09:50
@wikingall/09:50
@wiking?09:50
lisitsynok it can be fixed later09:50
lisitsynat least the hack is really isolated09:50
lisitsynI like it09:50
@HeikoSits in libshogun09:50
@HeikoSthe thing is09:50
@HeikoSyou CAN do float(4.0) in octave09:50
@wikingHeikoS, but if this is only for octave09:51
@wikingthen why dont you just forget kwargs in octave? :)09:51
@HeikoSthis is not for kwargs in octave09:51
@HeikoSit is to have put in octave09:51
@HeikoSput("name", value)09:51
@wiking" kwargs ~works~ for objects ~already~ #4154 "09:51
@wiking:)09:51
@HeikoSah yeah09:52
@HeikoSsorry thats obsolete09:52
@wikingok so this whole thing could go09:52
@wikingif we would drop support for octave09:52
@wikingright?09:52
@HeikoSnot really09:52
@HeikoSit is a more general problem09:52
@HeikoSwhat type has 4.0 in python?09:53
@wikingfloat09:53
lisitsynDEPENDENT TYPES FOR THE WIN LOL09:53
@HeikoSand what if you want to use that in a put for a 32/64 bit09:53
lisitsynyeah it is ambiguous in many langs09:53
@wikingfloat = double09:53
@wikingthere's no double in python09:53
@wiking*float that is09:53
@wiking32bit flot09:53
@wikingit's always double09:54
@HeikoSif you register a 64 variable in tags09:54
@HeikoSand then you do put("name", 4.0) in python09:54
@HeikoSyou might get type error09:54
@wiking?09:54
@wikingit's always double in python09:54
@HeikoSor vice verse09:54
@HeikoS32 bit tag09:55
@HeikoSand you do put with 4.009:55
@wikingmmm imo then this should be in the swig interface09:55
@HeikoSwhatever the std type of that literal is09:55
@wikingno?09:55
@wikingi mean these type of hacks09:55
@HeikoSso then what happens  is put("name" np.float32(bla))09:55
@wikingwhich are very much language dependent09:55
@HeikoSit comes from tags being strict on types, no hierarchy09:55
@wikingshould be residing in the swig interface object09:55
@wikingno?09:55
@wiking*interface library09:56
@HeikoSI agree, it should sit there09:56
@HeikoSBUT09:56
@HeikoSthats even more messy09:56
@HeikoSlisitsyn and I discussed09:56
@HeikoSat least if it is in libshogun, there is only one place of mess09:56
@HeikoSand this put is just for swig really, not intended for internal use09:56
@wikingHeikoS, i dont get it why is it more messy?09:56
@wikingi understand but what i dont get is why is it being messier09:56
@wikingto be in a swig interface09:56
@wikingwhere then you can have full control09:56
@HeikoSi think it will be different for every lang, no?09:57
@wikingover each and every specific lang09:57
@wikingyeah but that's the point no09:57
@wikingyou want to filter out shit09:57
@wikingthe earliest possible09:57
@wikingin the inputs09:57
@wiking'shits' = caveats of the lang09:57
@HeikoSwhile I agree with that early thing, imo, having this at a single point is a bit easier to controll09:57
@wiking?09:58
@wikingwe already have typemaps09:58
@wikingper language09:58
@wikingas it's required right?09:58
@wikingwe could handle this in the very same way09:58
@wikingin a way this is a typemap story as well09:58
@HeikoSTouching 8 typemaps yes09:58
@wikingbut i mean09:58
@wikingnot the actual typemap09:58
@wikingas this is specifically for put/get functionality09:59
@wikinghence that could be a new .i09:59
@wikingthat is required to be specified09:59
@wikingfor a new lang09:59
@HeikoSsure or that09:59
@wikingi mean dont get me wrong i know that it prbabily never happen09:59
@wikingbut what if somebody comes09:59
@wikingand wants go09:59
@wikingand whatever other lang map09:59
@wikingand for sure it has its own09:59
@wikingnice super hacks09:59
@wikingso then you are expected09:59
@wikingto hack this stuff?09:59
@wikingi mean kudos to your efforts09:59
@wikingbut this is messy10:00
@wikingas you know it10:00
@HeikoSyeah it is10:00
@HeikoSI mean10:00
@wikingand probably it's only you and lisitsyn who will be able to touch it10:00
@HeikoSNah I mean it is not that bad10:00
@wikingif there's anything to be done10:00
@wikingit is10:00
@HeikoSI could have written these things out, template is just to make it compact10:00
@wikingit's a concatenation of defines10:00
@wikingonly way to nicely figure it out what happens10:00
@wikingis to use -E10:00
@HeikoStrue10:00
@wikingif you are not hacking shogun for the last 2 years10:00
@HeikoScould be copy pasted as well :D10:00
@HeikoSyeah I agree10:01
@wikingso i nmean10:01
@wikingif you have it divided into smaller10:01
@wikinglanguage specific chunks10:01
@wikingpeople might have a better grip on it10:01
@wikingbut i men10:01
@wiking*i mean10:01
@wikingthese are imo10:01
@HeikoSyeah sure10:01
@wikingbut i feel that because of octave10:01
@HeikoSit's good that you raise these points10:01
@wikingand other shits10:01
@wikingyou are making the underlying lib a bit messier10:02
@wikingthan it already is10:02
@wikingwhich was *always* the case10:02
@wikingdont get me wrong10:02
@wikingit's not your fault10:02
@wikingthis was always true10:02
@wikingbut i was hoping we can lower the entropy10:02
@wiking:)10:02
@HeikoSyeah sure10:02
@wikingwith these additional hacks10:02
@wikingbut hey10:02
@wikingmerge it10:03
lisitsynuhmm these hacks should actually go into any10:03
lisitsynand that would left is just a set of put/get methods10:03
@wikingand see how complicated is to do this10:03
lisitsynwhich is fine10:03
@wikingin octave's interface10:03
lisitsynwiking: are you talking about try types 1) 2) 3) ?10:03
@wikingimo that's a good ground to test these ideas10:03
lisitsyntry float try double? that?10:03
@HeikoSlisitsyn: really, you think that should be in any?10:03
lisitsynyes I think it is fine to have it here10:03
@wikinglisitsyn, well better idea ? :)10:03
lisitsynif you can cast10:04
@wikingi mean it's tryParse all the time10:04
lisitsynwiking: I just want to clarify what exactly is the hack you don't like10:04
@wikingright?10:04
@wikinglisitsyn, that it resides here10:04
@wikingnot in the interface10:04
lisitsynif you're talking about tryFloat tryDouble then I think we can get rid of it10:04
@HeikoSlisitsyn: if this is going to be moved to any, then all the #define stuff can go10:04
lisitsynjust a little bit later10:04
@HeikoSif any would be clever enough to convert things to the appropriate type10:04
lisitsynbut definining all the put/get in the sgobject explicitly is good, right?10:05
@wikinglisitsyn hacko. :)10:05
lisitsynI mean the patch is mostly about explicitly defining all the get/put10:05
@wikingyes i get that part10:05
lisitsynthe hack is just to make it work10:05
@wikingi understand10:05
@wikingwhat it is about10:05
@wiking:)10:05
lisitsynand the hack would go somewhere else10:05
@wikingi'm jsut wondering whether or not10:05
lisitsynsooo don't worry be happy10:05
lisitsyn:)10:05
@wikingwe could actually put this into some other place10:05
lisitsynyes10:06
lisitsynI believe into any10:06
lisitsyn:)10:06
@wikingwhich is not10:06
@wikingin libshogun10:06
@wiking:)10:06
@wikingi mean we can use helper functions10:06
lisitsynHeikoS: it is just to make any work like variable10:06
@wikingthink of sg_print story hack10:06
@wiking:)))10:06
lisitsynI mean you can do float x=3; double y=5.0; x=y;10:06
@wikingin all the interfaces10:06
lisitsynHeikoS: ^ that's the same for any10:06
@wikingstd::varianteeeee el patron?10:06
lisitsynallowing assigning convertible types is fine I believe10:07
@wikingbtw wouldn't that actually be more suitable here?10:07
@wikinglisitsyn, ^10:07
@HeikoSlisitsyn: ok10:07
@HeikoSlisitsyn: I mean by all means do it then10:07
@HeikoSlisitsyn: and then we just expose the explicit put methods purely, without try-error types10:07
@wikingHeikoS, you can get back to me about this shit10:07
@HeikoSand then it's much cleaner?10:08
@HeikoSwiking: sorry what?10:08
@wikingjust a sec10:08
@wikinglisitsyn, ok so i might be stupid10:09
@wikingbut really10:09
@wikingwhy dont we use std::variant?10:09
lisitsynuhm10:09
lisitsyninstead of any?10:09
lisitsynI think we would go beyond # of template args10:10
lisitsyn:)10:10
@wiking:)10:10
@wikingbut i mean somewher ein the interface10:10
@wikingbecause that's kind of what you want in a way no?10:10
@wikingi mean in between swig10:10
@wikingand libshogun10:10
lisitsynwe start using any as variant10:10
lisitsynthat's true10:10
lisitsynbut too many possible types10:10
@wikingi mean what i dont get honestly now is10:11
@wikingwhy we *only* use .i in our swig10:11
@wikingi mean as if we couldn't offload there some c++ functionality10:11
@wikingthat actually just does some magic wrapping10:11
@wiking'magic'10:11
lisitsynI do not know such a magic10:11
@wikingsimplifies things for swig10:11
lisitsynif I knew I'd use it :)10:12
@wikingsee sg_print10:12
@wikingidiotism10:12
lisitsynI don't know :)10:12
@wikingi mean nothing forces us to only rely10:12
@wikingon swig generated stuff10:12
lisitsynin general I agree that offloading to cpp library is good10:13
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/45534645e67370b99b1b03667e3e617b6764a175 by vigsterkr10:13
@wikingHeikoS, ^10:13
lisitsynbut I don't know what exactly to use10:13
@HeikoSwiking: nice will read soon!10:14
@HeikoSlisitsyn: I will put a warning for now10:14
@wikingHeikoS, dont say nice till u've seen it10:14
@HeikoSSetting LibSVM::C1 of type float64_t from float32_t.10:14
@HeikoSwiking: :D10:14
@HeikoShey I have a q about typemaps10:14
@HeikoSI was trying to extend the put to vector10:14
@HeikoSbut the typemaps don't want to match10:14
@HeikoSi.e.10:14
@HeikoS417:     features.put("feature_matrix", matrix)10:14
@HeikoS417: NotImplementedError: Wrong number or type of arguments for overloaded function 'SGObject_put'.10:14
@HeikoS417:   Possible C/C++ prototypes are:10:14
@HeikoS417:     shogun::CSGObject::put(std::string const &,int32_t)10:14
@HeikoS417:     shogun::CSGObject::put(std::string const &,float32_t)10:14
@HeikoS417:     shogun::CSGObject::put(std::string const &,float64_t)10:14
@HeikoS417:     shogun::CSGObject::put(std::string const &,SGVector< int32_t >)10:14
@HeikoS417:     shogun::CSGObject::put(std::string const &,SGVector< float64_t >)10:15
@HeikoS417:     shogun::CSGObject::put(std::string const &,SGMatrix< float64_t >)10:15
@HeikoS417:     shogun::CSGObject::put(std::string const &,shogun::CSGObject *)10:15
@HeikoSand matrix is of type np.float6410:15
@HeikoSideas?10:15
lisitsynah10:15
@HeikoSfunny thing is that RealFeatures features(matrix) works10:15
lisitsynso it doesn't work for you as well10:15
lisitsynok10:15
lisitsyn:)10:15
lisitsynthat's exactly where it stopped working for me10:15
@HeikoShehe10:15
@HeikoSI digged a bit and also found that10:16
lisitsynHeikoS: to debug it check the generated swig cpp10:16
lisitsynfind implementation of put10:16
lisitsynand you will find that it doesn't generate things for SGMAtrix properly10:16
@wikingHeikoS, what do you wanna put?10:16
lisitsynit didn't use the typemap10:16
@HeikoS417:     features = RealFeatures("asdas")10:16
@HeikoS417: NotImplementedError: Wrong number or type of arguments for overloaded function 'new_RealFeatures'.10:16
@HeikoS417:   Possible C/C++ prototypes are:10:16
@HeikoS417:     shogun::CDenseFeatures< float64_t >::CDenseFeatures(int32_t)10:16
@HeikoS417:     shogun::CDenseFeatures< float64_t >::CDenseFeatures()10:16
@HeikoS417:     shogun::CDenseFeatures< float64_t >::CDenseFeatures(shogun::CDenseFeatures< float64_t > const &)10:16
@HeikoS417:     shogun::CDenseFeatures< float64_t >::CDenseFeatures(shogun::SGMatrix< double >)10:16
@HeikoS417:     shogun::CDenseFeatures< float64_t >::CDenseFeatures(shogun::CFile *10:16
@HeikoSso if you try the wrong input to the ctor10:17
@HeikoSit gives you a different signature10:17
@HeikoSCDenseFeatures(shogun::SGMatrix< double >)10:17
@HeikoSrather than shogun::CSGObject::put(std::string const &,SGMatrix< float64_t >)10:17
lisitsynI don't know if it is due to overloading10:17
lisitsynbut it didn't work for me exactly the same way10:17
lisitsynwhen I was trying to rename them10:17
@HeikoSI am puzzled about the double vs float6410:17
@wikingHeikoS, i might be blind can you give me your put line?10:18
lisitsynI don't think it is about float6410:18
@wikingmatrix ?10:18
@wikingize what10:18
@HeikoSwiking: it is the first line each in the blobs I pasted10:18
lisitsynHeikoS: just check the swig generated cpp10:18
@HeikoSah10:18
@wikingmatrix = ?10:18
lisitsynit will be wrong10:18
@HeikoSnp.zeros((1,2), dtype=np.float64)10:18
@wikingok so SGVector actually10:19
lisitsynhello anybody here10:19
lisitsyn:)10:19
lisitsynjust find the implementation of put in swig generated cpp10:19
lisitsyn:)10:19
@wiking:)10:19
@wikingyeah but10:19
@wikingyou can filter these10:19
lisitsynI am 99% sure it is wrong10:19
@wikinglisitsyn, have u tried what i've told you?10:19
lisitsynbecause I had the same problem10:19
@wikingwith the stupid traits?10:19
lisitsynI don't remember10:20
lisitsynI tried something but nothing10:20
@wikingi mean that only works of course10:20
@wikingif you allow10:20
@wikingto have10:20
@wikingputX, putY, putZ10:20
lisitsynI believe it has to have something with overloading10:20
@wikingas there you can force with typetraits10:20
@wikingthat the right put is being called10:20
@HeikoSlisitsyn: yeah and the first argument being the same or so10:20
@HeikoSwiking: sure, I know, the whole point here is to have a single put10:20
@HeikoSin the interfaces10:20
lisitsynyeah we need single put10:20
lisitsynand if you check10:21
lisitsynthe10:21
lisitsyngenerated10:21
lisitsyncpp10:21
lisitsyn:)10:21
@HeikoSlisitsyn: ok on it10:21
@HeikoS1 sec10:21
@wikingif u want one put idk10:21
lisitsynHeikoS: just check how it casts SGMatrix10:21
lisitsynit is probably wrong10:21
@wikingthen it's some shit with the generated cpp10:21
lisitsynwhich makes me think swig doing wrong job with overloaded methods10:21
@wikingthe way i figured out was constantly generating cxx10:21
lisitsynit doesn't apply typemaps properly10:21
@wikinglisitsyn, mmmm10:21
@HeikoSyou know how this is named10:21
@wikinglisitsyn, caution there10:21
@HeikoSthe put thing?10:21
@wikinglisitsyn, i caught with the one above10:22
@wikingcouple of bugs in typemaps10:22
@wikingactually10:22
@wiking:D10:22
lisitsynHeikoS: try something like __put10:22
lisitsynor _put10:22
@wikinglisitsyn, namely for R there were problems with the typemaps10:22
lisitsynwiking: yes that's true10:22
@wikingso i mean10:22
lisitsynit is either our configuration for typemaps10:22
lisitsynor swig10:22
@wikingsometimes swig is doing the job right10:22
@wikingand typemaps are shit10:22
@wikingi mean10:22
@wikingthat's always the case10:22
@wikingswig just does what you tell it to do10:23
lisitsynit is not about the internals of typemaps10:23
@wikingnothing else10:23
lisitsynit is about applying them or not10:23
lisitsynI think it does not apply them in case of overloading the put method10:23
lisitsynsad!10:23
lisitsyn:D10:23
@wikinglisitsyn, couldnt we just say .put(std::string, std::function<std::variant> f);10:25
@wiking:)10:25
@wikingand then10:25
@wikingin the specific swig interface10:25
@wikingyou have to define the lambda10:25
@wiking:)10:25
lisitsynaaand the hack of the year award10:26
lisitsyngoes to10:26
lisitsyn:)10:26
lisitsynHeikoS: did you found?10:26
@wikingbut then you can enforce there whatever you want10:26
@wikingno?10:26
@HeikoSlisitsyn: yeah it is convoluted10:27
lisitsynHeikoS: no just find the line it tries to cast to sgmatrix10:27
lisitsynwiking: not sure, variant of what?10:27
lisitsyn<...>?10:27
@wikingint, long, float,double, sgv<sameprimities>, sgm<sameprimitive>, sgobj10:28
@wiking:)10:28
lisitsynI am not sure we don't get beyond the reasonable limit10:28
@HeikoSlisitsyn: you have mail10:30
@wikinglisitsyn, i mean this was my 1 second attempt10:31
@wikingto offload this stuff10:31
@wikinginto a wrapper .cpp10:31
@HeikoSlisitsyn: line 2502410:31
@HeikoSit does a reinterpret_cast<SGMatrix<float64_t> * >10:32
@HeikoSI think normally it does something "as_NPYMat64"10:32
lisitsynHeikoS: ye10:32
lisitsynHeikoS: so you can see it didn't use the typemap properly :(10:33
lisitsynthe same issue10:33
@HeikoSlisitsyn: let me flip the argument order10:33
@HeikoSthat might help, what you reckon?10:33
lisitsynnot sure10:33
lisitsynI think it is about typemaps10:33
lisitsynsome flags or options of them10:33
@HeikoSI thought it was the const & at first10:33
@HeikoSbut it didnt help changing that10:33
lisitsynnono10:34
lisitsynit is not const :(10:34
lisitsyntried that as wel10:34
@HeikoSlisitsyn: check 30416810:34
@HeikoSthats how it is done in the ctor10:35
lisitsynHeikoS: exactly10:35
lisitsynthat's the point10:35
lisitsynHeikoS: from what wiking says if you don't overload it works10:35
lisitsyn:)10:35
lisitsynHeikoS: we need a toy example to ask swig guys maybe10:36
@HeikoSbtw it is not just python10:36
@HeikoSjava as well10:36
@wikingHeikoS, it's swig10:37
@wiking:)10:37
@HeikoSlisitsyn: you ever read this? http://www.swig.org/Doc1.3/Typemaps.html#Typemaps_overloading10:38
@wikingHeikoS, https://github.com/shogun-toolbox/shogun/commit/a4c84ee839dce1a25d5de3277ec5e3e81816601710:47
@wikingin R it was a missing pieace10:47
@wiking*piece10:48
@wikingand actually it shoudl be10:48
@wikingis.numeric || is.bool10:48
@wikingas we support bool vectors/matricies10:48
@sukey[https://github.com/shogun-toolbox/shogun] Issue https://github.com/shogun-toolbox/shogun/issues/4157 opened by bmurauer10:48
@sukey[https://github.com/shogun-toolbox/shogun] Issue https://github.com/shogun-toolbox/shogun/issues/415710:49
@sukey[https://github.com/shogun-toolbox/shogun] Issue https://github.com/shogun-toolbox/shogun/issues/415710:49
@HeikoSah cool10:51
@HeikoSwiking: when are the R meta examples coming alive? :D10:51
@wikingHeikoS, typemapping problems10:52
@wikingwe still have 4 failing things10:52
@wikingand nobody got back to me10:52
@HeikoSi see10:52
@wikingabout what to do10:52
@wiking;)10:52
@HeikoSlisitsyn: so changing argument order does not help :(10:52
@HeikoSthat is swig peeps?10:52
@wikingHeikoS, so 2 things10:53
@HeikoSlisitsyn: maybe it has to do with the fact that SGMatrix is templated10:54
@HeikoSand in the ctor of RealFeatures, the whole class is templated10:54
@HeikoSbut in put, there is no class template10:54
@HeikoSmaybe I need to put %template somewhere10:54
@wikingHeikoS, https://travis-ci.org/shogun-toolbox/shogun/jobs/330732721#L398410:55
@wikingHeikoS, RealFeatures is not10:55
@wikingtypemaped10:55
@wikingnote10:55
@wikingHeikoS, but you dont need to put anything10:56
@wikingfor SGM10:56
@HeikoSyeah10:56
@HeikoStrue10:56
@wikingif you wanna touch that10:56
@wikingyou need to go into actual typemap.i10:56
@wikingbut i guess10:56
@wikingthis arrices10:56
@HeikoSswig warns if overloading shadows methods no?10:56
@HeikoSIll watch out for that10:56
@HeikoSwiking: i get more and more gsoc related emails10:57
@wikingnot me :D10:57
@HeikoSI have put "do not contact devs directly" first thing on the wiki10:57
@HeikoSI mean COME ONE10:57
@HeikoSthese guys :D10:57
@HeikoSentrance task is like step1-step 1010:57
@wikingHeikoS, you use latest develop?10:58
@HeikoSand then they ask, what should I do?10:58
@HeikoSwiking: of swig?10:58
@wikingno10:58
@wikingof shogun10:58
@wikingor you hav esome local hacks?10:58
@HeikoSyes kinda10:58
@HeikoSthere is some stuff10:58
@HeikoSnot too much, why?10:58
@wikingbut not for put("matrix", matrix)10:58
@HeikoSah10:59
@HeikoSyeah I have local changes10:59
@HeikoSnot in develop10:59
@wikingbut that's not related to the put10:59
@wikingin this case11:00
@wikingbut yeah while it compiles11:00
@wikingcan u answer me what to do with the metaexamples11:00
@wikingfor obtainfor11:00
@wiking?11:00
@HeikoSlisitsyn, wiking swig doesnt moan about shadowing11:00
@HeikoSobtainfor?11:01
@wikingHeikoS, so every now and then11:01
@wikingwhen we need some specific typecast in modular11:01
@wikingwe introduced the obtain_from_*11:01
@wikingthat's true for Distributions11:01
@wikingfor Gaussian11:01
@wikingfor CrossValidationResults11:01
@wikingetc11:01
@HeikoSobtain_from_generic11:01
@HeikoSyes11:01
@HeikoSspecialise11:01
@wikingbut this is sporadic11:01
@HeikoSbase class pointer11:01
@wikingmeaning it's only there11:01
@wikingwhen one needed such thing11:01
@HeikoSthat is for interfaces yes11:01
@HeikoSshould be as11:02
@HeikoSasDistribution11:02
@wikingthat's the question11:02
@HeikoSor even worse11:02
@HeikoSas("Distribution")11:02
@wikingthat now i moved everything11:02
@wiking'everything'11:02
@wiking.as<>11:02
@wikingto SGObj11:02
@wikingso now you can have in c++ anywhere as11:02
@HeikoSmmmh11:02
@HeikoSnot sure we want all of that everywhere11:02
@HeikoSonly where it makes sense11:02
@HeikoSlike11:02
@HeikoSspecialise a kernel to subclass11:02
@HeikoSbut specialise an sgobject to kernel, why would one want that?11:03
@wikingyeah i mean11:03
@wikingthis is accessible11:03
@wikinganywhere :)11:03
@wikingthat doesn't mean that you have to use it11:03
@wiking:)11:03
@HeikoSsure and you get an error if it cannot be done11:03
@HeikoSI think this is ok11:03
@HeikoSinterfaces are like this11:03
@wikingbut i mean11:03
@wikingwait11:03
@wiking:D11:03
@wikingwe might misunderstand each other11:03
@HeikoSwe can thin that out maybe11:03
@HeikoSok :)11:03
@wikingso atm .as<> is templated11:04
@wikingso if you have11:04
@wikingCGaussian11:04
@wikingand you call11:04
@wiking.as11:04
@wikingthat still means only11:04
@wikingi mean you still need to give11:04
@wikinga param11:04
@wikingCGaussian.as<Type>()11:04
@wikingso it's not that .as is reflected on the class11:04
@wikingon which you call it11:04
@HeikoSyes, like best_kernel.asGaussianKernel()11:05
@HeikoSwhich might or might not work11:05
@wikingwell11:05
@wikingnow this is the thing11:05
@HeikoSactually wait11:05
@wikingif we want to has as[WhateverType]11:05
@wikingwe need to spellit out11:05
@HeikoSso the thing is11:05
@wikingfor swig11:06
-!- travis-ci [~travis-ci@ec2-54-145-239-245.compute-1.amazonaws.com] has joined #shogun11:06
travis-ciit's Viktor Gal'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/33839706311:06
-!- travis-ci [~travis-ci@ec2-54-145-239-245.compute-1.amazonaws.com] has left #shogun []11:06
@HeikoSas or obtain_from_generic will not be needed anymore in the future11:06
@HeikoSsince we use tags11:06
@HeikoSno need to specialise11:06
@HeikoSthis is c++ only11:06
@wikingwhat do you do with CrossValResult?11:06
@HeikoSbest_kernel.get("gaussian_parameter")11:06
@HeikoSyou get the kernel interface11:06
@HeikoSbut you don't need the methods specific to gaussian kernel11:06
@HeikoSyou use tags and the generic kernel interface covers all he rest11:07
@HeikoSthe rest11:07
@wikinglemme copypaste11:07
@wikingso we are on the same page11:07
@HeikoSok11:07
@wikingresult = cross_validation.evaluate()11:08
@wikingresult = CrossValidationResult.obtain_from_generic(result)11:08
@wikingprint('kNN mean accuracy in a total of %d runs is %.4f.' % (num_runs, result.get_mean()))11:08
@wikinghttp://shogun.ml/notebook/latest/LMNN.html11:08
@wikingy_pred = FactorGraphObservation.obtain_from_generic(labels_test_pr.get_label(i)).get_data()11:09
@wikinghttp://shogun.ml/notebook/latest/Binary_Denoising.html11:09
@HeikoSresult.get("mean")11:09
@HeikoSlabels_test.get("labels")[i]11:09
@HeikoSin these lines11:09
@wikinghttp://shogun.ml/examples/latest/examples/converter/ica_fast.html11:09
@HeikoSlisitsyn: ^11:10
@HeikoSthere is probably catches11:11
@wikingconverted.get("matrix")11:11
@wiking?11:11
@HeikoSbut I think it should already be possible to replace a few of those things with tag based11:11
@HeikoSyeah11:11
@wikingok so then no need to expose this into swig11:12
@wikingi mean i thought to expose it11:12
@wikingfor 'base' classes11:12
@HeikoSI think there will be some of those "as" things, as we discussed on hackathon, see the notes in the wiki11:13
@HeikoSbut definitely not for all classes11:13
@HeikoSbut in fact, I don't see the need for converting SGObject to Kernel, or similar11:13
@HeikoSso I think for now, no need to do that in swig11:13
@wikingok what do we do11:14
@HeikoSbut there is some work needed to replace all the obtain_from-generic with get11:14
@wikingwith the examples? :)11:14
@HeikoSthe notebooks you mean?11:14
@wikingyes11:14
@wikingi mean everything11:14
@HeikoSentrance task11:14
@HeikoS"get rid of obtain_from_generic" everywhere11:14
@HeikoSand have an example (the x-validation thing is good imo)11:14
@HeikoStags are there, so that can be done now more or less11:15
@HeikoSI think this is a good entrance task in fact, especially if there is an example. Shows many things about shogun internals for students11:15
@wikingok so i'll then just mark all the obtain_from deprecated11:15
@wikingand then i'll merge this11:15
@wikingHeikoS, any objections about the error msg?11:16
@HeikoScan you share the link again?11:16
@wikinglol11:16
@HeikoSsry too many things going on :D11:16
@wikinghttps://github.com/shogun-toolbox/shogun/commit/45534645e67370b99b1b03667e3e617b6764a17511:16
@HeikoScommented11:18
@wikingk i will introduce back those obtain froms11:19
@wikingso that the examples dont break11:19
@HeikoS+111:20
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/2fb90abee41e29c6d01892f3df09a7c241ba88b8 by vigsterkr11:33
@HeikoSlisitsyn, wiking https://github.com/swig/swig/issues/119311:35
@HeikoSlet me know whether this makes sense as a description11:35
lisitsynHeikoS: yeah lets see11:37
@HeikoSnot too minimal?11:37
@HeikoSlisitsyn: I am now actually trying a dummy method CSGObject::test(SGMatrix<double> m) to see what happens there11:37
lisitsynHeikoS: you might come up with non-shogun example11:38
lisitsynwhich is object + two functions + dummy sgmatrix that compiles via swig11:38
@HeikoSlisitsyn: did you try hiding the other put?11:38
@HeikoSfrom swig?11:38
lisitsynno11:38
lisitsynHeikoS: good idea11:38
lisitsynif you hide others and it works11:38
lisitsynthen it is obviously some option or bug in swig11:38
@HeikoScool11:40
@HeikoSupdated11:41
@HeikoSthe issue11:41
@HeikoSok trying will let you know how that goes11:42
@wikingHeikoS, which class you .put?11:43
@wikingbut yeah nevermind11:43
@wikingmanaged to get it break locally11:44
@wikingoik i gotta go11:45
@wikingHeikoS, is the feature branch that you wanna merge with th epr11:45
@wikinghas the all the stuff for reproducability?11:45
@wikingi.e.11:45
@wiking  Possible C/C++ prototypes are:11:46
@wiking    shogun::CSGObject::put< std::string >(Tag< std::string > const &,std::string const &)11:46
@wiking    shogun::CSGObject::put< std::string,void >(std::string const &,std::string const &)11:46
@wiking    shogun::CSGObject::put< float64_t >(Tag< double > const &,double const &)11:46
@wiking    shogun::CSGObject::put< float64_t,void >(std::string const &,double const &)11:46
@wiking    shogun::CSGObject::put< int64_t >(Tag< long > const &,long const &)11:46
@wiking    shogun::CSGObject::put< int64_t,void >(std::string const &,long const &)11:46
@wiking    shogun::CSGObject::put< CSGObject * >(Tag< shogun::CSGObject * > const &,shogun::CSGObject *const &)11:46
@wiking    shogun::CSGObject::put< CSGObject *,void >(std::string const &,shogun::CSGObject *const &)11:46
@wikingso i dont have the proto for SGM11:46
@wikingas you see11:46
@wikingthis is develop11:46
@HeikoSno11:56
@HeikoSgive me a few hrs and Ill merge with the rest I need11:57
@HeikoSlisitsyn: didnt help12:04
@HeikoSlisitsyn: aha12:05
@HeikoSmore information12:05
@HeikoSvoid test(SGMatrix<float64_t> m);12:05
@HeikoSfeatures.test(matrix)12:05
@HeikoSdoesnt work12:05
@HeikoSsame thing: reinterpret_cast rather than typemap usage12:07
@HeikoSthere is no overloadig12:07
@HeikoScould it be that SGMatrix is forward declared is causing this?12:08
lisitsynHeikoS: did hiding fix that?12:28
@HeikoSlisitsyn: nope12:28
lisitsynuhm12:28
@HeikoSlisitsyn: but in fact I think the problem is sitting somewhere else12:28
@HeikoSlisitsyn: I defined a new method12:28
@HeikoSvoid test(SGMatrix<float64_t> m);12:28
@HeikoSand that also doesnt work12:28
@HeikoSI just checked, I actually don't understand where SGMatrix is defined in SGObject.h12:29
@HeikoSjust tried forward declaring it, but no help12:29
@HeikoSnow trying to include the header12:29
@HeikoSlisitsyn: any ideas?12:29
lisitsynHeikoS: AH!12:29
lisitsynforward declaring?12:29
lisitsynhow?12:29
@HeikoSI actually dont even understand how it compiled12:30
@HeikoSas SGMatrix is not defined12:30
lisitsynI mean12:30
lisitsynyeah12:30
@wikingHeikoS, what i mean is that if you could just give me anything12:30
lisitsyn:)12:30
@wikingi could help out12:30
lisitsyntemplate12:30
@HeikoSwiking: you can merge the PR actually12:30
lisitsynnot sure template forward declaration12:30
@HeikoStests passed12:30
lisitsynworks this way12:30
@HeikoSshall I?12:30
@HeikoSlisitsyn: any idea why it compiles? :D12:30
@wikinghttps://travis-ci.org/shogun-toolbox/shogun/jobs/338429405#L178912:30
lisitsynHeikoS: what about trying to include sgmatrix instead of fwd?12:31
@HeikoSI can try explicitly defining SGMatrix<float64_t>12:31
@wikingargh for swig12:31
@HeikoSjust doing that12:31
@wikingHeikoS, so then your branch is having all the stuff12:31
@wikingbecause i can cherry that12:31
@wikinginto my local one12:31
@HeikoSmerge it12:31
@HeikoSit is ok12:31
@HeikoSit is clean12:31
@wikinglisitsyn, ideas how to do [[deprecated]] ?12:31
@HeikoSthe stuff I am doing now is on top12:31
shogitter(ansh103) Wiking.  If I want to solve some issues then that  would require me building from source, right? You said yesterday that I don't need to do that. Any specifics?12:32
@wiking#ifndef SWIG_***12:32
@wikingis argh12:32
lisitsynwiking: deprecate what?12:32
lisitsyn:)12:32
@HeikoSlisitsyn: but including SGmatrix.h in SGObject is that really a good idea?12:32
@wikinglisitsyn, wanna deprecate obtain_from12:32
lisitsynHeikoS: you have to I think12:32
lisitsyneither in .h or .cpp12:32
@HeikoSlisitsyn: in cpp it is12:32
@wikingansh103 if you want to solve entrance task, then probably you'll have to compile from source... but there are cases that it does not require you to compile from src12:32
lisitsynHeikoS: lets just see if it fixes swig and then decide12:33
lisitsyn:)12:33
@HeikoSlisitsyn: ok12:33
@HeikoSwill try the explicit forward declaration after12:33
@wikingHeikoS, "I think I prefer static. Putting CSGobjects on stack always caused problems when I tried it12:33
@wiking"?12:33
@HeikoSwiking: vague memories of problems arising from that12:33
@HeikoSbut hey12:33
@HeikoSI probably shouldnt have written that :D12:33
@HeikoSstatic is cleaner imo as no object is created12:34
@HeikoSand the name really belongs to class, not instance12:34
@wikingi dont understand12:34
@wiking?12:34
@wikingwhat12:34
@wikingi mean the problem is if i click on the github12:34
shogitter(ansh103) Okay wiking. Thanks.12:34
@wikingthen i dont see things anymore12:34
@wikingas it has been force pushed12:34
@wikingHeikoS, aaah now i see12:35
@wikingthat thing is gone :)12:35
@wikingso it's obsolete12:35
@HeikoSok :)12:36
@HeikoSlisitsyn: I am sure it has to do with the fact that SGMatrix is templated12:38
@HeikoSbut I fix the template argument here12:38
lisitsynHeikoS: probablemente12:39
@HeikoSlisitsyn: what about templating the SGMatrix parameter?12:39
lisitsynHeikoS: templating what?12:39
lisitsynhow?12:39
@HeikoSI mean12:39
@HeikoStemplate the method12:39
@HeikoSbut put the T into the SGmatrix12:39
@HeikoSnot as the argument itself12:40
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4158 opened by sorig12:40
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4154 merged by karlnapf12:41
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/df639840dea92e23d5fb1c1e28591916fb11abef by karlnapf12:41
@wikingbtw i wonder why this never been used attribute12:41
@wikinghttps://github.com/swig/swig/blob/master/Lib/typemaps/attribute.swg12:41
@wikingand wonder why this isn't at all documented12:43
@HeikoShahaha12:44
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4158 synchronized by sorig12:44
@wikingbut i mean it's a good feature12:45
@HeikoSlisitsyn: next try:12:46
@HeikoStemplate<class T>12:46
@HeikoSvoid CSGObject::test(SGMatrix<T> m)12:46
lisitsynuhmm how12:47
@HeikoSlisitsyn: !!!12:47
lisitsyndoes that help12:47
lisitsynque paso12:47
@HeikoSthe typemap is called like this:12:47
@HeikoSmatrix_from_numpy<float64_t>12:47
lisitsynif you do what?12:47
@HeikoSlike in the ctor12:47
@HeikoSso maybe swig only matches templated SGMatrix12:48
lisitsynah12:48
lisitsynahh12:48
lisitsynuh12:48
@wikingswig can only match instantiated templates12:48
@wikingHeikoS, do you list all the SGM<T>s12:48
@wikingin your .i?12:49
@HeikoSdoes it need to be listed in the .i12:49
@HeikoSah getting closer12:49
@HeikoSwiking: so I actually want everything to be explicit for now12:49
@wikingyou need to declare it12:49
@HeikoSaha12:49
@wikingif you dont12:49
@HeikoSlemme check12:49
@wikingit as if it doesn't exist12:49
@wikingfor swig12:49
@wikingi mean see for typemap itself12:50
@wikingthere's a macro12:50
@wikingfor both sgv/m12:50
@wikingand then they are all called12:50
@wikingTYPEMAP_IN_SGMATRIX(uint8_t,       NPY_UINT8)12:50
@wikingetc12:50
@HeikoSsure12:51
@HeikoSbut I mean12:51
@wikingyou do the smae for the put?12:51
@HeikoSwhy doesnt it match if I have an explicit thing in an argument12:51
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has joined #shogun12:51
travis-ciit's Viktor Gal'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/33842939512:51
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has left #shogun []12:51
@wikingdo you have12:51
@HeikoSwhich file?12:51
@wiking,put(stdstring, SGMatrix<float64_t>) ...12:51
@wikingetc12:51
@wikingin SGBase.i12:51
@wikingi guess12:52
@wikingbut i'm just pulling12:52
@HeikoSnope I dont12:52
@HeikoSthats probably it12:52
@wikingoh12:53
@wikingso you removed12:53
@wikingbecause that used to be in SGBase.i12:53
@HeikoSlike this12:53
@HeikoS    %template(append_element_float) CDynamicObjectArray::append_element<float32_t, float32_t>;12:53
@wikingyou need to do a sort of -SUPPORT_TAG(String, string, std::string)12:53
@wikingi mean12:53
@wikingtemplate can have the very same argu12:53
@wikingliek12:53
@wiking%template(put) ...12:53
@wikingbut you need to spell it out12:53
@wikingall the types12:53
@wikingyou ever want to support12:54
@HeikoSeven if the method is not templated?12:54
@wikingbut the argument is no?12:54
@HeikoSvoid test(SGMatrix<float64_t> m)12:54
@wikingi mean it's as if12:54
@wikingyou ghave12:54
@wikingtest(std::vector<float> m)12:54
@wikingright?12:54
@HeikoSsure12:55
@wikingHeikoS, https://github.com/swig/swig/issues/65212:55
@wikingbtw12:55
@wikingit's not very much the same12:55
@wikingbut pretty similar12:55
@wikinguntil yo udont have12:55
@wiking%template(StdVectorA) std::vector<A>;12:55
@wikingit's as if it doesn't exist for swig12:55
@wikingstd::vector<A>12:55
@HeikoSI see12:56
@HeikoScool let me try12:56
@wikingsee the reason12:58
@wikingwhy we have12:58
@wiking    %template(IntStdVector) vector<int32_t>;12:58
@wiking    %template(DoubleStdVector) vector<float64_t>;12:58
@wiking    %template(StringStdVector) vector<string>;12:58
@wikingif you dont do that12:58
@wikingyou cannot hav ethe typemap of swig12:58
@wikingfor those types12:58
@HeikoSso just to be sure12:59
@HeikoSthis is also true for void test(SGMatrix<float64_t> m)12:59
@HeikoS?12:59
@HeikoSno template, all fixed13:00
@wikingbut you use13:01
@wikinga templated class13:01
@wikingright? :)13:01
@wikingi mean i understand you spell it out there13:01
@wikingbut still13:01
@wikingyou use a templated class in the argu13:01
@wikingHeikoS, see for example registered_parameters()13:01
@wikingit returns an std::vector<std::string>13:02
@HeikoSno13:02
@wikingif  %template(StringStdVector) vector<string>;13:02
@wikingwould be missing13:02
@HeikoSCSGObject::put(SGMatrix<float64_t>)13:02
@wikingthat thing wouldnt work13:02
@HeikoSah you mean SGMatrix is templated13:02
@wikingyes13:02
@HeikoSkk13:02
@wikingi mean SGMatrix is a template13:02
@wikingthat needs to be spelled out for swig13:02
@HeikoS%template(put) CSGobject::put<std::string, float64_t>;13:03
@HeikoSlike this I guess?13:03
@HeikoSah no13:03
@HeikoSyeah how does the line look?13:03
@wikingHeikoS, http://www.swig.org/Doc3.0/SWIGPlus.html#SWIGPlus_nn3013:03
@HeikoS%template(put) CSGobject::put<std::string, SGMatrix<float64_t> >;13:03
@HeikoSlike that?13:03
@wikingcheck this out13:04
@wikingbut lemme check what you wrote13:04
@HeikoSso it is void SGObject::test(SGMatrix<float64_t> m);13:05
@wikingHeikoS, lemme test it for u13:07
@wikingfinally i have your error13:07
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has joined #shogun13:14
travis-ciit's Viktor Gal'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/33842939513:14
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has left #shogun []13:14
lisitsynHeikoS: wiking: did you guys know13:22
lisitsynthat new T and new T() are different13:22
lisitsyn:D :D13:22
@wikinglisitsyn, welcome!13:22
lisitsyntrollface13:22
@wikingyou didn't know13:22
@wikingtoday is a sad day13:22
@wiking:(13:22
@wikinglisitsyn, didn't know!!!13:22
lisitsynand how do you think they are different?13:22
@wikingD:13:22
lisitsyn:)13:22
@wikinghave you seen the on top of that13:23
@wikingwhat they did in c++17?13:23
@wiking:D13:23
@wikingfor new13:23
lisitsyn?13:23
@wikingthen you'll get argh13:23
@wiking:D13:23
@wikinghint =align13:23
lisitsynalignas?13:23
@wikingyes13:23
@wikingHeikoS, so just for the future reference13:24
@wikingit helps tremendous13:24
@wikingif you add stuff into _wrap_SGObject_put13:25
@wikingor gdb it13:25
@wiking:)13:25
@HeikoSstill doenst use the typemap :(13:26
@HeikoSreinterpret cast13:27
@wikingHeikoS, you wanna look at my tmate?13:27
@HeikoS?13:28
@wikinghttps://tmate.io/13:28
@wikingHeikoS, once ready come here ssh lYlsLYa88vphLIATcUjeLRgIa@fk2.tmate.io13:29
@wikingjust a sec i have a standup13:31
@HeikoSI mean it is not really about realising where the execution goes, it is more that the generated code doesnt call the typemap13:31
@HeikoSbut I am watching13:32
@wikingback13:32
@wikingi know13:32
@wikingas you can see13:33
@wikingit's an ndarray13:33
@HeikoSand so?13:34
@wikingits not actual array13:34
@wikingright?13:34
@wikingi mean if then this would map to SGNDarray13:34
@HeikoSI think this is more about the generated code13:35
@HeikoSand the fact that "from_numpy_*" is not in there13:35
@HeikoSrather a cast13:35
@HeikoSdo we have an untemplated class somewhere that has templated member methods that are used from swig?13:35
@wikingmmm where's the macros defined13:36
@wikingfor numpy13:36
@wikingas i think13:37
@wikingthat thing is going to fail13:38
@wikingis_pyvector13:38
@wikingwrong13:38
@HeikoSagain i dont think the problem is at runtime of that generated code but what code is generated13:39
@HeikoScheck the constructor for RealFeatures e.g.13:39
@HeikoSthere you see how it should look like13:39
@wikingyes13:39
@wikingbut this how you can figure out13:39
@wikingwher eit is generated the wrong way13:39
@wikingotherwise its just fishing in the sea13:40
@wikingwith a needle13:40
@wikingi.e. i did the same for13:40
@wikingdynobjarray13:40
@HeikoSi just checked this actually13:40
@HeikoSthere you have names like append_float13:40
@HeikoSetc13:40
@HeikoSill try that13:41
@HeikoSmmh no luck13:42
@wikingok13:43
@wikingso there13:43
@wikinghave u seen it?13:43
@HeikoSyes13:43
@HeikoStrying to reproduce this13:43
@wikingHeikoS, i mean the thing is that tha tis a not typemappable13:43
@wikinginstance13:43
@wiking:)13:43
@HeikoSI have changed to template13:44
@HeikoStemplate <class T>13:44
@HeikoSvoid test(SGMatrix<T> m);13:44
@HeikoSthats what I am trying right now13:44
@HeikoSit still doesnt wanna map the matrix13:49
@HeikoSusing the above definition13:49
@HeikoSand the %template13:49
@HeikoSmethod exists in python, but same error13:49
@wikinghahahahah13:51
@wikingshouldn't u = sg.RealFeatures(x) work?13:51
@HeikoSit does13:51
@HeikoSbut that class itself is templated13:51
@HeikoSwhat I really dont understand is why it works for dynobjarray13:52
@HeikoSand not here13:52
@wikingno13:52
@wikingso here13:52
@wikingif you do13:53
@wikingnp.array([1,2], dtype...)13:53
@wikingthat thing of course doesn't work either with RealFeatures13:53
@wikingdo you have a class that has vectors as input?13:53
@wikingi mean csvm?13:53
@wikingor which class has a member13:53
@wikingof SGVector<float64_t>13:53
@wiking?13:53
@HeikoSI do13:54
@HeikoSnp.zeros( (1,2), dtype=...)13:55
@HeikoSand it works with the ctor13:55
@HeikoSand the code generated for the ctor is correct13:55
@HeikoScalling the typemap13:55
@wikingHeikoS, yeah but that's a matrix right?13:55
@wikingand you have the explicit13:55
@wikingthing for sgMatrix13:56
@wikingatm13:56
@wikingin your code13:56
@HeikoSI tried both explicit13:56
@wikingonly for SGVect13:56
@HeikoSand templated13:56
@HeikoSah13:56
@HeikoSsee the method i pased above13:56
@HeikoSvoid test(SGMatrix<float64_t> m);13:56
@HeikoSor the same thing templated13:56
@HeikoSbut yes it is matrix13:56
@HeikoSthe PR that was merged doesnt have matrix13:56
@wikingthat's why i'm asking for an SGVector13:57
@wikingas otherwise it wont work obviously13:57
@HeikoSas it was about scalars (the other things are just to make shogun compile due to undefined references in put=)13:57
@HeikoSit seems like swig has problems when function arguments are templated13:58
@HeikoSrather than templated functions contain parameters of type T13:58
@HeikoSi.e.13:58
@HeikoStest<T>(T val)13:58
@HeikoSvs13:58
@wikingwhy does it blow up13:58
@HeikoStest<T>(type<T> val)13:58
@wikingif i add SGOBJET_PUT_DEFINE(SGMatrix<float64_T>)13:58
@wiking?13:58
@HeikoSdont know13:59
@wikingi mean it works for you?13:59
@wikinglocally?13:59
@HeikoSnot sure what you mean14:00
@HeikoSI just had one more idea14:00
@wikingtook your line14:01
@wikingSGOBJET_PUT_DEFINE14:01
@wikingin SGObject.cpp14:01
@wikingand did the same14:01
@wikingbut for SGMatrix<float64_t>14:01
@wikingbecause only sgvector and sgobject is there atm14:01
@wiking(develop)14:01
@wikingas soon as i did that14:01
@wikingthe whole thing blew up14:01
@HeikoSmissing \14:01
@HeikoS?14:01
@HeikoSI have that line and it works14:02
@HeikoSah14:02
@HeikoSyou need to declare it14:02
@wikingdf639840dea92e23d5fb1c1e28591916fb11abef14:02
@wikingis head14:02
@HeikoSthese methods are not templated14:02
@HeikoSSGOBJECT_PUT_DECLARE(SGMatrix<float64_t>)14:02
@HeikoSin header14:02
@HeikoSthey cannot be templated14:03
@HeikoSotherwise CSGObject* complications arise due to template matching :D14:03
@wikingwho's template matching?14:03
@wikingi mean you could just use traits14:03
@wikingto not to have that14:03
@wikingmatching problem14:04
@wikingis_base_of<SGObject>14:04
@wikingor. not14:04
@wikingand then the right template will be matched14:04
@wikingsee dynobjarray14:04
@HeikoSthere was another issue14:04
@HeikoShas to do with tags14:04
@HeikoSand stuff14:05
@HeikoSwe can make it nicer later14:05
@HeikoSfirst it needs to work14:05
@HeikoSfor now you need to also declare the thing14:05
@wikingdeclare what?14:05
@wikingless cryptic plz14:05
@HeikoScheck the  header14:05
@wikingi did14:05
@HeikoSif you add your matrix method in the .cpp14:05
@HeikoSit also needs to be in header14:06
@HeikoSif you did, then i dont understand why it doesnt work, it does for me14:06
@wikingah but ifits in header14:06
@wikingas well as in the impl14:06
@wikingwhy don tu just have everything in header?14:06
@HeikoShistorical reasons14:07
@wikingof?14:07
@wikingi really dont get it :)14:07
@wikingif you need to spell it out in the header14:07
@wikingthen just spell out everything14:07
@wikingespecially that it's a 3 liner14:08
@wikingright?14:08
@wikingi mean the implementation14:08
@HeikoSI dont think it matters why that is, but there is a reason that has to do with how this came about. We can easily change it, but it doesnt affect the current problem14:09
@wikingi mean im not saying that it effects the current problem14:09
@wikingit effects of working with it14:09
@wikingi've just tried patching it so that i can get SGMatrix14:09
@wikingand as a UX dev experience14:09
@wikingthis is just not the best14:09
@wikingand i wonder why couldn't we move this all into .h14:09
@wiking?14:09
@wikingi'm not saying that this is going to solve your problem14:10
@wikingbut it is actually gonna solve A problem that i was just facing now14:10
@HeikoSit can be moved yes14:10
@HeikoSunless we template this method at some point14:10
@HeikoSthen it would be better if it stayed in cpp14:10
@HeikoSso for now, i woudnt touch that tbh14:11
@wiking:)14:12
@wikingthis is so funny14:12
@HeikoSI woudl reccomend not using the put thing to test SGMatrix14:13
@HeikoStoo many templated14:13
@HeikoSjust a simple dummy method is fine14:13
@HeikoSI give up now14:13
@HeikoShave tried all I could think of14:13
@HeikoScouldnt make a simple CSGobject::test(SGMatrix<>) match the typemaps14:13
@HeikoSboth templated and untemplated14:13
@HeikoSno idea14:14
@HeikoSit is probably something silly14:14
@HeikoSwiking: so you dont need to touch any of that code to reproduce the error14:14
@HeikoSjust add your ::test(SGMatrix) method14:14
@HeikoSone line in header14:14
@wikingHeikoS, already did14:20
@wikingand that was my conclusion above14:21
@HeikoS?14:21
@wikingi.e. i've already added SGMatrix14:22
@wikinginto develop14:22
@wikingnow that i know that there are 2 places to be added14:22
@wikingand my conclusion about this was written above :)14:22
@HeikoSlol I am lost :)14:23
@HeikoSbut anyways14:23
@wikingi'm just debvugging now14:23
@HeikoScool, let me know how it goes14:23
@HeikoSI need a break from this thing now14:23
@HeikoSwill check back later14:24
@wikinglisitsyn, putty15:06
lisitsyneh?15:07
@wikinglisitsyn, so15:07
lisitsynyas15:07
@wikingapparently there's not typemapping kicked in yet in SGBase.i15:07
@wiking:D15:07
@wikingthis is like dynobj array15:07
@wikingtypemap15:07
@wikingtypemap15:08
@wikingshit15:08
lisitsynI thought about order of stuff15:08
@wikinghate vim15:08
lisitsynvim is the best editor15:08
lisitsyn:)15:08
@wiking%template(putMatrix) shogun::CSGObject::put<SGMatrix<float64_t>, void>;15:08
@wikingit's tmux + iterm15:08
@wikingand the plugni15:08
@wikingmade everything clunky to copy15:08
@wikingso anyways15:08
@wikingsee that?15:08
@wikingthat is exactly what DynObjArray is about right?15:08
@wikingso and the generated code is differnet15:10
@wikingwhere in case 1) there's nicely the if(!matrix_from_numpy())15:10
@wikingthat you want15:10
@wikingcase 2) it just does a silly reinterpret casting15:11
@wikinglisitsyn, yes15:20
@wikingthat was it15:20
@wiking:))))15:20
@wikingHeikoS, ^15:20
@wikingHeikoS, u can close the github issue for poor swig ppl15:22
@wikingHeikoS, https://imgur.com/a/JhMQ415:27
@wikinglisitsyn, when u have a minture15:33
@wiking*minute15:33
@wikingping me because there's a minor issue :))))15:33
@wikingand btw how do you guys wanna solve .get("")16:02
@wikingas that cannot be overloaded16:02
@wikingreturn type is not polymorphic16:02
@wikingso atm i dont see any other way but getFloat getVector16:02
@wiking(with the current interfacE)16:03
@wikingHeikoS, so i dropped the macro magic16:28
@wikingand used lisitsyn standard put template16:28
@wikingthere the polymorphism work ... almostish16:28
@wikingthere's a problem with the constRef16:29
@wikingbut that could be solved many ways16:29
lisitsynwiking: what helped in the end?16:33
@wikingall good16:33
@wikingalmost16:33
@wikingso16:33
@wikingyou know you do put(..., const T& v)16:33
@wikingnow there's a bit of shito situation16:33
@wikingwith constRef16:33
@wikingbecause actually if you think of it16:34
@wikingit's typemaped16:34
@wikingso that ojjek16:34
@wiking*ojjjeeeektuuum16:34
@wikinghas been just copied/created16:34
@wikingin case of SGV/M16:34
@wikinganyhow16:34
@wikingthat thing does not fly16:34
@wikingwith the current typemaps16:34
@wikingif you do put(str, T v)16:36
@wikingit's all good16:36
@wikingpolymorph16:36
@wikingmicroservice16:36
@wikingwhatever u want16:36
@wikingbut16:36
@wikingnow comes the mic-macz16:36
@wikingget16:36
@wiking:)16:36
@wikingwhat was the vision16:36
@wikingwe have put(..)16:36
@wikingbut we have getType()16:36
@wiking?16:36
@wiking:)16:36
@wikingon the other hand with th eput there could be several ways to solve it16:37
@wiking;P16:37
@wikingbut anyhow that's what it is16:37
@wikinglisitsyn, ah and of course16:37
@wikingthe other issue of the story is16:37
@wikingthe place where you placed the %template declarations in SGBase.i16:38
@wikingbasically the typemaps are not yet kicking in16:38
lisitsynah ok so it can be solved16:38
lisitsynok16:38
lisitsynI thought about that16:38
lisitsynbut tried so many things16:38
lisitsynand gave up16:38
@wikingokok hackmaster16:38
@wiking:)16:38
@wikingtell me what you want16:38
@wikingso i push it then16:38
@wikingwhat do we do with get?16:38
@wikingand if we have getTyped16:39
@wikingthen put ought to be typed16:39
@wikingimo16:39
@wikingbut that's jsut symetricity16:39
lisitsynwiking: no other way but getType16:39
lisitsyn:)16:40
lisitsynwiking: I think we might also have get()16:40
lisitsynbut that returns some wrapper16:40
lisitsynlike here is the parameter16:40
lisitsynyou can print it16:40
@wikingyeah i mean16:40
lisitsynbut if you need the value call the cast16:40
@wikingin case we have ONE specific get16:40
@wikingthen its fine16:40
@wikingotherwise you know that its lalala16:40
lisitsynwhat do you mean?16:40
@wikingHackerObject get("")16:41
@wikingthat works16:41
@wikingof course16:41
@wikingint get(), float get(), SGVector get()16:41
@wiking"nononoooooo you dont love me and i know now"16:41
@wikinghttps://www.youtube.com/watch?v=0mNPKNAQl4c16:42
@wiking?? ????????? ????????16:45
@wikinglisitsyn, what do you wanna do with constnessref?16:46
lisitsynwiking: int get() float get()??16:47
lisitsynhow can that work16:47
@wikinglisitsyn, i mean16:47
@wikingNONONOO16:47
@wikingit does not work16:47
@wiking:)16:47
@wikingyeye man anyhow u get it16:47
@wikingso we need something there16:47
@wikingvoid put(const std::string& name, T const value) throw(ShogunException);16:48
@wikingshould be16:48
@wikingthat's the thingy16:48
@wikinggo nogo?16:48
lisitsynwiking: that's fine16:48
@wikingk16:48
lisitsynconst T&16:48
@wikingyeah i cannot haz16:48
@wikingconst T^16:48
@wiking&16:48
lisitsynok then const T16:48
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has quit [Ping timeout: 248 seconds]16:49
lisitsynconst T const16:49
lisitsynconst const16:49
@wikingnot with SGV/M16:49
@wikingCOOOOONSSSSST16:49
@wikingCOOOOONSSSS?16:49
@wikingt16:49
@wikinganyhow ok16:49
lisitsyncon?t16:49
@wikingi'll push this you guys look16:49
@wikingand decide16:49
lisitsynok have to go to teach some PYTHONZ16:49
@wikingkill it16:49
@wiking:>16:49
lisitsynwiking: from sklearn import16:50
@wiking:>>>.16:50
@wikingmastamustafa!16:50
@wikingand you got a stick on your laptop? :D16:50
@wikingjust to be super ironic16:50
@wikinghipster16:50
lisitsynwiking: shogun? yes16:50
lisitsynthat's ironic but I can't fraud people16:51
lisitsyn:D16:51
@wiking:>16:51
lisitsynteaching them shogun to get into ml is like16:51
lisitsynbitcoin?16:51
@wikingbtw16:52
@wiking throw( ) (deprecated in C++11)16:52
@wikingthrow(typeid, typeid, ...) (deprecated in C++11)(until C++17)16:52
@wikingwe are aware of this16:52
@wikingright/? :))16:52
lisitsynwiking: I had to put it herer16:52
lisitsynto make swig catch it16:52
@wikingswig masta16:53
@wiking!16:53
lisitsynwiking: it does not generate exception catching code by default16:53
@wikinglisitsyn, so tell me16:53
lisitsynthis fixed the thing but idk16:53
@wiking[[deprecated]]16:53
@wiking#ifndef SWIG?16:53
@wikingor wtf/16:53
@wiking:)16:53
@wikingswig doesn't understand attributes16:54
lisitsyndik16:54
lisitsynidk16:54
lisitsyn:)16:54
@wikingdicky dickson16:54
@wiking:)16:54
@wikingok16:54
@wikinglemme push the thing16:54
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has joined #shogun17:02
-!- mode/#shogun [+o HeikoS] by ChanServ17:02
@HeikoSwiking: jo17:03
@HeikoScool so it works for the put?17:03
@HeikoSwiking: could you push the put stuff?17:04
@HeikoSamazing!17:04
@HeikoSfor get, we can have getFloat etc....17:04
@HeikoSpush push push :)17:08
@HeikoSIm cycling to UCL now, talk later17:08
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4158 merged by karlnapf17:08
@sukey[https://github.com/shogun-toolbox/shogun] karlnapf pushed 2 commits:17:08
@sukeyhttps://github.com/shogun-toolbox/shogun/commit/3e3b166bf6335b265473b9260269709dfaeb870f17:08
@sukeyhttps://github.com/shogun-toolbox/shogun/commit/abb0e4a71c5e3e892b3d414a3c1a447dbe66324017:08
-!- wikingrr [~Mutter@178.197.228.136] has joined #shogun17:11
wikingrrSorry17:11
wikingrrHad to leave for a meetup.... :))) totally forgot17:12
-!- wikingrr [~Mutter@178.197.228.136] has quit [Client Quit]17:12
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has quit [Ping timeout: 256 seconds]17:14
-!- HeikoS [~heiko@untrust-out.swc.ucl.ac.uk] has joined #shogun18:12
-!- mode/#shogun [+o HeikoS] by ChanServ18:12
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/971d67d946dc67b2fea0f03bd52603f42e4d0a70 by vigsterkr18:13
@sukey[https://github.com/shogun-toolbox/shogun] New branch typedo created18:13
@wikingHeikoS, ^18:14
@HeikoSwiking: sweet18:14
@HeikoSfeature branch why?18:14
@wikingis it feature?18:15
@wikingit's just a branch18:15
@wikingi get -ff merge it18:15
@wikingjust wanted you guys to take a peep b4 adding to develop18:16
@HeikoSokok18:16
@HeikoSuh18:16
@HeikoSmmmh18:16
@wikingand this will get me a travis as well18:16
@HeikoSI think this will not work with octave18:16
@wikingHeikoS, expand :)18:16
@HeikoSbut will try now18:16
@HeikoSyeah will do18:16
@wikingpython workforme18:16
@wikinghaven't tested anything else18:16
@HeikoSmmmh18:17
@HeikoSwiking: you have a min to discuss?18:17
@wikingHeikoS, giving a talk18:17
@wikingin 218:17
@wiking:D18:17
@wikingbut as soon as i'm done18:17
@HeikoSok good luck :)18:17
@wikinggonna get back to u18:17
@wikingttyl18:17
@HeikoSk18:18
@HeikoSlisitsyn: you around?18:18
@wikingok done18:44
@wikingHeikoS, sorry it was a hack on the table push18:44
@wikinglemmme check18:44
@HeikoSnw18:44
@HeikoSI am just writing some things under the commit18:44
@HeikoSwiking: also make sure to read sergey and mine discussion18:44
@HeikoSwhy we moved away from this kind of approach18:44
@HeikoS(but I am writing it down as well)18:44
@wikingwhich kind of approach/18:45
@wiking?18:45
@wikingusing template?18:45
@wikingi mean mostly that's the diff here18:46
@HeikoSthe thing in your feature branch18:47
@wikingyeah18:47
@wikingthe diff is18:47
@wikingtemplate18:47
@wiking(not talking about octave hack)18:47
@HeikoSwe explicitly made it non template18:47
@HeikoSreason I commented in the commit18:47
@wikingHeikoS, that could both be solved18:48
@wikingby templates18:48
@wikingat least 1) for sure18:48
@HeikoSoctave hack can be done either by %extend, or via libshogun, but that depends on the design q that I also wrote under the commit (and lisitsyn and I decided for the tolerant way)18:48
@wiking2) see the hack18:48
@wikingThis is since "kernel" is registered as CSGObject but since the put here is templated, it is matched against CKernel*. So @lisitsyn and I decided to make it not templated but explicit only for CSGObject*18:49
@wikingthis should be fixed with c++11 features18:49
@wikingi mean we should do the same fix18:49
@wikingin all linalg interfaces btw18:49
@HeikoScool, that would be good18:49
@wikingthat's why you cant do18:50
@HeikoSnot saying it can't be solved18:50
@HeikoSbut that how it currently is doesnt work18:50
@wikinglinalg::(whateverfunction(), whatverotherfunction()...18:50
@wikingjust compiling the interfae18:50
@wikingthe lisitsyn define i added without testing18:51
@wikingbut i had that spelled out18:51
@wikingand worked18:51
@wikingso i presume something there with the template i fsck-ed18:51
@HeikoSdid you try the example?18:51
@wikingi've tried your exmple18:52
@HeikoSor only put("vector", ...)?18:52
@wikingput("vector"18:52
@wikingput("matrix")18:52
@HeikoSI mean a put("kernel", kernel)18:52
@HeikoSfrom ?pp18:52
@wikingswig or cpp?18:52
@HeikoScpp in this case18:52
@HeikoSmeta cpp18:52
@wikingkwargs?18:52
@HeikoSy18:52
@wikingok i'll test18:52
@HeikoScool18:52
@wikingas soon as i'm ready with the fix18:52
@wikingbut with cpp it's std::fwd18:52
@HeikoSif that is fixed with c++11 template magic that would be neat18:52
@wikingi mean it's all about18:53
@wikingnot having the right type18:53
@HeikoSmaybe we can put the conversion into any then18:53
@wikingwhen u put a func there18:53
@wikingok18:53
@HeikoSthat would be cleanest18:53
@wikingfinally have the error18:53
@wikinglemme see why the macro not working18:53
@HeikoSbut let's make it work first, there is always surprises ;)18:53
@wikingnyasgem18:55
@wikingit worked :)18:55
@wikingi blame everything on lisitsyn's macro18:55
@HeikoSlol :D18:58
@wikingah fuck19:01
@wikingof course19:01
@wikinglol19:01
@wikingnobody tells me19:01
@wikingtypename U = void19:01
@wiking:)19:01
@wikingHeikoS, ok i forcepysh19:02
@wikingtesting in the meanwhile19:02
@wikingbut wanna participate at this thing19:02
@wikingif i'm here :)19:03
@HeikoSsure19:03
@HeikoSI am done for today19:03
@HeikoSwill read things now19:03
@HeikoSbut still on hold if you have something19:03
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/07b21305711c952e17184581205377bbd583ed72 by vigsterkr19:03
@wikingi'll test the cpp19:03
@wikingthe stuff is now compiling on hedo19:03
@HeikoSwiking: https://gist.github.com/karlnapf/066862c86fa0be2a84511a2f81b2964a19:04
@HeikoSchange it to this19:04
@HeikoSthe kwargs.sg19:04
@wikingkk19:04
@wikingwill do19:04
@wikingttyl19:04
@HeikoSand running in on travis also is good19:04
@HeikoSttly19:04
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has joined #shogun19:18
travis-ciit's Viktor Gal'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/33860113919:18
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has left #shogun []19:18
@wikingwhy no k = sg.kernel("GaussianKernel", log_width=2.0)19:32
@wiking?19:32
@wiking>>> k = kernel("GaussianKernel")19:34
@wiking>>> svm = kernel_machine("LibSVM")19:34
@wiking>>> svm.put("kernel", k)19:34
@wikingi mean this works, the kwargs does not19:35
@wikingbut thats because of something else19:35
@wiking:)19:35
@wikingsvm.put("kernel", kernel("GaussianKernel"))19:35
@wikingworks as well19:35
@wiking>>> kernel("GaussianKernel", log_width=2.0)19:35
@wikingTraceback (most recent call last):19:35
@wiking  File "<stdin>", line 1, in <module>19:35
@wikingTypeError: kernel() takes no keyword arguments19:35
@wikingi mean are we sure tha tthis works? :)19:36
@wikingok anyhow got the problem with cpp19:40
@wikinglemme check/test19:40
@wikingbut i mean man :) SG_ADD((CSGObject**) &kernel, "kernel", "", MS_AVAILABLE);19:43
@wiking:>>19:43
@wikingand then if you do if(has<T>(_tag.name()))19:44
@wikingbut ok lemme check19:45
@wikingok ruby and python dies for the same reason: 312 - generated_cpp-meta_api-kwargs (OTHER_FAULT)19:46
@wikingso unrelated to swig19:46
@wikingok i can try to do with traits a force upcast, so say if T is is_base_of<SGObject> then do a reinterpret cast for CSGObject*19:48
@wikingthat should solve this :P19:48
@wikingas if i change auto k = kernel("GaussianKernel")19:48
@wikingto CSGobject* k = kernel("GaussianKernel");19:48
@wikingthe thing works fine19:48
@wikingand this is only needed for c++ api19:48
@wikingi.e. we can guard it with ifdef19:49
@HeikoSthe stuff is auto generated19:49
@HeikoSso would like to keep auto there19:49
@HeikoSand either modify the registration19:50
@HeikoSor sort otherwise19:50
@wikingyeah i understand the whoel concept19:51
@wikingbut i mean19:51
@wikingthe problem here is rether19:51
@wiking*rather19:51
@wikingSG_ADD((CSGObject**) &kernel, "kernel", "", MS_AVAILABLE);19:51
@wikingwe agree on this right?19:51
@wikingbecause actually what you say is to the fw is that its and SGO19:51
@wikingand actually you are killing yoruself in a way19:51
@wikingbecause you loose this way the force typing19:52
@wikingi.e. you could put there19:52
@wikingCMachine*19:52
@wikingif you pass it as SGO19:52
@wiking:P19:52
@wikingsee what i mean19:52
@wiking?19:52
@HeikoSyes true19:52
@wikingso the registration sucks19:52
@HeikoSthe registration has to change19:52
@wikingbut19:52
@HeikoSuh19:52
@wikingthis is solveable19:52
@wikingwith traits19:52
@HeikoSbad19:52
@wikingimo19:52
@wikingjust gimme couple of hours19:52
@HeikoScomplications19:52
@wikingto hack it in there19:52
@HeikoSthen we cannot use SG_ADD19:52
@wikingbut imo the registration should be CKernel19:53
@wikingnot SGO19:53
@HeikoSneed to have a sep registration for tags19:53
@HeikoScant reuse SG_ADD19:53
@wikingso that actually we can enforce there the right type19:53
@HeikoSsince that downcasts everytjhing19:53
@wikingyeye19:53
@wikingsure19:53
@wikingi mean this is in middle hack atm19:53
@HeikoSyeah enforcing the type for sgobject is a good thing19:53
@HeikoSwell maybe just make it work for kernel19:53
@HeikoSits easy19:53
@wikingno19:53
@HeikoSjust put a watch_param there19:53
@wikingenforcing type of SGO19:53
@wikingis a bad thing19:53
@wiking:P19:53
@wikingit should be lower derived class19:54
@wikingunless its really needs to be sgo19:54
@HeikoSyeah19:54
@HeikoSregister it as CKernel19:54
@wikingi mean you get it that is fe remove19:54
@wikingsegey's typechecked has19:54
@wikingall woudl work19:54
@HeikoScast it to kernel and all good19:54
@HeikoSrather than sgobject19:54
@HeikoSbut need to remove that SG_ADD and replace with m_paramteters->add ...19:54
@HeikoSand watch_param ...19:54
@wikingok19:55
@wikingso19:55
@wikingjava has some shits19:55
@wikinghttps://travis-ci.org/shogun-toolbox/shogun/jobs/338623705#L218919:55
@wikingbut i guess we are missing an import there19:55
@wikingfor DoubleMatrix19:55
@wikingso can we tick 1)?19:56
@wikingHeikoS, i mean not technically but theoretically19:56
@HeikoSwell once it works from the autogenerated cpp examples19:56
@wikingas we can agree that its actually our fault19:56
@wikingok but you get what i mean no?19:56
@wikingi mean its really just our own falut19:56
@wikingas we enforce 2 different types19:57
@wikingand the compiler just does what you tell it to do19:57
@HeikoSif it works once you change the registration to CKernel*19:57
@HeikoSbut it should19:57
@HeikoSso agree on the theory19:57
@HeikoS :)19:57
@wikingi mean i cannot register19:57
@wikingCKernel with SG_ADD19:58
@wikingor?19:58
@HeikoSno19:58
@HeikoSthats the thing19:58
@HeikoSbut no problemp19:58
@HeikoSreplace19:58
@HeikoSSG_ADD((CSGObject**) &kernel, "kernel", "", MS_AVAILABLE);19:58
@HeikoSby m_parameters-add((CSGObject**) &kernel, "kernel", "")19:58
@HeikoSand throw an additional watch_parameter("kernel", &m_kernel) in there19:58
@HeikoSthink that should do it19:59
@HeikoSah19:59
@HeikoSthat will break some stuff19:59
@HeikoSsigh19:59
@HeikoSmaybe it will work actually19:59
@HeikoStry it :)19:59
@wikingk19:59
@wikinglemme check19:59
@HeikoSi think it should work actually19:59
@HeikoSsyntax might have to be adjusted :)19:59
@HeikoSthis is KernelMachine.cpp::63720:00
@HeikoSwiking: I gotta run, will be back on it tomorrow20:00
@wikingok20:00
@wikingckernel doesn't work20:00
@HeikoSwith tags?20:01
@wikinglemme try tags20:01
@HeikoSah yeah with old parameters it definitely doesnt work20:01
@HeikoSok running, bye20:01
@wiking?20:02
@wiking/home/wiking/shogun/src/shogun/machine/KernelMachine.cpp:639:35: error: 'watch_parameter' was not declared in this scope20:02
@wikinglemem grep20:02
@wikingok it's watch param20:02
@wiking         m_parameters->add((CKernel**) &kernel, "kernel", "");20:03
@wikingno good20:03
@wikingi mean the point is20:03
@wikingthat it should be KERNEL20:03
@wikingnot SGO20:03
@wiking:D20:03
@wikinganyhow let me add the template hack for derived classes20:04
@wikinggotta eat20:05
@wikingi'll do this from home20:05
@wikingttyl20:05
-!- HeikoS [~heiko@untrust-out.swc.ucl.ac.uk] has quit [Ping timeout: 248 seconds]20:06
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has joined #shogun20:44
travis-ciit's Viktor Gal'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/33862369720:44
-!- travis-ci [~travis-ci@ec2-54-204-229-205.compute-1.amazonaws.com] has left #shogun []20:44
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/2f488e4558fe3d84e3babaa670714f3bd35a5803 by vigsterkr23:06
-!- HeikoS [~heiko@host86-129-231-92.range86-129.btcentralplus.com] has joined #shogun23:48
-!- mode/#shogun [+o HeikoS] by ChanServ23:48
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/8aa1737af03c2a42d9311ca46d578a486146ca9a by vigsterkr23:53
--- Log closed Thu Feb 08 00:00:53 2018

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