IRC logs of #shogun for Wednesday, 2019-03-27

--- Log opened Wed Mar 27 00:00:09 2019
-!- sighingnow_ [~sighingno@2001:da8:203:81:28db:2637:2de1:25fa] has joined #shogun06:28
-!- sighingnow_ [~sighingno@2001:da8:203:81:28db:2637:2de1:25fa] has quit [Remote host closed the connection]07:34
-!- sighingnow [~sighingno@2001:da8:203:81:6dfb:4249:eea9:6b43] has quit [Read error: Connection reset by peer]07:34
-!- HeikoS [~heiko@70.pool85-52-163.static.orange.es] has joined #shogun09:00
-!- mode/#shogun [+o HeikoS] by ChanServ09:00
-!- gf712 [9052085a@gateway/web/freenode/ip.144.82.8.90] has joined #shogun09:03
gf712HeikoS: hey09:04
@wikinglisitsyn: pityputy09:45
@wiking:)09:45
@wikinggf712: yo09:45
-!- geektoni [973e46de@gateway/web/freenode/ip.151.62.70.222] has joined #shogun10:10
@wikinggeektoni: yoza10:16
@wikinggeektoni: got a second?10:16
geektoniwiking: hi there, sure10:17
@wikingok so10:17
@wikingi wanna do a simple demo with param observers10:17
@wikingsay i have liblinear10:17
@wikingand i wanna observe w and b10:18
@wiking(weight vector and bias)10:18
@wikingHELP! :D10:18
geektoniahah okay, straight to the point10:18
geektoniso10:18
@wikingand can i do it in develop or atm its only in branches?10:19
@wikingand there's a twist in this one but that you'll see later ;)10:19
@wikingbtw anybody works with reactjs here?10:19
@wikingi need a stupid react extension for drawing plots10:19
geektoniI guess you can do it in develop since it is all there atm10:19
@wikingok so10:19
@wikingtell me then10:19
@wikingwhat are the sgobj methods10:19
geektoniwiking: https://github.com/shogun-toolbox/shogun/pull/4592/files#diff-bf63664b191d73bbd6c8ac7f1ed127a1R9610:20
geektonithat is the method needed10:20
geektonicurrently, you need to manually add those lines to the algos you want to observe10:20
@wikingaha10:21
geektoniwe are trying to extend put() to do it manually10:21
@wikingok that's no biggy for me10:21
@wikingas it's demo10:21
geektonicool then10:21
@wikingok and how do i subscribe?10:21
@wikingi mean observe10:21
@wikingand then this might be the jackshit10:21
geektonilet me dig out the example10:21
@wikingthnx10:22
gf712wiking: hey10:22
@wikinggf712: reactjs? >)10:22
@wikingor no? )10:22
gf712nope :D10:22
gf712you mean if I know anything?10:23
geektoniwiking: https://github.com/shogun-toolbox/shogun/blob/develop/examples/meta/src/evaluation/cross_validation_multiple_kernel_learning_weights_storage.sg#L3610:23
@wikingsubscribe_to_parameters is sgobject?10:23
@wikingye10:23
@wikingok10:23
@wikinglemme see now if i can do that :)))10:23
@wikingas i'm in javascript :)10:23
@wikingok i need then ParameterObserverInterface10:24
@wikingso i need to implement my own paramobserver10:25
@wikingthat's fine10:25
geektoniwiking: btw those methods are gonna change pretty soon10:25
@wikingokok no worries10:25
geektoniyeah, if you need custom things yes10:25
@wikingi mean i just need to emit stuff10:25
@wikingthat is observed10:25
@wikingand since its an interface10:26
@wikingi need an implementation10:26
geektonithe emit thing is done already by the SGObject, the observers just receive the emitted values and they does things with it10:27
@wikingyeah i mean i just need the values10:28
@wikingsgobjects to a ParameterObserverInterface10:28
@wikingno?10:28
geektoninot sure I understand10:29
@wikingporco dio10:30
@wikingso10:30
@wikingi need the emitted values10:30
@wikingi get those by adding to the sgobj a ParameterObserverInterface right?10:30
@wikingor the emitted values could be received somehow else10:31
@wiking?10:31
@wikingbtw10:32
@wikingclass CParameterObserverCV : public ParameterObserverInterface,10:32
@wiking                             public CSGObject10:32
@wikingthis should be addressed in the next refactor10:32
@wikingas i dunno how that thing (meta exmaple) works in java/c#10:32
geektoniyeah, that's how it works. You can only "receive" it using a ParameterObserverInterface10:33
geektonithe multiple inheritance mess is already solved in a PR which needs a bit of refactoring before it gets merged10:33
geektoni;)10:33
@wikingkk10:34
@wikingcool10:34
@wikingok lemme see if i can do this10:34
@wikinggeektoni: btw why is that multi inheritance?11:06
@wikingmeaning if i would need that as well11:06
@wikingfor my inheritance11:06
@wikingor it's more for swig?11:07
geektoniwiking: i think it was for SWIG and for making some unit-tests pass11:25
@wikingok11:30
@wikingbut the paramobserverinterface doesnt need it11:31
@wikingit'll just call the on_next etc11:31
@wikinglets see :))))11:31
@wikingif this works11:33
@wikingwhat i'm trying now i'll shit my pants11:33
@wiking:D11:33
geektoniwiking: lol best of luck then11:36
@wikingalmost :)11:44
geektoniwiking: did it almost work?11:47
@wikingyeah typedefs are missing from js11:47
@wikingneed to generate more code :s11:49
@wikingbut maybe some will be a bit of a problem :(11:49
@wiking:S typedef std::pair<Some<ObservedValue>, time_point> TimedObservedValue;11:50
geektonithose should be hidden from swig11:51
geektoniI mean, they are just internal representation11:51
@wikingeh?11:51
@wikingno11:51
@wikingvirtual void on_next(const TimedObservedValue& value) = 0;11:51
@wikingbut i'm not working with swig11:51
@wikingso it's ok11:51
@wiking:)11:51
@wikingi wanna have ObservedValue11:51
@wiking:DDD11:51
geektoniahh I see11:51
geektoniI thought you were trying to build an observer using js :/11:52
@wikingyes11:52
@wikingbut i'm not using js11:52
@wikingi mean11:52
@wikingswig for js11:52
@wiking:D11:52
geektonii see isee :D11:52
@wikingits native js my friend ;)11:53
@wikingok so i either hackomacko11:53
@wikingthe interface11:53
@wikingand all the way down there11:53
@wiking:)11:53
@wikingor i try to do some binding for this typedef11:53
@wiking:)11:53
@wikinggeektoni: how hard is it to change the interface u think?11:54
@wiking*what do u think11:54
@wikingi mean that paramobserver now just passes an observevalue11:54
@wikingto on_next11:54
@wikingah no fucker!11:54
@wikingi think i can do a crazy stuff11:54
@wikinggeektoni: wait wait12:01
@wikingi get back the value in Any? :)12:01
geektoniwiking: you can use get<the_correct_type>("value") to extract the value contained inside ObservedValue.12:08
geektonibecause ObservedValue uses the Tag framework to store the emitted value12:08
@wikingyeye12:09
@wikingi know12:09
@wikingit's just makes things more complex :)12:09
geektoniregarding the interface, if you want to get rid of that typedef it shouldn't be a big deal12:09
geektoniwe wanted to have everything with a uniform interface in the end :)12:09
@wikinglets see12:10
@wikingi did a hack now12:10
@wikingmaybe works12:10
geektonino more getters/setters12:10
@wikingin python we have getVector i guess12:11
@wikingright?12:11
geektonimmh maybe get_RealVector?12:12
geektonibut yeah, there is some utility indeed12:12
@wikinglets see if my haxor at least helped the timedobserved shit12:14
geektonilol12:14
geektonineed to go now12:14
geektoniwiking: keep me updated ;)12:15
-!- geektoni [973e46de@gateway/web/freenode/ip.151.62.70.222] has quit [Quit: Page closed]12:16
@wiking\o/12:21
@wikingworks12:21
-!- gf712 [9052085a@gateway/web/freenode/ip.144.82.8.90] has quit [Ping timeout: 256 seconds]13:01
-!- HeikoS [~heiko@70.pool85-52-163.static.orange.es] has quit [Ping timeout: 250 seconds]13:14
-!- HeikoS [~heiko@152.pool85-52-163.static.orange.es] has joined #shogun13:49
-!- mode/#shogun [+o HeikoS] by ChanServ13:49
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]13:50
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:04
-!- mode/#shogun [+o wiking] by ChanServ14:04
-!- gf712 [9052085a@gateway/web/freenode/ip.144.82.8.90] has joined #shogun14:07
@wikingtoooni!14:14
@wikingHeikoS:14:15
@wikingdo u have a pingable endpoint for Toni?14:16
@wikingi need him14:16
-!- HeikoS [~heiko@152.pool85-52-163.static.orange.es] has quit [Quit: Leaving.]14:18
-!- gf712 [9052085a@gateway/web/freenode/ip.144.82.8.90] has quit [Ping timeout: 256 seconds]14:57
-!- geektoni [973e46de@gateway/web/freenode/ip.151.62.70.222] has joined #shogun14:58
geektoniwiking: here14:59
@wikingok14:59
@wikingso14:59
@wikingit all works14:59
@wiking:D14:59
@wikingbut14:59
@wikingmay be it's the algo's fault15:00
@wikingbut i'm getting sometimes undefined stuff15:00
@wikinggot 0.4329808221977935515:00
@wikingvector=[-0.98559447595784222,0.559442371132646166]15:00
@wikinggot undefined15:00
@wikinggot 1.000000000000000715:00
geektonimmh15:00
geektoniwhat are you trying to get? just vectors?15:00
@wikingnono15:01
@wikingit's 1 vector15:01
@wikingand one double15:01
@wikingbut the other shitty part is this15:01
@wikingon_next: function(v) {15:01
@wiking        if (v.value().get_string("name") == "bias") {15:01
@wiking            console.log(`got ${v.value().get_any().asDouble()}`);15:01
@wiking        } else if (v.value().get_string("name") == "w") {15:01
@wiking            console.log(`got ${v.value().get_any().asRealVector()}`);15:01
@wiking        }15:01
@wiking        15:01
@wiking    }15:01
@wikingthis is my js observerinterface  implementation for onnext15:01
@wikingit's a bit shitty :S15:01
@wikingespecially coz of the strcmp15:02
@wiking:)15:02
@wikinganyhow15:02
@wikingi'll do a debugging why sometimes either the vector or the double is undefined15:02
@wiking:S15:02
geektoniideally you can pass a list of names to the observer to obtain only ObservedValues with a specific name15:03
geektonibut yeah15:03
geektoniif you want to do it all together15:03
geektonithat is what happens :/15:03
@wikingah15:03
@wikingok yeah so15:03
@wiking1 observer per value15:03
geektonianyway, for the undefined, it may be the algo's fault15:03
@wikingor something15:03
@wikingthat's fine15:03
@wikingother shitty stuff15:03
@wikingunsubscribe15:04
@wiking;D15:04
@wikingi cannot unscubscribe15:04
@wiking*unsubscribe15:04
geektonilol15:04
@wikingand if my subscriber is fucked up15:04
@wikingthen i need to create a new obj15:04
geektonii guess we need to add an helper to SGObject15:04
@wikingyes15:04
@wiking:)15:04
@wikingthis is all then15:06
@wiking:)15:06
@wikingthnx for coming around15:06
@wikingi'll share u the reactjs app when its ready15:06
@wiking:P15:06
geektonicool! Looking forward to seeing it ;)15:07
@wikingman15:08
@wikingi'm super suprised15:08
@wikingthat this works15:08
@wikinglook at this15:08
@wikingvar JSParamObserver = Module.ParameterObserverInterface.extend("ParameterObserverInterface", {15:08
@wiking    // __construct and __destruct are optional.  They are included15:08
@wiking    // in this example for illustration purposes.15:08
@wiking    // If you override __construct or __destruct, don't forget to15:08
@wiking    // call the parent implementation!15:08
@wiking    __construct: function() {15:08
@wiking        this.__parent.__construct.call(this);15:08
@wiking    },15:08
@wiking    __destruct: function() {15:08
@wiking        this.__parent.__destruct.call(this);15:08
@wiking    },15:08
@wiking    on_next: function(v) {15:08
@wiking        if (v.value().get_string("name") == "bias") {15:08
@wiking            console.log(`got ${v.value().get_any().asDouble()}`);15:08
@wiking        } else if (v.value().get_string("name") == "w") {15:08
@wiking            console.log(`got ${v.value().get_any().asRealVector()}`);15:08
@wiking        }15:08
@wiking        15:09
@wiking    },15:09
@wiking    on_error: function() {15:09
@wiking        console.log("error");15:09
@wiking    },15:09
@wiking    on_complete: function() {15:09
@wiking        console.log("complete");15:09
@wiking    },15:09
@wiking});15:09
@wikingthis is a js observer15:09
@wikingfor shogun objects15:09
@wikingand it works!15:09
@wiking:)15:09
geektoniI am a bit surprised too!15:10
@wikingwasm man wasm15:10
@wiking:)15:10
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]15:11
geektonisince I've never tested the idea of coding observers in a target language != C++15:11
-!- geektoni [973e46de@gateway/web/freenode/ip.151.62.70.222] has quit [Ping timeout: 256 seconds]15:15
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun15:18
-!- mode/#shogun [+o wiking] by ChanServ15:18
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 268 seconds]15:23
-!- wiking [~wiking@2001:67c:10ec:5784:8000::3ff] has joined #shogun15:26
-!- wiking [~wiking@2001:67c:10ec:5784:8000::3ff] has quit [Changing host]15:26
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun15:26
-!- mode/#shogun [+o wiking] by ChanServ15:26
-!- wiking_ [~wiking@bmi-airport-1.inf.ethz.ch] has joined #shogun16:59
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 240 seconds]17:02
-!- wiking_ [~wiking@bmi-airport-1.inf.ethz.ch] has quit [Remote host closed the connection]17:44
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun17:56
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host]17:56
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun17:56
-!- mode/#shogun [+o wiking] by ChanServ17:56
-!- wiking [~wiking@huwico/staff/wiking] has quit [Client Quit]17:56
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun18:32
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host]18:32
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun18:32
-!- mode/#shogun [+o wiking] by ChanServ18:32
-!- HeikoS [~heiko@108.pool85-52-163.static.orange.es] has joined #shogun21:57
-!- mode/#shogun [+o HeikoS] by ChanServ21:57
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun22:31
-!- wiking [~wiking@huwico/staff/wiking] has quit [Read error: Connection reset by peer]22:31
-!- HeikoS [~heiko@108.pool85-52-163.static.orange.es] has quit [Ping timeout: 246 seconds]23:00
--- Log closed Thu Mar 28 00:00:11 2019

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