IRC logs of #shogun for Wednesday, 2017-05-31

--- Log opened Wed May 31 00:00:53 2017
@sukeyPull Request #3824 "Replace DynArray with std::vector for io module"  synchronized by MikeLing - https://github.com/shogun-toolbox/shogun/pull/382404:06
-!- mikeling [uid89706@gateway/web/irccloud.com/x-aehloslmslxbmvge] has joined #shogun04:14
@sukeyPull Request #3824 "Replace DynArray with std::vector" - https://github.com/shogun-toolbox/shogun/pull/382404:44
@sukeyPull Request #3824 "Replace DynArray with std::vector"  synchronized by MikeLing - https://github.com/shogun-toolbox/shogun/pull/382406:39
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun08:41
mikelingwiking: ping08:56
@sukeyIssue #3825 "The err about python interface" opened by xxnyufengzhe - https://github.com/shogun-toolbox/shogun/issues/382509:24
-!- HeikoS [~heiko@p5DDB9F19.dip0.t-ipconnect.de] has joined #shogun10:04
-!- mode/#shogun [+o HeikoS] by ChanServ10:04
-!- iglesiasg [~iglesiasg@217.119.234.214] has joined #shogun10:11
-!- mode/#shogun [+o iglesiasg] by ChanServ10:11
@HeikoSolinguyen: hi there10:17
@HeikoSwiking: jo10:17
-!- tctara__ [~quassel@128.199.61.169] has joined #shogun10:56
@sukeyIssue #3825 "The err about python interface" closed by karlnapf - https://github.com/shogun-toolbox/shogun/issues/382510:57
@wikingmikeling, hey10:59
@wikingHeikoS, ho10:59
@wikingolinguyen, thnx for the update10:59
@HeikoSwiking: jojo11:00
@HeikoSwiking: you have time Friday?11:00
@HeikoSto talk to Franz?11:00
@wikingolinguyen TingMiao micmn mikeling dont forget the daylies :)11:00
@wikingHeikoS, yes yes i replied to the email11:00
@wiking11am is good for me11:00
@HeikoSwiking: ah cool11:00
@wikingeither GMT or CET11:00
@wikingboth are ok11:00
mikelingwiking: Hey! Did you receive the email yesterday? about the daily report ?11:01
@HeikoSok, lets do 11am London time then, I aslo asked Gunnar but this is not too relevant11:01
@HeikoSmikeling: could you create a google spreadsheet with all the dailies and send all the mentors a link?11:01
@wikingmikeling, yes it was fine11:01
mikelingHeikoS: sure11:01
@wikingmikeling, it's just that we want it every day :)11:01
@wikingand this was just a gentle reminder11:02
@wikingyou can do it whenever11:02
@wikingwithin a day11:02
@wikingend/beginning11:02
@wikingwhatever is fine11:02
mikelingwiking: got it ;)11:02
@HeikoSwiking: so shall I asl numfocus about hackathon money?11:02
@wikingHeikoS, haven't you already?!11:03
@wiking:)11:03
@wikingyes yes you should11:03
mikelingBTW, Does this comment looks good to you? https://github.com/shogun-toolbox/shogun/pull/3824#issuecomment-30508116811:03
@wikingmikeling, lemme check11:03
-!- Netsplit *.net <-> *.split quits: tctara_11:03
mikelingok11:03
@wikingHeikoS, i mean just be a bit more diplomatic like: we are thinking of... and it was great the last time... sooo if they could allalala11:03
@HeikoSok11:04
@HeikoSwiking: Ill wait until they announce the thing and then do it, good?11:04
@wikingsounds good11:04
mikelingHeikoS: For CBinaryLabels and CMultilabelLabels issue, we already have CLabels as base class of all other label classes. Do we need to reconstruct the CLabels we have?11:05
@HeikoSmikeling: ah yes good point11:05
@HeikoSwiking: ^11:05
@HeikoSso my thoughts are11:05
@HeikoS-delete all label specialization classes, only keep CLabels, make it not abstract11:06
@wikingmikeling, yeah you can drop actually DynArray and use everywhere std::vector, or?11:06
@HeikoSthen, put code check value checks and conversions in there11:06
@HeikoSand the algorithms can call things like "CLabels::use_as_binary()"11:06
@HeikoSwhich then converts/checks11:07
mikelingwiking: yep, I can use std::vector to instead of DynArray  in most of places11:07
@HeikoSand makes sure the getters return the appropriate things11:07
mikelingbut something went wrong when things come to DynamicArray and DynamicObjectArray11:07
@HeikoSwiking: so my idea is to have the labels just like the new features: type free, runtime checks, transparent conversions behind the API11:08
@wikingHeikoS, we used to have to something like11:08
@wikingobtain from generic11:08
@wikingor?11:08
@HeikoSyes but that is horrible11:08
@wiking:11:08
@wiking:)11:08
@wikingi'm just saying11:08
@HeikoSno need for that11:08
@wikingits the same as no?11:08
@wiking:)11:08
@HeikoSI mean why have classes if we do everything at runtime anyways?11:08
@HeikoSjust have one class11:08
@wikingwelll11:08
@wikingnot always true right?11:08
@HeikoSand you can ask that class whether it can behave like "binary/multiclass" etc11:08
@wikingi mean we create binaryLabels on compile time already or?11:09
@HeikoSyeah but then the interface for passing labels is base class and then ALL algorithms dynamic cast them to the type they need11:09
@HeikoSso there is no base interface anyways11:09
@HeikoSI suggest just to have a CLabels class that can behave like any form of labels, depending on what is needed11:10
@HeikoSso user just passes labels to algorithm11:10
@HeikoSwhether binary or multiclass11:10
@HeikoSand then algorithm asks for certain representation11:10
@HeikoSand then gets the SGVector/SGMatrix11:10
@wikingHeikoS, and what, runtime exception if the label is not multiclass?11:10
@HeikoSyes11:11
@wikingdontlike11:11
@wiking:)11:11
@HeikoSthis is already the case now11:11
@HeikoSruntime exception11:11
@wikingi like things to be compiled checked11:11
@wiking:)11:11
@HeikoSthey are not atm anyways11:11
@wiking?11:11
@HeikoSCMachine accepts CLabels11:11
@wikingCSVM expects Label?11:11
@HeikoSnot CMulticlasslabels11:11
@HeikoSand second11:11
@wikinguglyfuck11:12
@wiking:)11:12
@wikingbut true11:12
@HeikoSif you put only -1,1 in multiclass labels, you get runtime error anyways11:12
@HeikoSso thats like the worst of the two worlds11:12
@wikingok then yeah11:12
@HeikoSbut I think we should just abstract that out11:12
@wikingdoesn't make sense11:12
@HeikoSlike for features11:12
@wikingbut11:12
@wikingand here is the but11:12
@wikingnow you will put all the logic11:12
@wikingand code11:12
@wikinginto CLabels11:12
@wikingright?11:12
@HeikoSone possibility11:12
@wikingit's reaaaaaally gonna be super ugly11:12
@HeikoSanother one is impl class11:12
@HeikoSthat is instantiated from CLabels11:13
@HeikoSI mean multiple11:13
@HeikoSthat make the code modular11:13
@HeikoSI mean yeah, this has to be designed well11:13
@HeikoSwe dont want all the code in one file11:13
@HeikoSmikeling: are you following?11:16
@HeikoSwiking: shall we draft some high level code?11:16
@wikingyes11:17
@wikingwe should11:17
@HeikoSwiking: ok let me start a gist11:17
mikelingHeikoS: I'm trying :/11:17
@wikingmikeling, dont worry you'll get a .h11:17
@wiking:)11:18
@wikingmikeling, until then you can work on DynArray or/11:18
@wiking?11:18
mikelingwiking: I would like to leave DynArray for now due to DynamicArray and DynamicObjectArray inherit from DynArray and use some implementation of DynArray deeply? I suggest working on DynamicArray and DynamicObjectArray  replacement first and then remove them all at once11:20
mikelingbut11:20
@wikingmikeling, mmm inherit?11:20
@wikingclass CDynamicObjectArray : public CSGObject11:21
@wikingyou can replace11:21
@wikingDynArray<CSGObject*> m_array;11:21
@wikingto std::vector<CSGObject*> m_array;11:22
@wikingmost of the things would work11:22
@wikingand some like11:22
@wikingget_element_ptr11:22
@wikingyou need to trick11:22
mikelingwiking: yeah11:22
@wikingbeause m_array[i] will actually get the ptr11:22
@wikingnot the object11:22
@wikingsame for DynamicArray11:22
mikeling for the get_element_ptr11:22
@wikingthose both are doable11:23
@wikingto remove DynArray11:23
@wikingif you have some specific prolbme11:23
@wikingplease do ask11:23
@wikingwhere you have problem dropping/replacing DynArray11:23
mikelingwiking: ok, I will figure it out ASAP11:25
@wikingmikeling, ok cool11:29
@wikingi'm gonna have to run out for a bit now11:29
@wikingbut gonna be around in 20 mins11:29
@wikinglisitsyn, i dont know if you are round12:12
@wikingbut in the next 5 hours12:12
@wikingi'll kill that g2.8xlarge instance12:12
@wikingsorry12:12
-!- TingMiao [uid229534@gateway/web/irccloud.com/x-vnwjnmfewebawlgx] has quit [Quit: Connection closed for inactivity]12:21
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has quit [Ping timeout: 260 seconds]12:24
@HeikoSwiking, lisitsyn, mikeling, iglesiasg https://gist.github.com/karlnapf/939e8b1df0046f9fc22c4fc170012f4212:29
@HeikoScan you iterate?12:29
@wiking++12:30
@wiking:D12:30
@wikingbool labels.validate_binary()12:31
@wikingugly12:31
@HeikoSwiking: yeah that can go12:32
@HeikoSI thought about multiple ways12:32
@HeikoSthis one is the one I liked moist12:33
@HeikoSwe can also explicitly instantiate the typed sublasses by users12:33
@HeikoSbut that wont play well with tags12:33
@HeikoScan also do CBinaryLabels(labels) rather than labels.as_binary(), but that complicates things at other points as well12:34
@HeikoSat some point, there needs to be this runtime type check, otherwise tags API wont work12:34
-!- HeikoS [~heiko@p5DDB9F19.dip0.t-ipconnect.de] has quit [Ping timeout: 245 seconds]12:45
-!- iglesiasg [~iglesiasg@217.119.234.214] has quit [Ping timeout: 260 seconds]14:06
mikelingwiking:14:29
mikelingping14:29
-!- HeikoS [~heiko@x55b36ee2.dyn.telefonica.de] has joined #shogun14:30
-!- mode/#shogun [+o HeikoS] by ChanServ14:30
-!- HeikoS [~heiko@x55b36ee2.dyn.telefonica.de] has quit [Client Quit]14:30
mikelingwhy we need use a pointer to init DynArray https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/DynArray.h#L385,14:30
mikelingIs that for deciding how many memory should been alloced by the pointer type ?14:31
@wikingmikeling, checking14:47
@wikingi mean i have never touched this code so i dont know14:47
@wikingmmm14:47
@wikingseems github is now having some issue14:47
@wiking14:36 CEST14:47
@wikingMajor service outage.14:48
@wiking...14:48
@wikingbecause DynArray is nothing else14:50
@wikingbut a template<class T> T* array14:50
@wikingand DynArray is nothing else14:53
@wikingbut a wrapper around T*14:53
@wikingwhich is basically an array of T objects14:53
@wiking*objects of type T14:53
@wikingand actually14:53
@wikingi'm a bit shocked that we have still something like this in the code14:54
@wikingelse14:54
@wikingarray=(T*) malloc(size_t(p_resize_granularity)*sizeof(T));14:54
@wikingelse14:54
@wikingarray=(T*) malloc(size_t(p_resize_granularity)*sizeof(T));14:54
@wikingmeaning that we can use directly libc's malloc14:54
@wikingsomehow...14:54
mikelingwiking: so, we could just use std::vector<T>(p_array_size) to instead of that?15:01
@wikingyes15:01
@wikingof course15:01
mikelingthose malloc process I mean15:01
mikelingok15:01
mikelinggot it15:01
@wikingyes yes15:01
@wikingyou dont care any of those things15:01
@wikingas that is done by std::vector15:01
@wikinginternally15:01
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has joined #shogun15:06
@sukeyPull Request #3745 "Add PRange class to replace old SG_PROGRESS (WIP)"  synchronized by geektoni - https://github.com/shogun-toolbox/shogun/pull/374515:20
-!- HeikoS [~heiko@x55b36ee2.dyn.telefonica.de] has joined #shogun15:37
-!- mode/#shogun [+o HeikoS] by ChanServ15:37
mikelingwiking: what's this for? https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/DynamicObjectArray.h#L43715:38
mikelingactually I'm not really familiar with the 'clone' of SGObject15:39
mikelingcould you tell me something about it please :)15:39
@wikingyes15:41
@wikingsorry15:41
@wikingi'm just in a meeting15:41
mikelingnp15:44
-!- HeikoS [~heiko@x55b36ee2.dyn.telefonica.de] has quit [Ping timeout: 258 seconds]16:34
-!- zoq [~marcus_zo@urgs.org] has joined #shogun16:56
mikelingwiking: still around ?17:39
@wikingye17:39
mikeling😃 do you have time to tell me something about https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/lib/DynamicObjectArray.h#L437 and17:40
mikelingSGObject17:41
mikelingclone17:41
@wikingah17:43
@wikingthat's all about how you copy an CDynamicObjectArray17:44
@wikingmaaybe... and i'm not so sure17:44
@wikinghtat you need to do some custom code where for the std::vector<>17:44
@wikingbut that has a copy ctro17:44
@wiking*ctor so it should be rather easy to do17:45
@wikingi mean for the time being just ignore this17:45
@wikingand implement without it and then see how the clone is behaving17:45
@wikingand then you'll see whether you should do something like: cloned->m_array = this->m_array;17:46
mikelingOh I see17:46
@wikingwe have a unit test for the clone command17:46
mikelingThank u17:46
@wikingso it should give you a failure17:46
@wikingit something is wrong17:46
-!- witness_ [uid10044@gateway/web/irccloud.com/x-drdyolffrskwsupg] has joined #shogun18:50
-!- geektoni [~geektoni@93-34-234-212.ip52.fastwebnet.it] has left #shogun []19:08
-!- witness_ [uid10044@gateway/web/irccloud.com/x-drdyolffrskwsupg] has quit [Quit: Connection closed for inactivity]21:09
--- Log closed Thu Jun 01 00:00:54 2017

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