IRC logs of #shogun for Thursday, 2018-06-07

--- Log opened Thu Jun 07 00:00:39 2018
-!- HeikoS [~heiko@host86-128-122-106.range86-128.btcentralplus.com] has quit [Quit: Leaving.]00:26
wuweihi, seems this doesnt work?04:28
wuweihttps://github.com/shogun-toolbox/shogun/blob/94c093bf640ccc52a36f2cd59e9faeabdbfb0bd4/cmake/external/GoogleTestNMock.cmake#L604:28
wuweiappveyor are throwing a lot of warnings04:28
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun08:26
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]09:03
@wikingwuwei, that came from a google test issue09:09
wuweiwiking: yeah09:10
wuweiwe should also add that flag to unittest build09:10
wuweii sent a pr09:10
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun09:11
@wikingmergec :)09:32
@wikingi'm looking into our sgio stuff09:33
@wikingi'm thinking of changing it significantly :)09:33
-!- sukey [~nodebot@ks312251.kimsufi.com] has joined #shogun09:33
-!- mode/#shogun [+o sukey] by ChanServ09:33
@wikingsukey, flip09:35
@sukey(/?? ? ?)/? ~ ???09:35
@sukey[https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/2f2db5a280eb2bb28730ceaf4d22965fb6d38cd0 by vigsterkr11:04
-!- HeikoS [~heiko@host86-128-122-106.range86-128.btcentralplus.com] has joined #shogun11:54
-!- mode/#shogun [+o HeikoS] by ChanServ11:54
-shogun-buildbot:#shogun- Build deb4 - python3 #448 is complete: Success [build successful] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/44811:59
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 opened by karlnapf12:14
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/433312:15
@HeikoSshubham808: hi12:16
@HeikoSwhat did you want to ask yesterday?12:16
shogitter(shubham808) :)12:19
shogitter(shubham808) Switched to shogitter for a while12:20
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]12:21
shogitter(shubham808) I was asking about the test that Toni suggested to check if state is updated12:21
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun12:22
@HeikoSshubham808: what test was that_12:23
@HeikoS?12:23
shogitter(shubham808) We train a model A to 10 iterations but give a callback to stop at 512:25
shogitter(shubham808) Then we train a model B to only 5 iters12:25
shogitter(shubham808) And compare results12:25
@HeikoSi see12:30
@HeikoSwhat does it test?12:30
@HeikoSah12:30
@HeikoSyou set number of iterations to 5 in the second one?12:30
shogitter(shubham808) Yes :)12:31
@HeikoSwhat do we test with that?12:32
@HeikoSExample of a failing test12:32
@HeikoS?12:32
@HeikoSwe check that stopping training leaves the model in a state that is "completed" (which we assume that it is after training is fully completed)12:32
@HeikoSyeah I think it is good12:32
shogitter(shubham808) Yeah exactly12:33
@HeikoSfor the perceptron, before your patch with the w, this would have caught it12:33
@HeikoSbecause running training for 5 iterations explicitlz would have updated the w12:33
@HeikoSbut stopping in between wouldnt12:33
@HeikoSgood!12:33
@HeikoSdo it ;012:33
shogitter(shubham808) Alright12:33
@HeikoSwiking: hey12:34
@HeikoSshubham808: I made a few comments on the progress PR12:35
@HeikoSit is almost ready12:36
@HeikoSjust had a few questions12:36
shogitter(shubham808) Okay I will check it12:39
-!- travis-ci [~travis-ci@ec2-54-204-134-146.compute-1.amazonaws.com] has joined #shogun13:01
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/38915061913:01
-!- travis-ci [~travis-ci@ec2-54-204-134-146.compute-1.amazonaws.com] has left #shogun []13:01
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has joined #shogun13: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/38915061913:18
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has left #shogun []13:18
@HeikoSlisitsyn: jo13:39
lisitsynHeikoS: hey13:39
@HeikoSlisitsyn: can I put something on your TODO list ? :D13:39
lisitsynyes sure13:39
@HeikoSlisitsyn: get -> lazy function13:39
lisitsynah this one13:39
lisitsynok13:39
@HeikoSneed it in a few places13:39
lisitsynalright13:40
shubham808HeikoS: hey13:41
@HeikoSshubham808: hi13:41
@HeikoSlisitsyn: can you give an ETA? :)13:41
lisitsynHeikoS: no13:41
shubham808about format independence(and filename) in the helper pr13:41
lisitsyn:D13:41
@HeikoSlisitsyn: nooooooooooo13:42
lisitsynhave long weekend this week but we'll see13:42
@HeikoSsure13:42
@HeikoScool13:42
@HeikoSshubham808: yes?13:42
shubham808how about13:42
shubham808a set_serialization_type()13:42
shubham808then we could go like set_serialization_type(new CSerializableHdf5)13:43
@HeikoSshubham808: no need for a setter13:43
@HeikoSwe have "put"13:43
@HeikoSjust add a member13:43
@HeikoSm_serialization_file13:43
@HeikoSm_serialization_filename13:43
shubham808we just put them13:44
shubham808yeah13:44
@HeikoSand initialize them to something meaningful in constructor13:44
@HeikoSand then the user can use put13:44
@HeikoSin fact13:44
@HeikoSno need for filename13:44
@HeikoSas the file contains the filename13:44
shubham808contains the filename ?13:44
@HeikoSshubham808: yes13:47
@HeikoSif you construct a file, you need to give it a filename13:47
shubham808aah i see13:47
shubham808ofcourse13:47
@HeikoSe.g. explicit CSerializableAsciiFile(const char* fname, char rw='r');13:47
shubham808cool13:49
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 synchronized by karlnapf13:56
wuweiwiking: hi13:56
@wikingwuwei, hihi14:14
wuweiwiking: do u have any idea for ngraph, on how type info is propogated?14:15
@wikingwell :) you know that it has element::f32 etc14:19
@wikingand then basically it does nothing else but writing a c code :)14:19
@wikingso you do this14:19
@wikingbackend::create_tensor(element::f32, Shape)14:19
@wikingthis will get you a float32 tensor14:19
@wikingand over this you do the operations14:19
@wikingbut any operations over this is typeless.... right ? :)14:20
wuweiyeah14:20
@wikingbecause the variable has already been created14:20
@wikingbut i remember14:20
@wikingfor dot product14:20
@wikingthere was a typecheck14:20
@wikinglemme just see14:20
wuweii saw some get_element_type14:21
wuweiin this case don't we need to do a switch14:21
@wikingyeah14:26
@wikingthis approach we wouldn't need it14:27
wuweii see, let me think again :)14:28
@wikinghave you tought about the tensor return value? :)))14:29
@sukey[https://github.com/shogun-toolbox/shogun] Issue https://github.com/shogun-toolbox/shogun/issues/4334 opened by karlnapf14:30
wuweiyeah, u want returning a tensor containing some values14:30
@wikingHeikoS, ping?14:30
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]14:30
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun14:31
wuweican a tensor contain value of differnet type, or ?14:31
@HeikoSwiking: pomg14:31
@wikingpm14:31
@wikingwuwei, do we have such a case when the return value (matricies) would be different types?14:32
wuweicomplex dot ?14:33
@wikingyeah but that's about14:34
@wikingR dot(R v1, R v2)14:34
@wikingwhere R is vector<complex >14:34
@wikingright?14:34
@wikingsorry14:34
@wikingcomplex dot(complex v1, complex v2)14:34
@wikingbut that's a differnet story we already knew that it has to have special cases14:34
wuweiyeah14:34
wuweii'm not sure if i get your idea, tensor is for stacking multiple matrix/vector as return value ?14:35
@wikingso ok14:35
@wikingone step back14:35
@wikingso now we have this messy interface for linalg::14:35
@wikingpartly because of the fact of typed containers14:35
@wikingSGVector<T> and SGMatrix<T> right?14:35
wuweiyeah14:36
@wikingnow if we would drop the type then things could get clearer14:36
@wikingbut still there would be an ever growing interface14:36
@wikingof the linalg backend14:36
@wikingit'd be14:36
@wikinglinalg::dot(), linalg::add_scalar, linalg::svd etc14:36
@wikingright?14:36
wuweisince the backend is typed?14:37
@wikingso either we woudl need to predefine the all the functionalities14:37
@wikingfor the interface of the backend14:37
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]14:37
@wikingor that would be just as now an ever amendable thing14:37
@wikingthat changes over time14:37
@wikingbecause we didn't have qr decomposition added to the linalg interface14:38
@wikingbecause we didn't needed it14:38
@wikingbut one day we realise we need it14:38
@wikingand so on14:38
@wikingi mean just check the linalgnamespace14:38
wuweiyeah14:38
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun14:39
wuweiwe are adding new interface to linalg and invoke Eigen/viennacl backend14:39
@wikingyeah14:40
@wikingso this is like gonna change every time somebody needs a new thing14:40
@wikingand then you break the ABI (in a way)14:40
@wikingbecause the Backend now has new and new virtual methods14:40
@wikingthat the specific backend has to implement right?14:40
wuweiyeah14:41
wuweion the other hand, if we predefined some basic ops, like add/mul, then we will need to implement those ourselves14:41
@wikingok so in case of ngraph14:41
@wikingthings are a bit nicer14:42
@wikingwith the Function object14:42
@wikingas then you have just 1 virtual method14:42
@wikingapply(function, input, output)14:42
@wikingright?14:42
wuweiyeah14:42
@wikingok so but14:43
@wikingthen comes the other problem14:43
@wikingif we would want to follow this approach14:43
@wikingthat what would be output when the function is a matrix decomposition14:43
wuweiis creating a function instance every time a problem to take care14:43
@wikingso say if you get a matrix14:43
@wikingand you wanna do svd over it14:44
@wikingwhat would be the output14:44
@wikingif you only have this apply(function, input, output)14:44
@wiking?14:44
@wikingor would apply would be14:44
@wikingapply(function, input, vararg()?14:44
wuweioutput should an array of matrix?14:45
wuweiin ngraph that's a vector14:45
@wikingi mean in case of ngraph14:50
@wikingyou have a tensor as in/out14:50
@wikingright/.14:50
@wikingthis would still work for matrix decomposition14:51
@wikingit would be a bit tricky14:51
@wiking'ugly'14:51
@wikingbut still you could say14:51
@wikingyou store the decomposition in an a tensor14:51
@wikingand then then you have a predefined order in that array14:52
@wikingfor the specific matrix14:52
@wikingwuwei, see what i mean?14:52
wuweii see14:52
@wikingbut i guess the same could be done14:53
@wikingif we put the output as a vararg? :)14:53
@wikingso it's something like14:53
@wikingapply(function, input, ...)14:53
@wikingor?14:53
wuweiwhat if you have a matrix and a vector as return value?14:53
@wikingin tensor it should work, or?14:53
wuweiyeah varargs can work14:54
wuweihow tensor works in this case14:54
@wikingthere you can have anything right?15:01
@wikingi mean it's an ndarray in a way15:01
wuweiyeah it's an ndarray15:02
@wikingso there you can store anything right15:03
@wikingmatrix, vector, vector, matrix :)15:03
wuweiwhat's the shape of the tensor, say if you have  a 2x2 matrix and a 3x1 vector15:03
wuweii'm not sure if i understand right15:03
@wikingjust a sec15:07
@wikingsorry got held up in shit15:08
@HeikoSwiking: btw watned to have some opinions15:09
@HeikoSyou have a minute?15:09
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 merged by karlnapf15:10
@sukey[https://github.com/shogun-toolbox/shogun] karlnapf pushed 2 commits:15:10
@sukeyhttps://github.com/shogun-toolbox/shogun/commit/c75f457650b25d4792917de2cbe686c725b72d1615:10
@sukeyhttps://github.com/shogun-toolbox/shogun/commit/18781905d85b4f4df2f4128732929229c5ea8f6315:10
@wikingyep hgere15:10
@HeikoSwiking: it is about updating the state of models during training15:10
@wikingHeikoS, btw that pr is totally not ok on my side :)15:10
@wiking4330 that is...15:11
@HeikoScurrently we dont have a proper way to update model state during training15:11
@HeikoSbasically the dev can do whatever15:11
@wikingproper meaning?15:11
@HeikoSas in15:11
@HeikoSevery iteration is guaranteed to have updated the state15:11
@HeikoSiteration number is trackable from outside15:11
@HeikoSconvergence state15:11
@HeikoSetc15:11
@wikingi guess its up the discretion of the developer15:11
@HeikoSall this is hidden in local vars15:11
@HeikoSso e.g. when we stop training15:12
@HeikoSit might be lost15:12
@HeikoSactually, the only way to even know iteration number currently is via progress bar15:12
@HeikoSI think that is weird15:12
@HeikoSand also asking for errors15:12
@HeikoSit is even hard for us to test whether a prematurely stopped model is in a usable state15:13
@HeikoSall indirect15:13
@HeikoSso I was thinking, maybe it would be good idea to have something in CMachine (or subclass) to deal with this15:13
@HeikoSin a generic fashion15:13
@HeikoSfor iterative algorithms15:13
@HeikoSsomething like a call that updates iteration counter, convergence stats, list of updates model vars, etc15:14
@HeikoSbecause then we can easily check whether that was called15:14
@HeikoSlisitsyn: ^15:14
@HeikoSshubham808: ^15:14
@wikingwhy dont you hold an unordered_map<Tag/whateverkey, std:: std::reference_wrapper<T>>15:14
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]15:15
@HeikoSyeah something like this I had in mind15:15
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun15:15
@wikingand then predefine a set of keys15:15
@wikingthat are common15:15
@HeikoSbut it is a strong thing to do: forcing devs to serve such an interface15:15
@wikingif you wanna avoid this15:16
@HeikoSbut yeah imo doing all this in local vars doesnt really allow to do the black box stuff we have in mind15:16
@wikingthen you can do a15:16
@wikingtrain_iteration(function)15:16
@wikingand basically the function is what the developer needs to implement15:16
@wikingthat does all the mumbo jumbo15:16
@wikingfor that specific model15:17
@HeikoSyeah15:17
@HeikoSso we are talking about introducing another base class15:17
@wikingand he can access certain variables15:17
@wikingIterativeMethod15:17
@wikingor IterativeMachine15:17
@wikingbut this is not a base class15:17
@wikingat least it does not need to be explicitly exposed apart for the c++ interface15:18
@wikingas it would only have one pure virtual function15:18
@wikingthat needs to be implemented by derived classes15:18
@HeikoScool, will think a bit about this15:19
@wikingthe only question is that whether all the corner cases you could cover with such an IterativeMachine15:20
@wikingone would hope yes15:20
@HeikoSyeah there is lots of things that might cause headaches15:20
@wikingand then you just need to implement "what's in the for loop"15:20
@HeikoSbut generally, this would be nice as we can just implement the main loop once15:20
@wikingbut i doubt that it'd be so easy :)15:20
@HeikoSforces using the parameter framework15:21
@HeikoSokok15:21
@HeikoSill grab lunch now, thx15:21
@wikingbut i mean if you just have a map15:21
@wikingthat stores all these references15:21
@wikingthat should be fine as well15:21
@wikingas that could be monitorable15:21
@wikingof course that is more burden on us when adding a new method15:22
@wikingwuwei, here?15:22
@wikingwuwei, before i forget15:23
@wikingi've restarted the travis jobs for the exception story15:23
wuweiyeah15:23
@wikingi guess all of them are failing because of timeout15:23
@wiking:)15:23
-!- wiking [~wiking@huwico/staff/wiking] has left #shogun ["Leaving"]15:23
wuweiwiking: anything you wanna change in that pr?15:24
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun15:24
-!- mode/#shogun [+o wiking] by ChanServ15:24
@wikingwuwei, i'll just merge it into feature/transformers15:24
@wikingand then you can rebase and add fixes to the pipeline?15:24
@wikingusing the right exception?15:24
wuweiwait15:25
@wikingok for?15:25
wuweiwindows build actually failed15:26
-shogun-buildbot:#shogun- Build deb4 - python3 #449 is complete: Failure [failed python (failure)] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/44915:26
wuweiseems some template syntax is compatible to msvc15:26
wuwei*incompatible15:26
wuweiwiking: seems some template syntax is incompatible to msvc15:27
wuweiappveyor failed15:28
wuweihaven't investigate into that15:28
wuweiwiking: have time to go back to the tensor story ?15:48
@wikingwuwei, sorry got held up16:07
@wikingi have 25 more minutes now16:07
@wikingor rather 2016:07
@wikingthen i have to run16:07
@wikingso yeah16:07
@wikinglemme just check back16:07
@wikingso say create_tensor({1,2,3,4,5,6}, {2,2,1})16:12
@wikingi guess we need a stride as well?16:12
@wikingwuwei,16:15
@wiking?16:15
@wikingi gotta run in 10 minutes16:16
@wikingonly be back in about 3h :(16:16
@wikingwuwei, gotta run16:25
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has joined #shogun16:26
travis-ciit's Heiko Strathmann'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/38923946316:26
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has left #shogun []16:26
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4331 synchronized by vinx1317:56
@HeikoSshubham808: hey18:13
wuweiwiking: sorry I was out for some time18:17
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]18:31
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun18:31
@HeikoSshubham808: hi! :)18:56
shubham808HeikoS: hi18:57
shubham808so starting with progress pr18:57
shubham808i did not use the loop in places which had a progress bar already as an object18:57
shubham808i jsut updated the old object18:57
@HeikoScan you give me an example18:58
shubham808this is because i talked to toni and we generally do not want loop version in cases we might break out due to some other codition18:58
shubham808sure18:58
@HeikoSI see18:59
@HeikoSstill an example would be good18:59
shubham808yeah i am looking for one18:59
shubham808https://github.com/shogun-toolbox/shogun/pull/4305/files#diff-bf63664b191d73bbd6c8ac7f1ed127a1R7419:00
@HeikoSok sure19:00
@HeikoSthat I understand19:00
shubham808here its usually the case that we breakout due to model converging and not the number of iters ending19:00
shubham808yeah19:01
@HeikoSit was more those cases that confused me19:01
@HeikoShttps://github.com/shogun-toolbox/shogun/pull/4305/files#diff-fd175fcdd91da278fff39f38a28ab084R125619:01
@HeikoShttps://github.com/shogun-toolbox/shogun/pull/4305/files#diff-fd175fcdd91da278fff39f38a28ab084R128319:02
shubham808this i agree can be moved in the loop19:02
@HeikoSin those ones, there is a loop that just loops over the index19:02
@HeikoSso should do that, it is cleaner19:02
shubham808yeah19:02
shubham808we can move those in the loop19:03
@HeikoSshubham808: cool19:04
@HeikoSnow for this helper function19:04
shubham808yes19:04
@HeikoSfirst of all, let's use a CFile member of StoppableObject19:04
@HeikoSand then just call model.save_serializable(m_file)19:04
@HeikoSso there is no additional code for serialization in the stoppable19:04
@HeikoSnext, we dont want the model to be always serialized on pause19:05
@HeikoSjust if the users wants to19:05
shubham808do we not want to allow saving into hdf519:05
shubham808and other formats on pause ?19:05
@HeikoSCFile can be anything19:05
@HeikoSany fornmat19:05
@HeikoSany filename19:05
shubham808user needs to put that19:05
@HeikoSnono19:05
@HeikoSjust give it something default in the ctor19:06
@HeikoS(dont open the file yet obviously)19:06
shubham808yeah19:06
shubham808i wrote something for that19:06
@HeikoSand then the user can change the file member19:06
@HeikoSbefore training starts19:06
@HeikoSchange filename19:06
@HeikoSchange format19:06
@HeikoSchange it to be a bytestream rather than a file19:06
shubham808will push that in a while19:06
@HeikoScool!19:07
shubham808next19:07
shubham808how do we deal with duplicate files ?19:07
shubham808since we do expect the user to pause multiple times in a single train call19:07
wuweiwiking: sgio pr is ready19:08
shubham808HeikoS: we could check with std::ifstream19:08
@HeikoSshubham808: yeah that needs to be dealt with19:09
shubham808aside from that19:10
shubham808here is what i will add19:10
@HeikoSshubham808: what about we make the filename unique using some suffix19:10
@HeikoSlike in the serialization unit tests19:11
shubham808there the files do not need to be kept around19:11
shubham808so overwriting is not an issue19:12
shubham808HeikoS: what kind of suffix ?19:12
@HeikoSactually, yeah a single file is sufficient19:12
@HeikoSso just overwrite19:13
@HeikoSfor now19:13
@HeikoSno I mean the unit tests they do like19:13
@HeikoS"serialized_modelXXXXXX.dat"19:13
@HeikoSand the XXXXX is filled with unique19:13
shubham808i see19:14
@HeikoSbut i am not sure about this19:14
@HeikoSovercomplicates things19:14
@HeikoSfor now, just have the CFile in there, and write it to that19:14
shubham808okay19:14
@HeikoSit is not your job to check, it is the persons's job who gave the CFile19:14
@HeikoSthis is what viktor meant with we dont want to have functionality where it doesnt belong19:15
shubham808makes sense yeah19:15
shubham808i mean19:15
shubham808take a look at the serialize_machine method19:16
shubham808all it does is call ->save_serializable19:16
shubham808effectively19:16
shubham808that is redundant19:16
@HeikoSyep19:17
shubham808so here is what i have in mind19:17
shubham808we add change m_serialized_machine to CFile*19:18
shubham808we add a bool to see if user wants serialization on pause19:18
shubham808with these changes it makes sense to keep the serialization happening in on_pause() instead of on_pause_impl()19:19
shubham808since user did get a choice earlier to set the bool19:19
shubham808right ?19:20
@HeikoSI was more thinking of making the serialization as a choice19:21
@HeikoSwhen pressing ctrl-C19:21
@HeikoSvoid CSignal::handler(int signal)19:22
@HeikoSadding the option there19:22
shubham808doable19:22
@HeikoSah wait19:23
@HeikoSactually19:23
@HeikoSI just realise something19:23
@HeikoSwhat does actually happen if I press P19:23
shubham808the handler calls on_pause19:23
@HeikoSand then?19:23
shubham808then after doing stuff in pause we resume computation19:24
@HeikoSwhat happens next if I do this in a c++ propgram?19:24
@HeikoSor in a pythoin program?19:24
shubham808we press ctrl + C19:24
shubham808it opens the signal handler and asks a choice19:24
shubham808if we type P19:24
shubham808it executes the on_pause19:24
shubham808then resumes the loop19:25
@HeikoSwhat does "pause" then mean?19:26
@HeikoSi.e. what is the supposed different between continue and pause?19:27
shubham808pause lets us do something in between19:27
@HeikoSwhere is specified what is being done?19:28
@HeikoSwho defines this?19:28
shubham808in the on_pause method19:28
shubham808we will specify this for algorithms manually19:28
shubham808alternatively the user can do so too19:29
shubham808by overiding on_pause_impl()19:29
@HeikoSso why don't we offer some strategy pattern that allows a user to specify that the model should be serialized on pause?19:30
@HeikoSrather than putting this into the stoppable object class?19:30
@HeikoSok I think we need to discuss this a bit more19:30
@HeikoSwith giovanni as well19:31
@HeikoSlets do that tomorrow?19:31
shubham808im confused19:31
shubham808what kind of strategy ?19:32
@HeikoSso ok19:32
shubham808alright lets have a meeting tommorow about this ?19:32
@HeikoSlet's start from scratch19:32
@HeikoSwe want users to be able to dump objects when they pause computation19:32
shubham808yes19:32
@HeikoSwe want the user to be responsible for providing a file or similar19:32
@HeikoSso we need to give the user some way of defining what they want19:33
@HeikoSand this should in particular be possible without modifying any code19:33
@HeikoSwhat this means is that before I start training, I need to allow the user to specify where/how the file is serialized during a pause19:34
shubham808yes that will be allowed if we have a member to store the file at19:34
shubham808this is why we need the file member19:35
@HeikoSok but what if the user doesnt want to serilalize on pause19:35
@HeikoSwhich is the case most of the time19:35
@HeikoSthen we have this file member floating around there without being used19:35
shubham808then he ticks the bool as false19:35
shubham808yes it will be unused19:35
@HeikoSok that is bad19:35
@HeikoSso we need something else19:35
@HeikoSm = new Model()19:35
@HeikoSm.add("on_pause", new SerializeOnPause(my_file))19:36
@HeikoSsomething like this19:36
@HeikoSsome mechanism where users can specify things that should happen on pausing19:36
@HeikoSas they cannot execute any code themselves during the pause19:37
@HeikoSand then in the on_pause implementation19:37
@HeikoSall the pausing strategies (here SerializeOnPause) are executed19:37
@HeikoSbut now we are talking about something quite different from before19:37
@HeikoSthis is why I think we should discuss again by video with giovanni19:38
shubham808yeah19:38
shubham808im only getting more confused :)19:38
@HeikoSwe could also have19:38
@HeikoSsomething else19:38
@HeikoSthat the user wants to happen on pausing19:38
@HeikoSlike predict on test data19:38
shubham808that can be done19:39
@HeikoSyes19:39
shubham808with overriding on_pause_impl()19:39
@HeikoSbut would need some way to specify that19:39
@HeikoSbut the user doesnt want to write c++ code19:39
@HeikoSit is a user, not a developer19:39
shubham808now it makes sense19:39
shubham808i see it i see it19:39
@HeikoSwhat happens on pause in Python19:40
@HeikoScan I execute interactive code? no I cannot19:40
@HeikoSsame thing19:40
@HeikoSso hence I was thinking about a strategy pattern19:40
@HeikoSfor specifying what to do on pause19:40
@HeikoSthis could be a director class so that users in Python can write their own code in there19:40
@HeikoSshubham808: I have to run now19:40
shubham808okay19:41
@HeikoScan you send an email to giovanni and ask him whether he can talk tomorrow>?19:41
shubham808yes i will do that19:41
shubham808also we need to talk about IterativeAlgo class u guys talked about too19:41
shubham808bye bye19:41
@HeikoSshubham808: i think you could focus on finishing the other things in the meantime19:41
@HeikoSshubham808: oh yes should discuss that as well19:41
@HeikoSshubham808: and also dont forget the blog post :) lots of material there for that19:42
@HeikoStake care!19:42
shubham808yes19:42
shubham808thanks19:42
-!- HeikoS [~heiko@host86-128-122-106.range86-128.btcentralplus.com] has quit [Quit: Leaving.]20:44
@sukey[https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4305 synchronized by shubham80822:13
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has quit [Quit: http://www.kiwiirc.com/ - A hand crafted IRC client]22:20
--- Log closed Fri Jun 08 00:00:40 2018

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