--- 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 | |
wuwei | hi, seems this doesnt work? | 04:28 |
---|---|---|
wuwei | https://github.com/shogun-toolbox/shogun/blob/94c093bf640ccc52a36f2cd59e9faeabdbfb0bd4/cmake/external/GoogleTestNMock.cmake#L6 | 04:28 |
wuwei | appveyor are throwing a lot of warnings | 04:28 |
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun | 08: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 | |
@wiking | wuwei, that came from a google test issue | 09:09 |
wuwei | wiking: yeah | 09:10 |
wuwei | we should also add that flag to unittest build | 09:10 |
wuwei | i sent a pr | 09:10 |
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun | 09:11 | |
@wiking | mergec :) | 09:32 |
@wiking | i'm looking into our sgio stuff | 09:33 |
@wiking | i'm thinking of changing it significantly :) | 09:33 |
-!- sukey [~nodebot@ks312251.kimsufi.com] has joined #shogun | 09:33 | |
-!- mode/#shogun [+o sukey] by ChanServ | 09:33 | |
@wiking | sukey, flip | 09:35 |
@sukey | (/?? ? ?)/? ~ ??? | 09:35 |
@sukey | [https://github.com/shogun-toolbox/shogun] New commit https://github.com/shogun-toolbox/shogun/commit/2f2db5a280eb2bb28730ceaf4d22965fb6d38cd0 by vigsterkr | 11:04 |
-!- HeikoS [~heiko@host86-128-122-106.range86-128.btcentralplus.com] has joined #shogun | 11:54 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 11:54 | |
-shogun-buildbot:#shogun- Build deb4 - python3 #448 is complete: Success [build successful] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/448 | 11:59 | |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 opened by karlnapf | 12:14 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 | 12:15 |
@HeikoS | shubham808: hi | 12:16 |
@HeikoS | what did you want to ask yesterday? | 12:16 |
shogitter | (shubham808) :) | 12:19 |
shogitter | (shubham808) Switched to shogitter for a while | 12: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 updated | 12:21 |
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun | 12:22 | |
@HeikoS | shubham808: 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 5 | 12:25 |
shogitter | (shubham808) Then we train a model B to only 5 iters | 12:25 |
shogitter | (shubham808) And compare results | 12:25 |
@HeikoS | i see | 12:30 |
@HeikoS | what does it test? | 12:30 |
@HeikoS | ah | 12:30 |
@HeikoS | you set number of iterations to 5 in the second one? | 12:30 |
shogitter | (shubham808) Yes :) | 12:31 |
@HeikoS | what do we test with that? | 12:32 |
@HeikoS | Example of a failing test | 12:32 |
@HeikoS | ? | 12:32 |
@HeikoS | we 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 |
@HeikoS | yeah I think it is good | 12:32 |
shogitter | (shubham808) Yeah exactly | 12:33 |
@HeikoS | for the perceptron, before your patch with the w, this would have caught it | 12:33 |
@HeikoS | because running training for 5 iterations explicitlz would have updated the w | 12:33 |
@HeikoS | but stopping in between wouldnt | 12:33 |
@HeikoS | good! | 12:33 |
@HeikoS | do it ;0 | 12:33 |
shogitter | (shubham808) Alright | 12:33 |
@HeikoS | wiking: hey | 12:34 |
@HeikoS | shubham808: I made a few comments on the progress PR | 12:35 |
@HeikoS | it is almost ready | 12:36 |
@HeikoS | just had a few questions | 12:36 |
shogitter | (shubham808) Okay I will check it | 12:39 |
-!- travis-ci [~travis-ci@ec2-54-204-134-146.compute-1.amazonaws.com] has joined #shogun | 13:01 | |
travis-ci | it'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/389150619 | 13: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 #shogun | 13:18 | |
travis-ci | it'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/389150619 | 13:18 |
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has left #shogun [] | 13:18 | |
@HeikoS | lisitsyn: jo | 13:39 |
lisitsyn | HeikoS: hey | 13:39 |
@HeikoS | lisitsyn: can I put something on your TODO list ? :D | 13:39 |
lisitsyn | yes sure | 13:39 |
@HeikoS | lisitsyn: get -> lazy function | 13:39 |
lisitsyn | ah this one | 13:39 |
lisitsyn | ok | 13:39 |
@HeikoS | need it in a few places | 13:39 |
lisitsyn | alright | 13:40 |
shubham808 | HeikoS: hey | 13:41 |
@HeikoS | shubham808: hi | 13:41 |
@HeikoS | lisitsyn: can you give an ETA? :) | 13:41 |
lisitsyn | HeikoS: no | 13:41 |
shubham808 | about format independence(and filename) in the helper pr | 13:41 |
lisitsyn | :D | 13:41 |
@HeikoS | lisitsyn: nooooooooooo | 13:42 |
lisitsyn | have long weekend this week but we'll see | 13:42 |
@HeikoS | sure | 13:42 |
@HeikoS | cool | 13:42 |
@HeikoS | shubham808: yes? | 13:42 |
shubham808 | how about | 13:42 |
shubham808 | a set_serialization_type() | 13:42 |
shubham808 | then we could go like set_serialization_type(new CSerializableHdf5) | 13:43 |
@HeikoS | shubham808: no need for a setter | 13:43 |
@HeikoS | we have "put" | 13:43 |
@HeikoS | just add a member | 13:43 |
@HeikoS | m_serialization_file | 13:43 |
@HeikoS | m_serialization_filename | 13:43 |
shubham808 | we just put them | 13:44 |
shubham808 | yeah | 13:44 |
@HeikoS | and initialize them to something meaningful in constructor | 13:44 |
@HeikoS | and then the user can use put | 13:44 |
@HeikoS | in fact | 13:44 |
@HeikoS | no need for filename | 13:44 |
@HeikoS | as the file contains the filename | 13:44 |
shubham808 | contains the filename ? | 13:44 |
@HeikoS | shubham808: yes | 13:47 |
@HeikoS | if you construct a file, you need to give it a filename | 13:47 |
shubham808 | aah i see | 13:47 |
shubham808 | ofcourse | 13:47 |
@HeikoS | e.g. explicit CSerializableAsciiFile(const char* fname, char rw='r'); | 13:47 |
shubham808 | cool | 13:49 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 synchronized by karlnapf | 13:56 |
wuwei | wiking: hi | 13:56 |
@wiking | wuwei, hihi | 14:14 |
wuwei | wiking: do u have any idea for ngraph, on how type info is propogated? | 14:15 |
@wiking | well :) you know that it has element::f32 etc | 14:19 |
@wiking | and then basically it does nothing else but writing a c code :) | 14:19 |
@wiking | so you do this | 14:19 |
@wiking | backend::create_tensor(element::f32, Shape) | 14:19 |
@wiking | this will get you a float32 tensor | 14:19 |
@wiking | and over this you do the operations | 14:19 |
@wiking | but any operations over this is typeless.... right ? :) | 14:20 |
wuwei | yeah | 14:20 |
@wiking | because the variable has already been created | 14:20 |
@wiking | but i remember | 14:20 |
@wiking | for dot product | 14:20 |
@wiking | there was a typecheck | 14:20 |
@wiking | lemme just see | 14:20 |
wuwei | i saw some get_element_type | 14:21 |
wuwei | in this case don't we need to do a switch | 14:21 |
@wiking | yeah | 14:26 |
@wiking | this approach we wouldn't need it | 14:27 |
wuwei | i see, let me think again :) | 14:28 |
@wiking | have 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 karlnapf | 14:30 |
wuwei | yeah, u want returning a tensor containing some values | 14:30 |
@wiking | HeikoS, 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 #shogun | 14:31 | |
wuwei | can a tensor contain value of differnet type, or ? | 14:31 |
@HeikoS | wiking: pomg | 14:31 |
@wiking | pm | 14:31 |
@wiking | wuwei, do we have such a case when the return value (matricies) would be different types? | 14:32 |
wuwei | complex dot ? | 14:33 |
@wiking | yeah but that's about | 14:34 |
@wiking | R dot(R v1, R v2) | 14:34 |
@wiking | where R is vector<complex > | 14:34 |
@wiking | right? | 14:34 |
@wiking | sorry | 14:34 |
@wiking | complex dot(complex v1, complex v2) | 14:34 |
@wiking | but that's a differnet story we already knew that it has to have special cases | 14:34 |
wuwei | yeah | 14:34 |
wuwei | i'm not sure if i get your idea, tensor is for stacking multiple matrix/vector as return value ? | 14:35 |
@wiking | so ok | 14:35 |
@wiking | one step back | 14:35 |
@wiking | so now we have this messy interface for linalg:: | 14:35 |
@wiking | partly because of the fact of typed containers | 14:35 |
@wiking | SGVector<T> and SGMatrix<T> right? | 14:35 |
wuwei | yeah | 14:36 |
@wiking | now if we would drop the type then things could get clearer | 14:36 |
@wiking | but still there would be an ever growing interface | 14:36 |
@wiking | of the linalg backend | 14:36 |
@wiking | it'd be | 14:36 |
@wiking | linalg::dot(), linalg::add_scalar, linalg::svd etc | 14:36 |
@wiking | right? | 14:36 |
wuwei | since the backend is typed? | 14:37 |
@wiking | so either we woudl need to predefine the all the functionalities | 14:37 |
@wiking | for the interface of the backend | 14: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 | |
@wiking | or that would be just as now an ever amendable thing | 14:37 |
@wiking | that changes over time | 14:37 |
@wiking | because we didn't have qr decomposition added to the linalg interface | 14:38 |
@wiking | because we didn't needed it | 14:38 |
@wiking | but one day we realise we need it | 14:38 |
@wiking | and so on | 14:38 |
@wiking | i mean just check the linalgnamespace | 14:38 |
wuwei | yeah | 14:38 |
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun | 14:39 | |
wuwei | we are adding new interface to linalg and invoke Eigen/viennacl backend | 14:39 |
@wiking | yeah | 14:40 |
@wiking | so this is like gonna change every time somebody needs a new thing | 14:40 |
@wiking | and then you break the ABI (in a way) | 14:40 |
@wiking | because the Backend now has new and new virtual methods | 14:40 |
@wiking | that the specific backend has to implement right? | 14:40 |
wuwei | yeah | 14:41 |
wuwei | on the other hand, if we predefined some basic ops, like add/mul, then we will need to implement those ourselves | 14:41 |
@wiking | ok so in case of ngraph | 14:41 |
@wiking | things are a bit nicer | 14:42 |
@wiking | with the Function object | 14:42 |
@wiking | as then you have just 1 virtual method | 14:42 |
@wiking | apply(function, input, output) | 14:42 |
@wiking | right? | 14:42 |
wuwei | yeah | 14:42 |
@wiking | ok so but | 14:43 |
@wiking | then comes the other problem | 14:43 |
@wiking | if we would want to follow this approach | 14:43 |
@wiking | that what would be output when the function is a matrix decomposition | 14:43 |
wuwei | is creating a function instance every time a problem to take care | 14:43 |
@wiking | so say if you get a matrix | 14:43 |
@wiking | and you wanna do svd over it | 14:44 |
@wiking | what would be the output | 14:44 |
@wiking | if you only have this apply(function, input, output) | 14:44 |
@wiking | ? | 14:44 |
@wiking | or would apply would be | 14:44 |
@wiking | apply(function, input, vararg()? | 14:44 |
wuwei | output should an array of matrix? | 14:45 |
wuwei | in ngraph that's a vector | 14:45 |
@wiking | i mean in case of ngraph | 14:50 |
@wiking | you have a tensor as in/out | 14:50 |
@wiking | right/. | 14:50 |
@wiking | this would still work for matrix decomposition | 14:51 |
@wiking | it would be a bit tricky | 14:51 |
@wiking | 'ugly' | 14:51 |
@wiking | but still you could say | 14:51 |
@wiking | you store the decomposition in an a tensor | 14:51 |
@wiking | and then then you have a predefined order in that array | 14:52 |
@wiking | for the specific matrix | 14:52 |
@wiking | wuwei, see what i mean? | 14:52 |
wuwei | i see | 14:52 |
@wiking | but i guess the same could be done | 14:53 |
@wiking | if we put the output as a vararg? :) | 14:53 |
@wiking | so it's something like | 14:53 |
@wiking | apply(function, input, ...) | 14:53 |
@wiking | or? | 14:53 |
wuwei | what if you have a matrix and a vector as return value? | 14:53 |
@wiking | in tensor it should work, or? | 14:53 |
wuwei | yeah varargs can work | 14:54 |
wuwei | how tensor works in this case | 14:54 |
@wiking | there you can have anything right? | 15:01 |
@wiking | i mean it's an ndarray in a way | 15:01 |
wuwei | yeah it's an ndarray | 15:02 |
@wiking | so there you can store anything right | 15:03 |
@wiking | matrix, vector, vector, matrix :) | 15:03 |
wuwei | what's the shape of the tensor, say if you have a 2x2 matrix and a 3x1 vector | 15:03 |
wuwei | i'm not sure if i understand right | 15:03 |
@wiking | just a sec | 15:07 |
@wiking | sorry got held up in shit | 15:08 |
@HeikoS | wiking: btw watned to have some opinions | 15:09 |
@HeikoS | you have a minute? | 15:09 |
@sukey | [https://github.com/shogun-toolbox/shogun] Pull Request https://github.com/shogun-toolbox/shogun/pull/4333 merged by karlnapf | 15:10 |
@sukey | [https://github.com/shogun-toolbox/shogun] karlnapf pushed 2 commits: | 15:10 |
@sukey | https://github.com/shogun-toolbox/shogun/commit/c75f457650b25d4792917de2cbe686c725b72d16 | 15:10 |
@sukey | https://github.com/shogun-toolbox/shogun/commit/18781905d85b4f4df2f4128732929229c5ea8f63 | 15:10 |
@wiking | yep hgere | 15:10 |
@HeikoS | wiking: it is about updating the state of models during training | 15:10 |
@wiking | HeikoS, btw that pr is totally not ok on my side :) | 15:10 |
@wiking | 4330 that is... | 15:11 |
@HeikoS | currently we dont have a proper way to update model state during training | 15:11 |
@HeikoS | basically the dev can do whatever | 15:11 |
@wiking | proper meaning? | 15:11 |
@HeikoS | as in | 15:11 |
@HeikoS | every iteration is guaranteed to have updated the state | 15:11 |
@HeikoS | iteration number is trackable from outside | 15:11 |
@HeikoS | convergence state | 15:11 |
@HeikoS | etc | 15:11 |
@wiking | i guess its up the discretion of the developer | 15:11 |
@HeikoS | all this is hidden in local vars | 15:11 |
@HeikoS | so e.g. when we stop training | 15:12 |
@HeikoS | it might be lost | 15:12 |
@HeikoS | actually, the only way to even know iteration number currently is via progress bar | 15:12 |
@HeikoS | I think that is weird | 15:12 |
@HeikoS | and also asking for errors | 15:12 |
@HeikoS | it is even hard for us to test whether a prematurely stopped model is in a usable state | 15:13 |
@HeikoS | all indirect | 15:13 |
@HeikoS | so I was thinking, maybe it would be good idea to have something in CMachine (or subclass) to deal with this | 15:13 |
@HeikoS | in a generic fashion | 15:13 |
@HeikoS | for iterative algorithms | 15:13 |
@HeikoS | something like a call that updates iteration counter, convergence stats, list of updates model vars, etc | 15:14 |
@HeikoS | because then we can easily check whether that was called | 15:14 |
@HeikoS | lisitsyn: ^ | 15:14 |
@HeikoS | shubham808: ^ | 15:14 |
@wiking | why 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 | |
@HeikoS | yeah something like this I had in mind | 15:15 |
-!- shubham808 [0e8bf0fb@gateway/web/cgi-irc/kiwiirc.com/ip.14.139.240.251] has joined #shogun | 15:15 | |
@wiking | and then predefine a set of keys | 15:15 |
@wiking | that are common | 15:15 |
@HeikoS | but it is a strong thing to do: forcing devs to serve such an interface | 15:15 |
@wiking | if you wanna avoid this | 15:16 |
@HeikoS | but yeah imo doing all this in local vars doesnt really allow to do the black box stuff we have in mind | 15:16 |
@wiking | then you can do a | 15:16 |
@wiking | train_iteration(function) | 15:16 |
@wiking | and basically the function is what the developer needs to implement | 15:16 |
@wiking | that does all the mumbo jumbo | 15:16 |
@wiking | for that specific model | 15:17 |
@HeikoS | yeah | 15:17 |
@HeikoS | so we are talking about introducing another base class | 15:17 |
@wiking | and he can access certain variables | 15:17 |
@wiking | IterativeMethod | 15:17 |
@wiking | or IterativeMachine | 15:17 |
@wiking | but this is not a base class | 15:17 |
@wiking | at least it does not need to be explicitly exposed apart for the c++ interface | 15:18 |
@wiking | as it would only have one pure virtual function | 15:18 |
@wiking | that needs to be implemented by derived classes | 15:18 |
@HeikoS | cool, will think a bit about this | 15:19 |
@wiking | the only question is that whether all the corner cases you could cover with such an IterativeMachine | 15:20 |
@wiking | one would hope yes | 15:20 |
@HeikoS | yeah there is lots of things that might cause headaches | 15:20 |
@wiking | and then you just need to implement "what's in the for loop" | 15:20 |
@HeikoS | but generally, this would be nice as we can just implement the main loop once | 15:20 |
@wiking | but i doubt that it'd be so easy :) | 15:20 |
@HeikoS | forces using the parameter framework | 15:21 |
@HeikoS | okok | 15:21 |
@HeikoS | ill grab lunch now, thx | 15:21 |
@wiking | but i mean if you just have a map | 15:21 |
@wiking | that stores all these references | 15:21 |
@wiking | that should be fine as well | 15:21 |
@wiking | as that could be monitorable | 15:21 |
@wiking | of course that is more burden on us when adding a new method | 15:22 |
@wiking | wuwei, here? | 15:22 |
@wiking | wuwei, before i forget | 15:23 |
@wiking | i've restarted the travis jobs for the exception story | 15:23 |
wuwei | yeah | 15:23 |
@wiking | i guess all of them are failing because of timeout | 15:23 |
@wiking | :) | 15:23 |
-!- wiking [~wiking@huwico/staff/wiking] has left #shogun ["Leaving"] | 15:23 | |
wuwei | wiking: anything you wanna change in that pr? | 15:24 |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 15:24 | |
-!- mode/#shogun [+o wiking] by ChanServ | 15:24 | |
@wiking | wuwei, i'll just merge it into feature/transformers | 15:24 |
@wiking | and then you can rebase and add fixes to the pipeline? | 15:24 |
@wiking | using the right exception? | 15:24 |
wuwei | wait | 15:25 |
@wiking | ok for? | 15:25 |
wuwei | windows build actually failed | 15:26 |
-shogun-buildbot:#shogun- Build deb4 - python3 #449 is complete: Failure [failed python (failure)] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/449 | 15:26 | |
wuwei | seems some template syntax is compatible to msvc | 15:26 |
wuwei | *incompatible | 15:26 |
wuwei | wiking: seems some template syntax is incompatible to msvc | 15:27 |
wuwei | appveyor failed | 15:28 |
wuwei | haven't investigate into that | 15:28 |
wuwei | wiking: have time to go back to the tensor story ? | 15:48 |
@wiking | wuwei, sorry got held up | 16:07 |
@wiking | i have 25 more minutes now | 16:07 |
@wiking | or rather 20 | 16:07 |
@wiking | then i have to run | 16:07 |
@wiking | so yeah | 16:07 |
@wiking | lemme just check back | 16:07 |
@wiking | so say create_tensor({1,2,3,4,5,6}, {2,2,1}) | 16:12 |
@wiking | i guess we need a stride as well? | 16:12 |
@wiking | wuwei, | 16:15 |
@wiking | ? | 16:15 |
@wiking | i gotta run in 10 minutes | 16:16 |
@wiking | only be back in about 3h :( | 16:16 |
@wiking | wuwei, gotta run | 16:25 |
-!- travis-ci [~travis-ci@ec2-54-196-204-91.compute-1.amazonaws.com] has joined #shogun | 16:26 | |
travis-ci | it'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/389239463 | 16: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 vinx13 | 17:56 |
@HeikoS | shubham808: hey | 18:13 |
wuwei | wiking: sorry I was out for some time | 18: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 #shogun | 18:31 | |
@HeikoS | shubham808: hi! :) | 18:56 |
shubham808 | HeikoS: hi | 18:57 |
shubham808 | so starting with progress pr | 18:57 |
shubham808 | i did not use the loop in places which had a progress bar already as an object | 18:57 |
shubham808 | i jsut updated the old object | 18:57 |
@HeikoS | can you give me an example | 18:58 |
shubham808 | this is because i talked to toni and we generally do not want loop version in cases we might break out due to some other codition | 18:58 |
shubham808 | sure | 18:58 |
@HeikoS | I see | 18:59 |
@HeikoS | still an example would be good | 18:59 |
shubham808 | yeah i am looking for one | 18:59 |
shubham808 | https://github.com/shogun-toolbox/shogun/pull/4305/files#diff-bf63664b191d73bbd6c8ac7f1ed127a1R74 | 19:00 |
@HeikoS | ok sure | 19:00 |
@HeikoS | that I understand | 19:00 |
shubham808 | here its usually the case that we breakout due to model converging and not the number of iters ending | 19:00 |
shubham808 | yeah | 19:01 |
@HeikoS | it was more those cases that confused me | 19:01 |
@HeikoS | https://github.com/shogun-toolbox/shogun/pull/4305/files#diff-fd175fcdd91da278fff39f38a28ab084R1256 | 19:01 |
@HeikoS | https://github.com/shogun-toolbox/shogun/pull/4305/files#diff-fd175fcdd91da278fff39f38a28ab084R1283 | 19:02 |
shubham808 | this i agree can be moved in the loop | 19:02 |
@HeikoS | in those ones, there is a loop that just loops over the index | 19:02 |
@HeikoS | so should do that, it is cleaner | 19:02 |
shubham808 | yeah | 19:02 |
shubham808 | we can move those in the loop | 19:03 |
@HeikoS | shubham808: cool | 19:04 |
@HeikoS | now for this helper function | 19:04 |
shubham808 | yes | 19:04 |
@HeikoS | first of all, let's use a CFile member of StoppableObject | 19:04 |
@HeikoS | and then just call model.save_serializable(m_file) | 19:04 |
@HeikoS | so there is no additional code for serialization in the stoppable | 19:04 |
@HeikoS | next, we dont want the model to be always serialized on pause | 19:05 |
@HeikoS | just if the users wants to | 19:05 |
shubham808 | do we not want to allow saving into hdf5 | 19:05 |
shubham808 | and other formats on pause ? | 19:05 |
@HeikoS | CFile can be anything | 19:05 |
@HeikoS | any fornmat | 19:05 |
@HeikoS | any filename | 19:05 |
shubham808 | user needs to put that | 19:05 |
@HeikoS | nono | 19:05 |
@HeikoS | just give it something default in the ctor | 19:06 |
@HeikoS | (dont open the file yet obviously) | 19:06 |
shubham808 | yeah | 19:06 |
shubham808 | i wrote something for that | 19:06 |
@HeikoS | and then the user can change the file member | 19:06 |
@HeikoS | before training starts | 19:06 |
@HeikoS | change filename | 19:06 |
@HeikoS | change format | 19:06 |
@HeikoS | change it to be a bytestream rather than a file | 19:06 |
shubham808 | will push that in a while | 19:06 |
@HeikoS | cool! | 19:07 |
shubham808 | next | 19:07 |
shubham808 | how do we deal with duplicate files ? | 19:07 |
shubham808 | since we do expect the user to pause multiple times in a single train call | 19:07 |
wuwei | wiking: sgio pr is ready | 19:08 |
shubham808 | HeikoS: we could check with std::ifstream | 19:08 |
@HeikoS | shubham808: yeah that needs to be dealt with | 19:09 |
shubham808 | aside from that | 19:10 |
shubham808 | here is what i will add | 19:10 |
@HeikoS | shubham808: what about we make the filename unique using some suffix | 19:10 |
@HeikoS | like in the serialization unit tests | 19:11 |
shubham808 | there the files do not need to be kept around | 19:11 |
shubham808 | so overwriting is not an issue | 19:12 |
shubham808 | HeikoS: what kind of suffix ? | 19:12 |
@HeikoS | actually, yeah a single file is sufficient | 19:12 |
@HeikoS | so just overwrite | 19:13 |
@HeikoS | for now | 19:13 |
@HeikoS | no I mean the unit tests they do like | 19:13 |
@HeikoS | "serialized_modelXXXXXX.dat" | 19:13 |
@HeikoS | and the XXXXX is filled with unique | 19:13 |
shubham808 | i see | 19:14 |
@HeikoS | but i am not sure about this | 19:14 |
@HeikoS | overcomplicates things | 19:14 |
@HeikoS | for now, just have the CFile in there, and write it to that | 19:14 |
shubham808 | okay | 19:14 |
@HeikoS | it is not your job to check, it is the persons's job who gave the CFile | 19:14 |
@HeikoS | this is what viktor meant with we dont want to have functionality where it doesnt belong | 19:15 |
shubham808 | makes sense yeah | 19:15 |
shubham808 | i mean | 19:15 |
shubham808 | take a look at the serialize_machine method | 19:16 |
shubham808 | all it does is call ->save_serializable | 19:16 |
shubham808 | effectively | 19:16 |
shubham808 | that is redundant | 19:16 |
@HeikoS | yep | 19:17 |
shubham808 | so here is what i have in mind | 19:17 |
shubham808 | we add change m_serialized_machine to CFile* | 19:18 |
shubham808 | we add a bool to see if user wants serialization on pause | 19:18 |
shubham808 | with these changes it makes sense to keep the serialization happening in on_pause() instead of on_pause_impl() | 19:19 |
shubham808 | since user did get a choice earlier to set the bool | 19:19 |
shubham808 | right ? | 19:20 |
@HeikoS | I was more thinking of making the serialization as a choice | 19:21 |
@HeikoS | when pressing ctrl-C | 19:21 |
@HeikoS | void CSignal::handler(int signal) | 19:22 |
@HeikoS | adding the option there | 19:22 |
shubham808 | doable | 19:22 |
@HeikoS | ah wait | 19:23 |
@HeikoS | actually | 19:23 |
@HeikoS | I just realise something | 19:23 |
@HeikoS | what does actually happen if I press P | 19:23 |
shubham808 | the handler calls on_pause | 19:23 |
@HeikoS | and then? | 19:23 |
shubham808 | then after doing stuff in pause we resume computation | 19:24 |
@HeikoS | what happens next if I do this in a c++ propgram? | 19:24 |
@HeikoS | or in a pythoin program? | 19:24 |
shubham808 | we press ctrl + C | 19:24 |
shubham808 | it opens the signal handler and asks a choice | 19:24 |
shubham808 | if we type P | 19:24 |
shubham808 | it executes the on_pause | 19:24 |
shubham808 | then resumes the loop | 19:25 |
@HeikoS | what does "pause" then mean? | 19:26 |
@HeikoS | i.e. what is the supposed different between continue and pause? | 19:27 |
shubham808 | pause lets us do something in between | 19:27 |
@HeikoS | where is specified what is being done? | 19:28 |
@HeikoS | who defines this? | 19:28 |
shubham808 | in the on_pause method | 19:28 |
shubham808 | we will specify this for algorithms manually | 19:28 |
shubham808 | alternatively the user can do so too | 19:29 |
shubham808 | by overiding on_pause_impl() | 19:29 |
@HeikoS | so why don't we offer some strategy pattern that allows a user to specify that the model should be serialized on pause? | 19:30 |
@HeikoS | rather than putting this into the stoppable object class? | 19:30 |
@HeikoS | ok I think we need to discuss this a bit more | 19:30 |
@HeikoS | with giovanni as well | 19:31 |
@HeikoS | lets do that tomorrow? | 19:31 |
shubham808 | im confused | 19:31 |
shubham808 | what kind of strategy ? | 19:32 |
@HeikoS | so ok | 19:32 |
shubham808 | alright lets have a meeting tommorow about this ? | 19:32 |
@HeikoS | let's start from scratch | 19:32 |
@HeikoS | we want users to be able to dump objects when they pause computation | 19:32 |
shubham808 | yes | 19:32 |
@HeikoS | we want the user to be responsible for providing a file or similar | 19:32 |
@HeikoS | so we need to give the user some way of defining what they want | 19:33 |
@HeikoS | and this should in particular be possible without modifying any code | 19:33 |
@HeikoS | what this means is that before I start training, I need to allow the user to specify where/how the file is serialized during a pause | 19:34 |
shubham808 | yes that will be allowed if we have a member to store the file at | 19:34 |
shubham808 | this is why we need the file member | 19:35 |
@HeikoS | ok but what if the user doesnt want to serilalize on pause | 19:35 |
@HeikoS | which is the case most of the time | 19:35 |
@HeikoS | then we have this file member floating around there without being used | 19:35 |
shubham808 | then he ticks the bool as false | 19:35 |
shubham808 | yes it will be unused | 19:35 |
@HeikoS | ok that is bad | 19:35 |
@HeikoS | so we need something else | 19:35 |
@HeikoS | m = new Model() | 19:35 |
@HeikoS | m.add("on_pause", new SerializeOnPause(my_file)) | 19:36 |
@HeikoS | something like this | 19:36 |
@HeikoS | some mechanism where users can specify things that should happen on pausing | 19:36 |
@HeikoS | as they cannot execute any code themselves during the pause | 19:37 |
@HeikoS | and then in the on_pause implementation | 19:37 |
@HeikoS | all the pausing strategies (here SerializeOnPause) are executed | 19:37 |
@HeikoS | but now we are talking about something quite different from before | 19:37 |
@HeikoS | this is why I think we should discuss again by video with giovanni | 19:38 |
shubham808 | yeah | 19:38 |
shubham808 | im only getting more confused :) | 19:38 |
@HeikoS | we could also have | 19:38 |
@HeikoS | something else | 19:38 |
@HeikoS | that the user wants to happen on pausing | 19:38 |
@HeikoS | like predict on test data | 19:38 |
shubham808 | that can be done | 19:39 |
@HeikoS | yes | 19:39 |
shubham808 | with overriding on_pause_impl() | 19:39 |
@HeikoS | but would need some way to specify that | 19:39 |
@HeikoS | but the user doesnt want to write c++ code | 19:39 |
@HeikoS | it is a user, not a developer | 19:39 |
shubham808 | now it makes sense | 19:39 |
shubham808 | i see it i see it | 19:39 |
@HeikoS | what happens on pause in Python | 19:40 |
@HeikoS | can I execute interactive code? no I cannot | 19:40 |
@HeikoS | same thing | 19:40 |
@HeikoS | so hence I was thinking about a strategy pattern | 19:40 |
@HeikoS | for specifying what to do on pause | 19:40 |
@HeikoS | this could be a director class so that users in Python can write their own code in there | 19:40 |
@HeikoS | shubham808: I have to run now | 19:40 |
shubham808 | okay | 19:41 |
@HeikoS | can you send an email to giovanni and ask him whether he can talk tomorrow>? | 19:41 |
shubham808 | yes i will do that | 19:41 |
shubham808 | also we need to talk about IterativeAlgo class u guys talked about too | 19:41 |
shubham808 | bye bye | 19:41 |
@HeikoS | shubham808: i think you could focus on finishing the other things in the meantime | 19:41 |
@HeikoS | shubham808: oh yes should discuss that as well | 19:41 |
@HeikoS | shubham808: and also dont forget the blog post :) lots of material there for that | 19:42 |
@HeikoS | take care! | 19:42 |
shubham808 | yes | 19:42 |
shubham808 | thanks | 19: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 shubham808 | 22: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!