IRC logs of #shogun for Thursday, 2019-03-28

--- Log opened Thu Mar 28 00:00:11 2019
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection]02:52
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun04:45
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host]04:45
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun04:45
-!- mode/#shogun [+o wiking] by ChanServ04:45
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]04:54
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun05:10
-!- mode/#shogun [+o wiking] by ChanServ05:10
-!- gf712 [90520868@gateway/web/freenode/ip.144.82.8.104] has joined #shogun09:04
-!- HeikoS [~heiko@120.pool85-52-163.static.orange.es] has joined #shogun09:09
-!- mode/#shogun [+o HeikoS] by ChanServ09:09
@HeikoSgf712:  yo09:41
-!- HeikoS [~heiko@120.pool85-52-163.static.orange.es] has quit [Ping timeout: 245 seconds]09:47
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has joined #shogun10:08
gf712wiking: ping11:48
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has quit [Quit: Page closed]11:49
@wikingpongi12:05
@wikinggf712: sup12:05
gf712wiking: do you think it makes sense to implement a constant iterator for sgvector?12:06
@wikingmmm dunno12:06
gf712using iterators to rewrite the parameter trees12:06
@wikingbut i would start with display_vector/matrix dropping12:06
@wikingif u touch that12:06
@wiking:D12:06
gf712and I use const vectors12:06
@wikingthen just add cbegin/cend12:06
@wikingshould be straightforward12:07
@wikingalthough you can directly access .vector12:07
@wikingand do whatever12:07
@wikinglike std::cbegin(sg_vector.vector)12:07
@wikingright?12:07
gf712true, that should work12:07
@wikingand u haz then the citerator12:07
gf712I just copy pasted iterator12:08
gf712added const12:08
gf712in pointer and ref12:08
gf712and then called it const_iterator :D12:08
@wiking:>12:08
@wikingmagic12:08
gf712what do you mean with dropping display btw?12:08
gf712it is useful no?12:09
@wikingto_string plz :)12:09
@wikingthis is bs that this thing writes to stdout :)12:09
gf712ah right12:10
gf712yeah I'll do that12:10
@wikingta12:11
@wikingfucking react doesn't wanna play as nicely as imageined12:11
@wikingstill working on the demo12:11
@wikingbut at least it works12:11
@wikingthe shogun.js is 10M in release mode12:11
gf712haha, that is a lot...12:19
gf712is this with swig?12:19
@wikingno12:19
@wikingnative js12:19
@wikingi mean wasm12:19
gf712ah ok, and does stuff work fine?12:23
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]12:26
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun12:42
-!- mode/#shogun [+o wiking] by ChanServ12:42
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]12:44
-!- wiking [~wiking@inf-ise-etx-dock-1-111.ethz.ch] has joined #shogun12:47
-!- wiking [~wiking@inf-ise-etx-dock-1-111.ethz.ch] has quit [Changing host]12:47
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun12:47
-!- mode/#shogun [+o wiking] by ChanServ12:47
-!- gf712 [90520868@gateway/web/freenode/ip.144.82.8.104] has quit [Ping timeout: 256 seconds]13:40
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]13:57
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:07
-!- mode/#shogun [+o wiking] by ChanServ14:07
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 240 seconds]14:11
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun14:15
-!- mode/#shogun [+o wiking] by ChanServ14:15
-!- gf712 [90520868@gateway/web/freenode/ip.144.82.8.104] has joined #shogun14:21
@wikinggf712: yo\14:23
@wikinghgere?14:23
@wiking*here?14:23
gf712wiking: yes, here14:24
@wikingok so14:24
@wikingmiju miju14:24
@wikingstd::map<std::string, std::shared_ptr<const AnyParameter>> get_params() const;14:24
@wikingdo you mind if i change this top14:24
@wikingstd::map<std::string, std::shared_ptr<const AnyParameter>> get_params(bitmask = -1) const;  where -1 = all14:25
@wikingi just want to have a predicate filter14:25
@wikingfor this14:25
gf712ah I did that on what I am working on14:25
gf712so yea go for it14:25
@wikingbtw14:25
@wikingEGradientAvailability EModelSelectionAvailability is still in the codebase14:26
@wikingany reason? :)14:26
gf712but all would be a combination of all enums no, rather than -1?14:26
gf712not sure14:26
gf712model selection stuff I guess?14:26
@wikingmmm ah oldstuff14:26
@wikingok14:26
@wikingwhich shoudl go anyways14:26
@wikingand then we can drop it14:26
@wiking:)14:26
gf712yes, working on that now14:27
@wikingok but how i *generate* all the combination14:27
@wikingeither we have a value or there's a function for it?14:27
@wikingbut i'm not so sure if i can do14:27
gf712you would have to do a bit shift in each position of the bitmask14:27
@wikingfunc(arg = func())14:28
@wikingwhere func generates the whole thing :)14:28
@wikingbtw14:28
gf712you can also add it to the enum no?14:28
gf712have a ALL14:28
@wikingif enum class then why not inherit from uint64_t ?14:28
@wikingyes yes i can14:28
@wikingi mean i've just taken a random special value :)14:29
gf712because it fits in int and I let the compiler choose14:29
@wikingheheh14:29
@wikingok14:29
gf712but you can inherit from uint64_t?14:29
@wikingyes14:29
gf712probably 32 is enoght14:29
gf712enough though14:29
@wikingstd::<whathever basetype>14:29
@wikingok any how14:29
@wikingi'll just add ALL14:29
@wikingthat flips all the bits14:29
gf712yup, in that case you need to know how many bit you have14:30
gf712so yea just inherit from some base type14:30
@wikingi wonder if this will work ALL = std::numeric_limits<std::uint32_t>::max()14:32
@wiking:)14:32
gf712yup, that should be it14:34
@wikingmmm14:36
@wikingbut i think14:36
@wikingAnyParameter.get_properties should have a default arged filter as well14:36
@wiking:)))14:36
@wikingor no likey?14:36
@wikingah ok14:36
@wikingno14:36
@wikingit wont be nice14:36
@wikingnvm14:36
@wikingthis just feels argh14:37
@wikingif (each.second.get_properties().has_property(param))14:37
@wikingok compile from scratch14:38
gf712haha yes, it is a bit verbose14:42
@wikingneed map/reduce operator :)14:42
@wikingok so because i wanna do this in js14:42
@wikingvar params = model.get_params(HYPER);14:42
@wikingand then i can autogenerate the whole param on the page for the given object14:43
@wikingso then whatever object you just choose to use14:43
@wikingthe sliders and checkboxes are autogeenrated14:43
@wiking+ the description14:43
@wiking;)14:43
@wikingonly shit14:43
@wikingthat we dont have range yet14:44
@wikingi mean that describes what the meaningful range for the given param14:44
gf712oh right, yes that is good14:45
@wikingso i imagine to have a dropdown menu14:45
@wikinglike binary classifiers14:45
gf712what do you mean there are no ranges?14:45
@wikingand then you choose your model14:45
@wikingand then boom14:45
@wikingall the HYPER params are there for you to control via the ui14:45
@wikingwell interval14:45
@wikingso say the the of the HYPER is bool14:45
gf712you mean a range for each param?14:45
@wikingthen ok i create a simple checkbox14:45
@wikingor a switch14:46
@wikingbut if it's double or int14:46
gf712right14:46
@wikingand i put a slider14:46
@wikingwhat's the min and max of the slider?14:46
gf712-999999999999 to +99999999999914:46
gf712:D14:46
@wiking:>>>14:46
@wikingright14:46
@wiking:)14:46
@wikingbut see what i mean right?14:46
gf712why slider though?14:46
@wikingwhat would you put?14:46
gf712should just write a value?14:46
@wikinga freetext?14:46
@wikingnooooo14:46
@wikingthat's not UI14:46
@wikingthat's code14:46
@wiking:D14:46
gf712hmmm14:46
gf712but sliders are so painful :(14:47
gf712imagine you want 1.0000114:47
@wikinggf712: https://material-ui.com/lab/slider/#simple-slider14:47
@wikinggf712: yeah then you dont use a react app14:47
@wikingfor training an ml model14:47
@wiking:)))14:47
gf712haha fair enough14:47
@wikingbut i can do like14:47
@wikingif it's int/double14:47
@wikingthen slider + input field14:47
@wikingand then the input field changes by the value of slider14:47
gf712it's just very algo dependent I think14:48
@wikingbut you can click in there and just write what u want14:48
@wiking;P14:48
@wikingwhat ?14:48
@wikingis dependent14:48
gf712what if it is a regularisation param14:48
gf712it'll be a tiny value14:48
@wikingwell14:48
@wikingthat's the shit part14:48
@wikingwe dont have range14:48
@wiking:)14:48
@wikingtype<double, min, max> eparam14:48
@wikingor something like this14:48
@wiking:)14:48
gf712hmmm yes14:48
gf712you can always have a log scale slide14:48
@wikingstan-mc has this14:49
@wikingi mean vars14:49
@wikingthat have these properties14:49
@wikingbut yeah first thigns first14:49
@wikinglemme finish up the demo14:49
gf712aight!14:49
@wikingbut around 6am14:49
@wikingi've managed to import the shogun.js into the react env14:50
@wiking:D14:50
gf712haha, I am not sure how difficult that is since I don't write any js, but good :D14:51
@wikingyeah i had like a js+wasm file14:51
@wikingand i was getting weird magic errors14:51
@wikingthat i didn't even understoo14:51
@wikingd14:51
@wikingso then i realised that i can just create one file for all14:51
@wikingshogun.js = 10 megz14:51
@wikingfuck it14:51
@wiking:)14:51
@wikingworks14:51
@wikingwe'll need a cdn for this14:52
@wikingonce it's fully working14:52
@wiking:D14:52
@wiking ah fuck14:52
@wiking   'Cannot call CSGObject.get_params due to unbound types: NSt3__23mapINS_12basic_stringIcNS_11char_traitsIcEENS_9allocatorIcEEEENS_10shared_ptrIKN6shogun12AnyParameterEEENS_4lessIS6_EENS4_INS_4pairIKS6_SB_EEEEEE',14:52
@wiking:D14:52
@wikingi need to fucking fix this :D14:52
gf712what is this? :D14:55
gf712ah because it's a shared_ptr?14:55
gf712how does it even work with maps and smart pointers?14:57
@wikingyes yes14:58
@wikingman14:58
@wikingthis shit works with anything14:58
@wiking:)14:58
@wikingi mean llvm14:58
@wikingwhat you expect14:58
@wiking:)14:58
@wikingif llvm supports it :D14:58
gf712ahhh right, that's cool14:58
@wiking(didn't u see that i can inherit from a c++ class in js? :)14:58
@wikingif that's supported14:58
@wikinga stupid std::map is the least of the problems14:59
@wiking:D14:59
gf712but that's just for js right?14:59
@wikingyes :)14:59
@wikingunfo yes14:59
gf712lol, how do these things even work in the backend??14:59
gf712lots of demangling of llvm symbols I guess15:00
@wiking> ll.get_params()15:00
@wikingParameterMap {}15:00
@wikingyey15:00
gf712nice15:00
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has joined #shogun15:01
@wikinggeektoni: y015:01
geektoniwiking: hello hello15:01
@wikinggeektoni: u worked with react b4?15:01
@wikinggf712: hhahaha bindings i have a libtooling tool for15:02
@wikingas otherwise you have to do manually shit like this15:02
@wikinghttps://emscripten.org/docs/porting/connecting_cpp_and_javascript/embind.html#embind15:02
geektoniwiking: No, I've never used it :/15:02
@wikinggf712: ha!15:05
@wikingwe have a problem15:05
gf712oh :D15:05
@wiking> var ll = new shogun.LibLinear()15:05
@wikingundefined15:05
@wiking> var params = ll.get_params(shogun.ParameterProperties.HYPER)15:05
@wiking> var x = params.keys()15:05
@wiking> x.size()15:05
@wiking215:05
@wiking> x.get(0)15:06
@wiking'C1'15:06
@wiking> x.get(1)15:06
@wiking'C2'15:06
@wikingi mean it works15:06
@wikingbut man why only these 2 params are HYPER?15:06
gf712because someone has to do this manually15:07
gf712wiking: someone needs to choose these things15:07
gf712in the whole of shogun15:07
@wikingepsilon and bias is not hyper?15:07
@wikingi mean i guess it should be or? :D15:07
gf712I just did the ones that were already there15:07
gf712it should be15:07
@wikingjsut wrong registration15:08
@wikingor anybody has an objection15:08
@wikingfor why those wouldn't be hyper params?15:08
@wikinggeektoni: any opinion? :D15:08
gf712I think there are lots more that should be hyper15:08
@wikingyep ok15:09
@wiking:)15:09
@wikingit'll come out with this app15:09
@wikingfor sure15:09
geektonigeektoni: any opinion on?15:09
@wikingand as well what sort of bs decriptions we have :))15:09
@wikinggeektoni: whether epsilon and use_bias is a HYPER of LibLinear :)15:10
@wikingbut it should be15:10
@wiking:D15:10
geektoniwiking: ideally they should be15:11
gf712wiking: yea someone needs to go through the whole codebase and update descriptions and all those flags..15:19
@wikinggf712: for put16:17
@wikingin python you did the dispatcher?16:17
@wikingso say i have sgobject.put("param", value)16:17
@wikingsince the that put is templated... i guess there needs to be some dispatching or?16:18
gf712wiking: i am not sure I understand the question?16:35
@wikingok 2 things in the meanwhile16:36
@wikingfor the enum<->string16:37
@wikingyou did the string->enum right?16:37
@wikingso back to the put16:37
@wikingso we have this in CSGObject16:37
@wikingtemplate <class T,16:38
@wiking      class X = typename std::enable_if<is_sg_base<T>::value>::type,16:38
@wiking      class Z = void>16:38
@wikingvoid put(const std::string& name, T* value)16:38
@wiking{16:38
@wikingput(Tag<T*>(name), value);16:38
@wiking}16:38
@wikingso to support16:38
@wikingput("kernel", CKernel) and put("C1", 1.0)16:38
@wikingi guess there's a dispatching right?16:38
gf712put("C1", 1.0) uses a different template16:39
gf712but yes16:39
gf712uses dispatching16:39
@wikingbut that is taken care by swig?16:41
@wikingdamn16:42
@wikingthat wont work in js16:42
@wiking:(16:42
@wikingas the overloading of a function is based on the number of args... not the types :(16:43
@wikingfikfak16:43
gf712well, kinda, you need to template the templated function16:45
gf712I.e. %template(put) put<int,int>16:45
@wikingyep16:45
gf712function template* even :[16:45
gf712:p16:45
@wikingi can do similar stuff emscripten but...16:46
@wikingas said num of args will cut it16:46
@wikingand since the num args doesn't change but the type16:46
@wikingi'll have to do16:46
@wikingputInt16:46
@wikingputFloat16:46
@wikingetc16:46
gf712ah right16:46
@wikingand i think even then i might run into troubles16:46
gf712how does swig do it in the backend16:46
gf712because it needs to solve that issue no?16:47
@wikingyeah16:47
@wikingyou can check the cxx code16:48
@wikingbasically a huge dispatch16:48
@wiking:)16:48
gf712so you can do that :D16:48
gf712or is it not possible?16:48
@wikingmmm not with embind16:50
gf712but in the front end you can have that dispatch in js?16:53
gf712i.e. check type of put16:53
gf712and then dispatch to putInt?16:53
gf712so frontend just has put...16:53
@wikingmmm16:53
@wikingidk16:53
@wikinghave to see16:53
@wikingbut i guess there's a good reason why the binder cannot do it16:53
@wikinganyhow i just wanna generate now the iface first16:54
@wikingas now i have the hyper params :))))16:54
@wikingamazing :D16:54
@wikingwelcome to 2019 :)16:54
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has quit [Ping timeout: 256 seconds]16:55
gf712haha16:56
gf712tbh most scalars in shogun should be hyper param no?16:56
gf712and then can work backwards from there...16:56
@wikingyes17:04
@wikingargh17:06
@wikingi hate init_with...!@#$17:06
@wikingneed to replace that with a static class17:06
gf712init_with?17:18
@wikingthe global func17:38
@wikinggf712: the stuff without shogun doesn't even work :)17:43
gf712oh right, the thing that starts the env and stores all the sg_*17:44
@wikinges17:44
@wikingyes17:44
gf712you want to replace with a static map?17:44
@wikingthat can be replaced by a global static class17:44
@wikingjust add a class17:44
@wikingthat contains all of this17:44
@wikingcall it env17:44
@wikingor something and that's it17:44
@wikingenv()->whatever17:44
@wiking:)17:44
gf712sounds simple :D17:45
@wikingyep it is17:45
@wikingbut then we can avoid having this17:45
@wikinginit_with17:45
@wikingand exit_shogun17:45
@wikingbs17:45
@wikingbut now i fail to run a simple for loop in js17:45
@wiking:D17:45
@wikingso i have even more simpler problesm in life17:45
@wiking:)))))17:45
gf712haha17:46
gf712hopefully there will be GSoC students that can do that, or ill have a look at some point17:46
@wikingfor the for loop? :)17:46
gf712no the static class17:46
gf712for loop I can't help :D17:47
@wikinggf712: something like this what do u think: https://pastebin.com/wXVv2qLN17:47
@wikingthis of course requires 2 new elements in an enum class17:47
@wikingFirst and Last17:47
gf712is this to replace the enum class?17:48
@wikingno17:48
@wikingthis is just an iterator for enum class17:48
gf712looks neat17:48
@wikingso that you can iterate through the element of an enum claas17:49
gf712but you need to use using :D17:49
@wikingthe thing is17:49
@wikingthat i would like to have more and more17:49
gf712typedef is too weird17:49
@wikinghahaha17:49
@wikingC9917:49
@wikingshould work17:49
@wiking:)17:49
@wikingok so i wanna have something like to_string()17:49
@wikingfor AnyParameterProperties17:49
@wikingand there i would need somethign like this17:49
gf712right, makes sense17:50
@wikingto iterate through the values and tell if something is set tur17:50
@wiking*true17:50
@wikingyeah we miss a lot of to_string()17:50
@wikingthose then can be mapped later for other interface toString to_string string functions17:50
@wikinggood for debugging in that language17:50
gf712yup17:50
gf712using it right now!17:50
@wikinghehehe17:50
@wikingi mean of course lldb is cool as well17:50
@wikingbtw if you debug anything in any.h17:51
@wikinguse lldb17:51
@wikinggdb blows up and takes a long time for me17:51
@wikingto be able to set breakpoints in any.h17:51
@wiking:)17:51
gf712ah good to know17:51
@wikingyeah lldb ftw17:51
gf712same with sg_any_dispatch17:51
@wikingbut then it does some strange things17:51
@wikingwith vars17:51
gf712too many function templates17:51
gf712takes a while17:51
@wikinga lot of times it cannot give me the values17:51
@wikingyeah17:51
@wikinglldb handles that better17:51
@wikingworks PERFECTly on osx17:51
gf712yup17:51
@wikingbut on linux the lldb (even latest) does some weird stuff with vars17:52
gf712never tried it on linux17:52
@wikingsometimes17:52
@wikingyeah on donbot i do debugging17:52
@wikingand gdb is just crazy with those headers17:52
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection]18:06
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has joined #shogun18:20
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun18:23
-!- mode/#shogun [+o wiking] by ChanServ18:23
@wikingmmmm18:23
@wikingswig 4.0 has been released...? 8)18:23
@wikingnoup18:24
@wikingbut there's docs18:24
@wikinghttp://www.swig.org/Doc4.0/SWIGDocumentation.html#CONTENTS18:24
gf712wiking: they started updating lots of stuff18:25
gf712I have tried it out a bit but I had some issues with shogun18:25
gf712wiking: https://github.com/swig/swig/blob/master/CHANGES.current18:27
gf712lots of updates in the past few months18:28
-!- geektoni [5d22ef24@gateway/web/freenode/ip.93.34.239.36] has quit [Quit: Page closed]19:00
@wikinggf712: have u went into to_string for sgvect/matrix19:09
@wiking?19:09
@wikingif not then dont19:09
@wikingif yes then i dont do it19:10
-!- gf712 [90520868@gateway/web/freenode/ip.144.82.8.104] has quit [Ping timeout: 256 seconds]19:11
-!- raulsierra97 [51ca9a30@gateway/web/freenode/ip.81.202.154.48] has joined #shogun19:32
-!- raulsierra97 [51ca9a30@gateway/web/freenode/ip.81.202.154.48] has quit [Client Quit]19:32
--- Log closed Fri Mar 29 00:00:13 2019

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