--- Log opened Tue May 30 00:00:51 2017 | ||
-!- sonney2k_ [~shogun@7nn.de] has quit [Ping timeout: 240 seconds] | 05:57 | |
-!- sonney2k [~shogun@7nn.de] has joined #shogun | 05:57 | |
-!- geektoni [~geektoni@93-34-234-214.ip52.fastwebnet.it] has joined #shogun | 08:44 | |
mikeling | wiking: ping | 08:50 |
---|---|---|
mikeling | lisitsyn: ping | 08:53 |
@wiking | pong | 08:58 |
mikeling | wiking: hi, the SG_REF is about to count how many references been pointed to this object? | 09:00 |
mikeling | for example https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/evaluation/GradientResult.h#L208 | 09:01 |
mikeling | after we use std::map to instead of shogun::CMap, is that mean we could just remove those SG_REF and SG_UNREF? | 09:01 |
mikeling | or we want to use shared_ptr? | 09:01 |
@wiking | mmmm | 09:03 |
@wiking | that's a good question | 09:03 |
@wiking | i mean DynArray had no such thing | 09:03 |
@wiking | but DynamicObjectArray does | 09:03 |
@wiking | (SG_REF/UNREF) | 09:03 |
@wiking | mikeling, Clist is the same right? | 09:04 |
@wiking | i.e. it ++ the ref coutner | 09:04 |
@wiking | *counter | 09:04 |
mikeling | hmmm, I haven't check that | 09:04 |
mikeling | but CMap does | 09:04 |
mikeling | because I'm working on it | 09:05 |
@wiking | k | 09:05 |
@wiking | so the thing is then | 09:05 |
@wiking | we cannot do this change | 09:05 |
@wiking | until we dont have autoref counter | 09:05 |
@wiking | like shared_ptr | 09:05 |
mikeling | alright, so I won't touch anyplace related to SG_REF | 09:06 |
mikeling | or SG_UNREF | 09:06 |
mikeling | until this summer :) | 09:06 |
@wiking | ok yeah once we are done with the transition | 09:06 |
geektoni | wiking: can we add a new branch to Shogun repository called 'feature/progress'? So that I can make pull requests directly against it instead of 'develop'. | 09:38 |
@wiking | sure thig | 09:38 |
@wiking | thing | 09:38 |
@wiking | lemme do it | 09:38 |
geektoni | thanks :D | 09:39 |
@sukey | New Commit "Merge pull request #3810 from MikeLing/kernel_machine_clean_up | 09:39 |
@wiking | done | 09:39 |
@sukey | Port kernelMachine to openmp" to shogun-toolbox/shogun by vigsterkr: https://github.com/shogun-toolbox/shogun/commit/a77c3b88d2e8220d51a504f1d1eed7e79d8e9975 | 09:39 |
@sukey | New branch feature/progress created on shogun-toolbox/shogun | 09:39 |
geektoni | great! | 09:41 |
@sukey | Pull Request #3745 "Add PRange class to replace old SG_PROGRESS (WIP)" - https://github.com/shogun-toolbox/shogun/pull/3745 | 09:53 |
@sukey | Pull Request #3824 "Replace DynArray with std::vector for io module" synchronized by MikeLing - https://github.com/shogun-toolbox/shogun/pull/3824 | 10:33 |
-!- travis-ci [~travis-ci@ec2-54-221-56-89.compute-1.amazonaws.com] has joined #shogun | 10:35 | |
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/237410702 | 10:35 |
-!- travis-ci [~travis-ci@ec2-54-221-56-89.compute-1.amazonaws.com] has left #shogun [] | 10:35 | |
-!- TingMiao [uid229534@gateway/web/irccloud.com/x-vnwjnmfewebawlgx] has joined #shogun | 11:01 | |
@wiking | mikeling, micmn TingMiao geektoni olinguyen daily updates :) (so far i've got it from micmn geektoni) | 11:10 |
@wiking | thnx | 11:10 |
mikeling | sure, I will do it ASAP :) | 11:11 |
@wiking | thnx | 11:13 |
mikeling | np | 11:14 |
mikeling | wiking: what's the granularity for DynArray? | 11:28 |
@wiking | ? | 11:29 |
@wiking | what sense? | 11:29 |
mikeling | wiking: here https://github.com/shogun-toolbox/shogun/blob/develop/src/shogun/base/DynArray.h#L515 | 11:29 |
mikeling | the granularity | 11:29 |
-!- Netsplit *.net <-> *.split quits: mikeling | 11:30 | |
-!- Netsplit *.net <-> *.split quits: lisitsyn, ironstark, @besser82, tctara_, olinguyen, TingMiao, sonney2k, gideonite, CaBa, micmn | 11:30 | |
-!- Netsplit *.net <-> *.split quits: geektoni, @wiking, Saurabh7_ | 11:30 | |
-!- Netsplit *.net <-> *.split quits: @ChanServ, @sukey, rcurtin | 11:30 | |
-!- iglesiasg [~iglesiasg@217.119.234.214] has joined #shogun | 12:16 | |
-!- Netsplit over, joins: TingMiao, geektoni, sonney2k, olinguyen, @besser82, mikeling, micmn, CaBa, tctara_, @sukey (+4 more) | 12:16 | |
-!- ServerMode/#shogun [+oooo iglesiasg besser82 sukey wiking] by verne.freenode.net | 12:16 | |
-!- Netsplit over, joins: ironstark, lisitsyn, @ChanServ | 12:16 | |
@iglesiasg | shogun-buildbot shogun-toolbox shogitter1 welcome guys | 12:37 |
@wiking | :> | 13:23 |
@wiking | shogun-buildbot: dance | 13:23 |
shogun-buildbot | <(^.^<) | 13:23 |
shogun-buildbot | <(^.^)> | 13:23 |
shogun-buildbot | (>^.^)> | 13:23 |
shogun-buildbot | (7^.^)7 | 13:23 |
shogun-buildbot | (>^.^<) | 13:23 |
@iglesiasg | shogun-buildbot: it makes me happy to see you happy | 14:12 |
geektoni | wiking: ping | 15:12 |
@wiking | pong | 15:12 |
geektoni | hey, do you remember the discussion about adding a boolean flag to the progress? | 15:12 |
geektoni | I run into a small problem. | 15:13 |
@wiking | tell me | 15:13 |
@wiking | yes i remembe | 15:13 |
@wiking | r | 15:13 |
geektoni | this boolean flag should be evaluated each time we increment the iterator | 15:13 |
geektoni | but | 15:13 |
geektoni | if a do something like this progress(range(1, 10), io, i<30) | 15:14 |
geektoni | the predicate i<30 is evaluated and I will only receive the evaluated value | 15:14 |
geektoni | so, how can I pass a predicate as a parameter of a function? | 15:15 |
geektoni | is that possible using C++? | 15:15 |
@sukey | Pull Request #3824 "Replace DynArray with std::vector for io module" synchronized by MikeLing - https://github.com/shogun-toolbox/shogun/pull/3824 | 15:17 |
geektoni | wiking: I mean, we could simply write: for (auto i=progress(...).begin(); i != progress(...).end() && condition; i++) | 15:26 |
geektoni | but it is less concise | 15:27 |
@wiking | mmm | 15:27 |
@wiking | well | 15:27 |
@wiking | the thing is that the predicate in a way should be a function ptr :P | 15:28 |
@wiking | i.e. std::function | 15:28 |
geektoni | so, when I need to add a condition to a loop I also need to write manually the function I have to use? | 15:30 |
@wiking | yeah like a lambda? :) | 15:30 |
@wiking | i mean it's not such a bad thing that you expect there a lambda expression, or? | 15:30 |
@wiking | so you expect there a function that returns a bool | 15:31 |
geektoni | yeah exactly | 15:31 |
@wiking | and has vararg function args ;p | 15:31 |
@wiking | so that you can stuff any number of argument into the predicate | 15:32 |
geektoni | mmh what about these guys --> http://www.cplusplus.com/reference/functional/ | 15:32 |
@wiking | geektoni, operator class? | 15:32 |
geektoni | no no, apparently inside stl there is already a library which gives you all the function object to perform simple logical operations | 15:33 |
@wiking | yeah | 15:34 |
@wiking | but i mean what if you want some custom predicate | 15:34 |
@wiking | ? | 15:34 |
@wiking | i mean something that not only depends on the i (the range variable) | 15:35 |
@wiking | but some other external things | 15:35 |
geektoni | mmh yeah sure. | 15:35 |
@wiking | like: bool earlyStop | 15:35 |
@wiking | progress(range(1, 10), io, [](bool) { /* complex predicate */ } ) | 15:36 |
@wiking | right? | 15:36 |
geektoni | that's a way to do it | 15:36 |
geektoni | but I don't like it very much | 15:36 |
@iglesiasg | geektoni: why not? | 15:36 |
geektoni | "aesthetic reasons". I prefer to have methods which don't require lambdas. | 15:37 |
geektoni | I mean | 15:38 |
geektoni | if there is no other way | 15:38 |
geektoni | I'm fine with it | 15:38 |
@wiking | btw i was wrong it should be progress(range(1, 10), io, []() -> bool { /* complex predicate */ } ) | 15:38 |
@wiking | i mean this way it can be compact | 15:38 |
@iglesiasg | I think using a lambda would be a way of using progress | 15:38 |
@wiking | of course if your predicate is more complicated | 15:38 |
@iglesiasg | but it could also be done with std::bind and std::function | 15:38 |
@wiking | you can put that out into a function | 15:38 |
@iglesiasg | as wiking said before | 15:39 |
@wiking | yep | 15:39 |
@iglesiasg | so, I think it wouldn't really be like progress requires a lambda | 15:39 |
@wiking | on the other hand | 15:39 |
@wiking | would this be the usual case? | 15:39 |
@iglesiasg | but rather that it can be used with a lambda (or with std::function/bind) | 15:39 |
@wiking | to have some custom predicate? | 15:40 |
@wiking | i mean i understand it's not the nicest | 15:40 |
@wiking | although the lambda part i actually like | 15:40 |
@wiking | question is that whether this is the common way to use progress? | 15:40 |
@wiking | or rather the corner case? | 15:40 |
geektoni | I would say it is a corner case | 15:41 |
@wiking | because yeah i like smooth apis as well | 15:42 |
@wiking | but i reckon if it's not the general usecase | 15:42 |
@wiking | having the above should be fine :P | 15:42 |
@wiking | i know | 15:42 |
@wiking | i will regret this sentence | 15:42 |
@wiking | in like 1 year time | 15:42 |
geektoni | ahah | 15:42 |
@wiking | but if we dont have a better ide | 15:42 |
@wiking | *idea | 15:42 |
@wiking | then i would say lets go with this? :P | 15:42 |
@wiking | i mean i dont have a crystal ball | 15:43 |
@wiking | and i'm not james gosling nor dennis ritchie | 15:44 |
@wiking | so i cannot come up with a nice api atm :P | 15:44 |
geektoni | ok then, std::function/lambdas approved! | 15:44 |
@wiking | hehe cool | 15:45 |
@wiking | but i mean if you have a nicer smoother way | 15:45 |
@wiking | i'm all ears :) | 15:45 |
geektoni | I don't think there is a smoother way :P | 15:46 |
geektoni | I will use the less troublesome | 15:46 |
@wiking | cool | 15:47 |
@wiking | thnx | 15:47 |
geektoni | btw wiking, could you restart Travis on this one https://github.com/shogun-toolbox/shogun/pull/3745 ? | 15:48 |
geektoni | thanks :D | 15:49 |
@wiking | lemme try | 15:50 |
@wiking | done | 15:52 |
mikeling | wiking: why the default granularity is 128? | 16:36 |
-!- leagoetz [~leagoetz@eduroam-int-pat-8-67.ucl.ac.uk] has joined #shogun | 16:40 | |
mikeling | so if I use resize_array(5), I'm actually create a array with 138 length? | 16:43 |
mikeling | lisitsyn: ping | 16:45 |
-!- iglesiasg [~iglesiasg@217.119.234.214] has quit [Quit: leaving] | 16:46 | |
@wiking | mikeling, lisitsyn is on holiday | 16:58 |
@wiking | s | 16:58 |
@wiking | mikeling, nono... but you shouldn't care about this | 16:58 |
@wiking | as this is solved within std::vector | 16:58 |
@wiking | resize_array(5) -> create a memory of 128 items | 16:58 |
@wiking | but if you have resize_array(129) then it's 256 | 16:58 |
@wiking | because that's the granurality | 16:59 |
@wiking | and there's a variable that is maintained that basically takes care of how many actual elements are being stored in the DynArray | 16:59 |
mikeling | wiking: mmm, so I just ignore the places have set_granularity() or so? | 16:59 |
@wiking | yes | 17:00 |
mikeling | due to we are going to use std::vector | 17:00 |
mikeling | ok | 17:00 |
mikeling | got it | 17:00 |
geektoni | wiking: ok, I've reached this result https://pastebin.com/CRgHPKmQ | 17:11 |
geektoni | Do you think we have to give the possibility to supply also lambdas with parameters? (e.g [](int & a) {/**/} ) | 17:12 |
geektoni | or we can live on only with lambda's capture list? | 17:13 |
-!- wang [uid231047@gateway/web/irccloud.com/x-rmtkaabtbhbvswwt] has joined #shogun | 17:47 | |
-!- wang is now known as Guest29399 | 17:48 | |
-!- Guest29399 is now known as WangWang | 17:48 | |
@wiking | geektoni, mmm | 17:50 |
@wiking | geektoni, yeah that's why i thought that the arg of the function should be vararg | 17:50 |
@wiking | :) | 17:50 |
@wiking | this way there's no limitation for what you can pass to the function | 17:51 |
geektoni | mmh ok | 17:51 |
@wiking | if you use lambda | 17:51 |
@wiking | then of course you have all the [] params as well | 17:51 |
geektoni | currently I'm using std::function to specify the function type we want | 17:52 |
geektoni | for example progress(.... std::function<bool()> condition) | 17:52 |
-!- thebishop [~thebishop@2603:301d:b05:e400:842:e126:4b40:7f4] has joined #shogun | 18:22 | |
-!- thebishop [~thebishop@2603:301d:b05:e400:842:e126:4b40:7f4] has quit [Read error: Connection reset by peer] | 18:26 | |
-!- leagoetz [~leagoetz@eduroam-int-pat-8-67.ucl.ac.uk] has quit [] | 18:49 | |
-!- gideonite [~gideon@mookmo.net] has quit [Ping timeout: 240 seconds] | 19:52 | |
-!- gideonite [~gideon@mookmo.net] has joined #shogun | 19:53 | |
olinguyen | wiking: I started a week earlier so I have a blog post up now: https://olinguyen.github.io/2017-05-26-gsoc-week1/. I fixed some editing, and fixed a bug I was having with random forests. Today, I'll look into a bug with crossvalidation, start on a patch for making random forest more explicit when crashing because of null values | 20:16 |
-!- geektoni [~geektoni@93-34-234-214.ip52.fastwebnet.it] has left #shogun [] | 20:21 | |
-!- mikeling [uid89706@gateway/web/irccloud.com/x-ddqbkongnepvwlue] has quit [Quit: Connection closed for inactivity] | 20:31 | |
-!- geektoni [~geektoni@93-34-234-214.ip52.fastwebnet.it] has joined #shogun | 20:39 | |
-!- geektoni [~geektoni@93-34-234-214.ip52.fastwebnet.it] has left #shogun [] | 20:48 | |
--- Log closed Wed May 31 00:00:53 2017 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!