IRC logs of #shogun for Monday, 2017-06-12

--- Log opened Mon Jun 12 00:00:09 2017
-!- WangWang [uid231047@gateway/web/irccloud.com/x-telvkxydkdcvkefw] has joined #shogun03:53
-!- TingMiao [uid229534@gateway/web/irccloud.com/x-danmtyhslbbczina] has joined #shogun03:57
-!- shogun-buildbot [~shogun-bu@7nn.de] has quit [Quit: buildmaster reconfigured: bot disconnecting]08:15
-!- shogun-buildbot [~shogun-bu@7nn.de] has joined #shogun08:15
@wikingshogun-buildbot: force build --branch=develop 'zesty - libshogun'08:15
shogun-buildbotThe build has been queued, I'll give a shout when it starts08:15
shogun-buildbotbuild #0 forced08:16
shogun-buildbotI'll give a shout when the build finishes08:16
@wikingironstark, just building the first time automatically libshogun on zesty (17.04 ubuntu)08:17
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun08:58
shogun-buildbotHey! build zesty - libshogun #0 is complete: Success [build successful]09:00
shogun-buildbotBuild details are at http://buildbot.shogun-toolbox.org/builders/zesty%20-%20libshogun/builds/009:00
@wikingironstark, it seems shogun builds on ubuntu 17.04 w/o any problems... plz could you tell me again what was the error you were facing?09:01
@wikingmicmn,  hi09:57
micmnhey09:57
@wikingi guess this is still hanging right? https://github.com/shogun-toolbox/shogun/pull/382609:57
micmnyes did you see my update?09:58
@wikingi mean in a sense that we would need some unit tests for the new linalg methods09:58
@wikingor?09:58
micmnyep09:59
@wikingcool09:59
micmnI'm also working on kernelpca09:59
micmnso I'll open a pr09:59
micmnfor the linalg methods needed by both09:59
@wikingok09:59
@wikingi mean the question09:59
@wikingshould i merge this?09:59
micmnnono :p10:00
@wiking:D10:00
@wikingok10:00
micmnI'll remove the linalg ops from that pr10:00
@wikingcool10:00
@wikingsounds like a plan10:00
@wikingplz add some minimum unit tests to it10:00
@wiking :P10:00
micmnof course :D10:00
@wikingcool10:00
micmnbtw kernelpca has a disabled unit test10:01
@wiking:D10:01
@wikingnot surprised :P10:01
micmnso my modified version results are coherent with those of the previous version but...who knows?10:02
@wiking:)10:03
micmni was trying to setup a new unit test but I don't understand the way it is implemented10:04
micmnand a I get different results compared to scikit or a matlab implementation10:05
@wiking?10:06
@wikingwhere?10:06
micmnI mean in kernelpca10:06
@wikingor which unit test you mean?10:06
@wikingah ok10:07
micmnah and what do you think of having something like get/set_column and slice on sgmatrix?10:08
@wikingmmm10:09
@wikingsgmatrix supposed to be just a simple wrapper10:09
micmni mean without copying the data10:09
@wikingfor the memory10:09
@wikingwe wanted to ge tout every functionality10:09
@wikingfrom SGMatrix itself10:10
@wikingbut get/set_column still is ok10:10
@wikingi'm not so sure about slice10:10
@wikingslice could be done with linalg10:10
micmnthere is already a get_column that returns a pointer10:11
@wikingmmm10:11
@wikingi didn't say that we currently have pruned all the api10:11
@wiking:P10:11
micmnbut to use that with linalg you have to wrap a sgvector around the pointer10:11
@wikingjust that what was the plan :D10:11
micmnyeah i didn't mean that :D10:11
-!- mikeling [uid89706@gateway/web/irccloud.com/x-euhibkiwebrfvvgc] has joined #shogun11:43
@wikingmikeling, ping12:05
@wiking:)12:05
-!- iglesiasg [~iglesiasg@217.119.234.214] has joined #shogun12:05
-!- mode/#shogun [+o iglesiasg] by ChanServ12:05
mikelingwiking: pong12:10
mikelingHey I had received your email12:10
mikelingWill send weekly report later12:10
mikeling:)12:11
@iglesiasggeektoni: very nice writeup in the blog!12:11
geektonihi iglesiasg! Thanks! :D12:12
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Ping timeout: 258 seconds]13:09
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun13:22
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Ping timeout: 240 seconds]13:26
@wikingmikeling, ping?13:55
mikelingwiking: here13:56
@wikingmikeling, have u seen my comments on the PR?13:57
mikelingwiking: sure, and the template error has been fixed13:57
mikelingthank you13:57
@wikingok, do you have any blocker problems at the  moment?13:58
@wikingbecause the rest seems to be just logical errors13:58
@wikingin the code itself13:58
mikelingyeah....I do have an error actually :(  https://pastebin.mozilla.org/902436214:00
mikelingwiking: and I write some unit test for keeping things stay the same, even looks ugly  https://pastebin.mozilla.org/902436314:01
mikelingbut all of them passed14:01
@wikingmikeling, ok so before going deeper14:03
@wikingdo you know about TYPED_TEST in gtest?14:04
@wikinghttps://github.com/google/googletest/blob/master/googletest/test/gtest-typed-test_test.cc14:04
@wikingso instead of only testing14:04
@wikingint32_t and bool14:04
@wikingyou could test more14:04
@wikingwith the same code actually14:05
@wiking;)14:05
mikelingno, I don't know about it14:05
mikelingI will improve the unit test by it14:06
@wikinggreat14:07
@wikingand14:07
@wikingone more thing14:07
@wikingTEST(CDynamicArray, init_array)14:07
@wikingi would cut this into 3 test14:07
@wikingtest the default ctor14:08
@wikingtest the custom ctor14:08
@wikingand test the wrapper ctor14:08
@wikingmikeling, what i would do in your case14:09
@wikingis that finalize this PR14:09
@wikinghttps://github.com/shogun-toolbox/shogun/pull/383314:09
@wikingmikeling, with the unit tests you've showed just that use the typed_tests instead of adding it manually the different types14:10
@wikingonce you have that push it14:10
@wikingand then we merge it14:10
@wikingand then go back to https://github.com/shogun-toolbox/shogun/pull/383214:10
@wikingrebase it14:10
mikelingok14:10
@wikingand if it's only the crossval thing fails14:10
@wikingthen push it and i can help debug14:11
@wikingwould love to be able to continue this :)))14:11
@sukeyIssue #3841 "how can i confuse two features by two different kernel in shogun??"- https://github.com/shogun-toolbox/shogun/issues/384114:11
@wikingi mean so that we finally have the DynArray thrown out14:11
@wikingand continue the effort14:11
@wikingas we've spent on this way too much time :)14:11
mikelingyes, indeed14:11
@sukeyIssue #3841 "how can i confuse two features by two different kernel in shogun??"- https://github.com/shogun-toolbox/shogun/issues/384114:13
@sukeyIssue #3841 "how can i confuse two features by two different kernel in shogun??"- https://github.com/shogun-toolbox/shogun/issues/384114:14
@sukeyIssue #3841 "how can i fusion of two features by two different kernel in shogun??"- https://github.com/shogun-toolbox/shogun/issues/384114:15
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun14:36
lisitsyngeektoni: hey14:40
geektonilisitsyn: hi14:41
lisitsynwe had a random chat at our slack but probably you'd be interested14:41
lisitsynlet me paste my thoughts14:41
lisitsynok I may be a bit naïve but14:41
lisitsynwe already have SG_REF/UNREF stuff14:41
lisitsynso there are two problems: 1) providing all the T interface and 2) reference counting14:41
lisitsynas far as refcount works with SG_REF and pointers we can just change it to some->ref()14:41
lisitsyn```%feature("ref")   shogun::CSGObject "SG_REF($this);"14:42
lisitsyn%feature("unref") shogun::CSGObject "SG_UNREF($this);"```14:42
lisitsynthat’s what we have now14:42
lisitsynif it does not support templates we just provide all the possible14:42
lisitsyn ```%feature("ref")    shogun::Some<PublicClass> "$this.ref()";```14:42
lisitsyngeektoni: I am not sure but there is a chance to split these two issues14:42
lisitsyndoes it all make sense? it could lack some context :)14:43
geektonimmh, the main problem was that for some interfaces, a wrapped object with Some<> is not recognized as a pointer14:44
geektoniand we cannot access its method because SWIG doesn't like it14:44
lisitsynyes it is one problem14:44
lisitsynthe first one14:44
lisitsynand there is a second one which probably can be solved14:44
geektonithat is the ref count?14:45
lisitsynyes14:45
lisitsynactually we don't really need swig to think it is a pointer14:46
geektoniok, so by changing %feature as you suggested above, you think we could solve it?14:46
lisitsynprobably but I didn't try14:46
lisitsynup to my understanding it should but who knows14:46
@wikingyeah14:46
@wikingbut actual the real problem is 1)14:46
lisitsynyeah14:46
@wikingthe auto interface population14:46
@wiking:)14:46
lisitsynok but I was also worried with sgref14:47
lisitsynok at least we can now focus on interface14:47
geektonilisitsyn: do you think that list all possible Some<> template will solve 1)?14:48
lisitsyncan't see how14:48
geektonikk, I misunderstood14:49
lisitsynI have no clue how std::shared_ptr works in that sense14:49
@wikinglisitsyn, based on this14:49
@wikingit doesnt :)14:49
lisitsynbecause it is just the same thing14:49
@wikinghttp://www.swig.org/Doc3.0/Library.html#Library_std_shared_ptr14:50
@wikingor not as one would expect14:50
lisitsynthat example doesn't make any sense to me14:51
@wikinghttps://stackoverflow.com/questions/39055643/instantiate-shared-ptr-objects-from-swig-in-python14:51
@wiking:)14:51
@wikingthis is looking more nice14:51
lisitsynhow does it work14:52
@wikinghopp14:52
lisitsynaaaaa14:52
@wikinghopp14:52
@wikinghttp://www.swig.org/Doc3.0/SWIGPlus.html#SWIGPlus_smart_pointers14:52
@wikingcheck that14:52
lisitsynSWIG tries to generate wrappers for all methods and attributes that might be accessible through operator->()14:53
lisitsynoh that would be nice if it works14:53
lisitsyngeektoni: I have a plan for you ;)14:54
lisitsyntry exporting Some<SGObject> or something like that14:54
geektonilisitsyn: I love plans ;)14:54
lisitsynand check if SGObject's method is available14:54
@wiking Note: Smart pointer support was first added in SWIG-1.3.14.14:54
@wiking:)14:54
lisitsynbecause if it works you have no problem14:54
geektonimmh14:55
geektoniI'll try14:55
geektonilisitsyn: I exported Some<CSGObject> by using something like %template (SomeSGObject) shogun::Some<CSGObject>15:20
@wikinggeektoni, and do you get the SGOBject interface?15:21
lisitsynplease say yes15:21
lisitsyn:P15:21
geektoniI can call it from python for example using "from modshogun import SomeSGObject"15:21
geektoniis this what you mean?15:22
lisitsynno, what methods15:22
@wikinggeektoni, in python15:22
lisitsyndo you have all the methods of SGObjects visible15:22
@wikingx = SomeSGObject()15:22
geektoniyeah sure15:22
@wikingx.clone()15:22
@wiking:)15:22
lisitsyncan you call it?15:22
@wikinggeektoni, ^ try that15:22
@wikingor x.get_global_io()15:23
@wikingany of the SGObject's15:24
@wikingfunctions15:24
@wikingprint_modsel_params15:24
@wiking:)))15:24
geektoniso15:25
geektoniI can see the methods and I can call them15:25
lisitsynphew15:25
@wikingcool15:25
@wikingthen its all good15:25
@wiking:)))))15:25
geektonibut15:25
geektonisome of them doesn't work15:25
geektonifor example15:25
@wikingliek?15:26
geektonia = b.get_global_io();15:26
geektoniwhere b is a SomeSGObject instace15:26
@wikingwhat did it do?15:26
geektonifrom a I cannot call any method of SGIO.15:26
lisitsynwhat's the type of a?15:27
lisitsyndoes get_global_io return Some<SGIO>?15:27
geektoni<type 'SwigPyObject'>15:27
@wikinggeektoni, in the original15:27
@wikingcode of yours15:28
@wikingin c++15:28
lisitsynI guess adding %template (SomeSGIO) shogun::Some<CSGIO> helps?15:28
@wikinggeektoni, what's the return type of get_global_io()15:28
@wiking?15:28
@wikingif it's Some<...>15:28
@wikingthen it's what lisitsyn says obviously15:28
@wiking;)15:28
lisitsynif yes then you just add all the necessary instances of Some15:28
lisitsynand everything starts working, gradually15:28
@wiking:))))))))015:29
geektoniwiking: the return type of get_global_io is Some<SGIO>15:29
geektoniin c++15:29
@wikinggeektoni, yep15:29
@wikingthen that's the reason15:29
@wikingwe need to then play with this15:29
@wikingthat there's an automation15:29
@wikingfor all the Some<...>15:29
@wikingas manually writing those15:30
@wikingwill be a pain15:30
@wiking:)15:30
geektoniyeah, I agree15:30
lisitsyncreate a macro like REFERENCEABLE(T) :)15:31
@wikinggeektoni, so now it should be :dance:15:31
geektoniahah15:31
lisitsynyeah next thing is adding feature "ref"/"unref" to avoid leaks15:31
geektonikk15:31
lisitsynbecause it should be leaking now15:31
geektoniyeah, I got a warning from python about that just a sec ago15:31
lisitsynlala dont care now15:32
geektoniLOL15:32
@wiking:>15:33
@wikingLEEEEEEEEEEEEEEEAAAAAAAAAAAAAAAAAAAAAAAAK15:33
@wikingLEAAAAAAAAAAK LEAAAAAAAAAAAAK15:33
@wikingyeey15:33
lisitsyneverything is quite good actually now :)15:35
@wikingyeah15:36
lisitsynmathematicians would say problem is already solved15:36
lisitsyn:D15:36
lisitsynok meanwhile I'll check non-owning sheat15:36
geektoniwiking, lisitsyn: I'm doing one more test by adding the  %template directive for Some<SGIO>15:37
geektonibecause15:37
lisitsynit should work now15:37
geektoniI tried to do the SAME thing some days ago to fix the Parallel problem15:37
geektonibut it didn't work15:37
lisitsyno_O15:37
geektoniexactly15:38
geektonimaybe I did something wrong15:38
lisitsynthis time we believe in you15:38
lisitsyn:P15:38
lisitsynGO! GO! :D15:38
geektoniCurrently, I hope that I was too tired to see that it was working.15:39
lisitsynwhat was the problem last time?15:39
lisitsynmethod not visible or?15:39
geektonithat adding %template for Parallel did not solve the problem15:40
lisitsynyeah what exactly15:40
geektonimethods were not visible15:40
lisitsynok lets see now15:40
geektonifingers crossed15:41
geektoniwell15:44
geektoniI'm sorry to ruin the party15:44
geektonibut it still doesn't work.15:44
lisitsynok tell me the type15:44
lisitsynwhat object did it return for you15:44
geektonisame as before15:44
geektoni<type 'SwigPyObject'>15:44
geektoniinstead of modshogun.SomeSGIO15:45
lisitsynI see I see15:45
lisitsynok we're on right track actually15:45
lisitsynsome small detail15:46
lisitsynI have to go now :(15:46
geektoni:(15:46
lisitsyngeektoni: what you might check is source code of wrapper15:46
lisitsynmodshogun.cxx15:46
geektonilisitsyn: kk15:47
@wikinggeektoni, xz the modshogun.cxx15:48
@wikingand send it over15:48
geektonibtw15:48
geektonihttps://pastebin.com/M9vLpWyG15:48
geektonithis is the some.i file15:48
geektoniis it correct?15:48
geektonibecause15:48
geektoniit works15:48
geektonibut maybe I missed some details.15:49
@wiking?15:49
@wikingque?15:49
geektonihttps://pastebin.com/M9vLpWyG15:49
@wikingyeah that should be correct15:49
geektonikk15:49
geektoniwiking: I'll send you the modshogun file15:50
@wikingbut if x.get_global_io().get_loglevel() does not work15:50
@wikingthen we need to see the .cxx15:50
geektoniwiking: you should have a new email in your inbox ;)15:55
@wikinggotit15:55
@wikingmmm15:56
@wikingresult = (shogun::SGIO *)shogun::get_global_io();15:56
@wikingthat's in15:56
@wikingSWIGINTERN PyObject *_wrap_get_global_io(PyObject *self, PyObject *args) {15:56
@wikingbut then later15:57
@wikingSWIGINTERN PyObject *_wrap_SGObject_get_global_io(PyObject *self, PyObject *args) {15:57
@wikingSwigValueWrapper< Some< shogun::SGIO > > result;15:57
@wiking:S15:57
geektonimmh15:57
geektoniso15:58
geektonitwo methods15:58
geektonithat wrap the same thing?15:58
@wikingnono15:58
@wikingi dont thing so15:58
@wikingbecause we do have a global15:58
@wikingfunction15:58
@wikingget_global_io15:58
@wiking:)15:58
geektoniahh yeah15:58
geektoniok15:58
@wikingin15:59
@wikingSWIGINTERN PyMethodDef SwigPyBuiltin__shogun__CSGObject_methods[] = {15:59
@wiking  { "get_global_io", (PyCFunction) _wrap_SGObject_get_global_io, METH_VARARGS, (char*) "get_global_io() -> Some< shogun::SGIO >" },15:59
@wikingi.e. it should return a Some<SGIO>15:59
@wikinggeektoni, ok one more thing16:00
@wikingcan you do16:00
@wikingx = SGObject()16:00
@wikingx.get_global_io().get_loglevel()16:00
geektoniok16:01
geektoniso16:01
geektoni x = SGObject()16:01
geektonithrow an error16:02
geektoniTypeError: Cannot create new instances of type 'modshogun.SGObject'16:02
@wikingmmm16:02
@wikingi wonder why16:02
@wikingtry to create any shogun object :)16:02
@wikingand do the same16:02
@wikingah ok16:03
@wikingyeah16:03
@wikingSGObject is abstract16:03
@wikingvirtual const char* get_name() const = 0;16:03
@wikingfrom modshogun import MeanRule16:04
@wikingx = MeanRule()16:04
@wikingx.get_global_io().get_loglevel()16:04
geektoniTypeError: descriptor 'get_global_io' of 'modshogun.SGObject' object needs an argument16:04
geektoni:P16:04
geektoniI'm using a GaussianKernel object16:04
geektonibut it should work the same16:04
@wikingneeds an argument? :)16:05
@wikingmmm16:05
geektoniit shouldn't16:05
@wikingyeah indeed it shouldn't16:05
geektonino wait16:06
geektoniAttributeError: 'SwigPyObject' object has no attribute 'get_loglevel'16:06
@wikingoho16:06
@wikingso if you call16:06
@wikingsgio = x.get_global_io()16:06
@wikingthe type of sgio16:06
@wikingis16:06
@wikingSwigPyObject16:06
@wiking?16:06
geektoniexactly16:07
@wikingmmmhmmm16:07
@wikingwonder why16:07
@wikingas the wrapper16:07
@wikingclearly state the type of the return value16:07
geektoniI also get this error16:08
geektoniswig/python detected a memory leak of type 'Some< shogun::SGIO > *', no destructor found.16:08
geektonibut I imagine is cause by the ref/unref methods which need to be adjusted.16:08
@wikingy16:09
@wikingcan you create SomeSGIO ?16:09
@wikingso like16:09
@wikingx = SomeSGIO()16:09
@wikingx.get_loglevel()16:09
geektoniit works16:10
@wikingmiju16:10
geektonix=SomeSGIO(SGIO()) and then get_loglevel() works.16:11
@wikinghttps://www.youtube.com/watch?v=uOz5Qm2EHQE16:12
@wikingchoose SGIO16:14
geektoniLOL16:15
geektoniwell, this is indeed a nasty problem16:17
geektonimmh16:18
geektoniI get also another error when I build the project16:18
geektoniCan't wrap 'operator shogun::SGIO*' unless renamed to a valid identifier.16:18
-!- olinguyen [81615ad9@gateway/web/freenode/ip.129.97.90.217] has joined #shogun17:06
-!- iglesiasg [~iglesiasg@217.119.234.214] has quit [Quit: leaving]17:14
-!- OXPHOS [92bd305b@gateway/web/freenode/ip.146.189.48.91] has joined #shogun17:44
geektoniwiking are you still there?18:06
@sukeyPull Request #3840 "[SmartPointers] Port SGObject and its unit tests to Some<>."  synchronized by geektoni - https://github.com/shogun-toolbox/shogun/pull/384018:26
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Ping timeout: 240 seconds]18:29
ironstarkwiking: https://paste.ubuntu.com/24842262/18:40
ironstarkThis is the error I am getting while using the ppa18:41
ironstarkand https://paste.ubuntu.com/24763963/ is the error while building it from scratch18:42
@wikingironstark, ppa will not work18:42
@wikingif you check the ppa it has no package for zesty18:42
ironstarkyes18:43
@wikingironstark, -DBUILD_META_EXAMPLES=OFF18:43
@wikingadd this to your cmake flag18:43
ironstarkokay18:43
ironstarkthat i am already adding18:45
ironstarkmy cmake flag is18:45
ironstarkhttps://paste.ubuntu.com/24842294/18:45
@wikingdoes lib/python3.5/dist-packages contain numpy?18:46
@wikingas it seems it cannot find numpy18:46
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun18:48
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Client Quit]18:51
ironstarkimport numpy is working with python19:02
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun19:09
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Ping timeout: 255 seconds]19:14
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun19:17
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Quit: Leaving.]19:52
@sukeyPull Request #3833 "unit test for DynamicArray"  synchronized by MikeLing - https://github.com/shogun-toolbox/shogun/pull/383320:12
-!- mikeling [uid89706@gateway/web/irccloud.com/x-euhibkiwebrfvvgc] has quit [Quit: Connection closed for inactivity]22:34
-!- WangWang [uid231047@gateway/web/irccloud.com/x-telvkxydkdcvkefw] has quit [Quit: Connection closed for inactivity]23:52
-!- OXPHOS [92bd305b@gateway/web/freenode/ip.146.189.48.91] has quit [Quit: Page closed]23:55
-!- TingMiao [uid229534@gateway/web/irccloud.com/x-danmtyhslbbczina] has quit [Quit: Connection closed for inactivity]23:56
--- Log closed Tue Jun 13 00:00:11 2017

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