--- Log opened Wed Jan 30 00:00:49 2019 | ||
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun | 00:29 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Read error: Connection reset by peer] | 00:29 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection] | 03:44 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 03:45 | |
-!- mode/#shogun [+o wiking] by ChanServ | 03:45 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection] | 03:52 | |
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun | 03:54 | |
-!- wiking [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Changing host] | 03:54 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 03:54 | |
-!- mode/#shogun [+o wiking] by ChanServ | 03:54 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection] | 05:21 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 05:41 | |
-!- mode/#shogun [+o wiking] by ChanServ | 05:41 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 272 seconds] | 05:46 | |
-!- gf712 [90520889@gateway/web/freenode/ip.144.82.8.137] has joined #shogun | 08:42 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun | 09:40 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection] | 10:10 | |
-!- wiking_ [~wiking@2001:67c:10ec:5784:8000::3ff] has joined #shogun | 10:31 | |
wiking_ | gf712: around? | 10:36 |
---|---|---|
-!- wiking_ is now known as wiking | 10:36 | |
-!- wiking [~wiking@2001:67c:10ec:5784:8000::3ff] has quit [Changing host] | 10:36 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 10:36 | |
-!- mode/#shogun [+o wiking] by ChanServ | 10:36 | |
@wiking | lisitsyn: pingu | 10:57 |
gf712 | wiking hey! | 11:16 |
@wiking | i'll push some wip | 11:17 |
@wiking | lemme know what u think about it | 11:17 |
gf712 | cool! | 11:17 |
gf712 | on your coreml branch? | 11:17 |
@wiking | yes | 11:17 |
@wiking | https://github.com/shogun-toolbox/shogun/commit/68c0ee2da0369a0f479e86b5f54b6003adce8b61 | 11:18 |
gf712 | wiking: OK, I'll have a look now | 11:19 |
@wiking | thnx | 11:20 |
@wiking | i'm wondering whether u can think of a simplification for the visitor pattern | 11:20 |
@wiking | i still have a problem of registering constructors to the registry :) | 11:21 |
@wiking | since i need a way to have an std::map<std::string, std::function<CTOR?>> | 11:21 |
@wiking | gf712: btw i think we have a problem | 11:43 |
@wiking | :) | 11:43 |
gf712 | ah ok :( | 11:43 |
@wiking | gf712: the version patch is contaminating the ccache :( | 11:43 |
gf712 | I just finished going through the code | 11:43 |
@wiking | so basically when version changes (git commit) the whole source code is recompiled from scratch | 11:44 |
gf712 | ah yes, because it affects all the translation units? | 11:44 |
@wiking | and ccache is not working :?( | 11:44 |
@wiking | just realised on my machine | 11:44 |
@wiking | and i think this is why now pr CIs take so long | 11:44 |
@wiking | i mean i cannot think of anything | 11:44 |
@wiking | else | 11:44 |
gf712 | I thought the ccache would update? | 11:44 |
@wiking | yeah it updates | 11:44 |
@wiking | but none of the code hits | 11:45 |
@wiking | cache | 11:45 |
@wiking | i've changed stuff in the coreml source code | 11:45 |
@wiking | ie. has nothing to do with libshogun | 11:45 |
@wiking | and did a git commit locally | 11:45 |
@wiking | suddenly i see that libshogun is being recompiled from scratch | 11:45 |
@wiking | and no ccache hits as it takes a long while to compile the code | 11:45 |
@wiking | i mean libshogun | 11:45 |
@wiking | :( | 11:45 |
@wiking | i think this is because | 11:46 |
@wiking | there's a header change with constexpr | 11:46 |
@wiking | (just thinking out loud) in version.h | 11:46 |
@wiking | and that is being included everywhere | 11:46 |
gf712 | yes | 11:46 |
@wiking | src/shogun/base/SGObject.h:#include <shogun/base/Version.h> | 11:46 |
@wiking | anyhow we shoudl fix this | 11:47 |
gf712 | but shouldn't the cache have updated after that was included in the develop branch? | 11:47 |
@wiking | yes | 11:47 |
@wiking | but think about it | 11:47 |
@wiking | every commit will change the content of Version.h | 11:47 |
gf712 | oh right | 11:48 |
@wiking | and since it's included in SGObject | 11:48 |
@wiking | doesn't matter what you have in ccache | 11:48 |
gf712 | hmmm | 11:48 |
@wiking | it'll recompile | 11:48 |
@wiking | anyhow | 11:48 |
gf712 | and I was thinking it would make things a bit quicker with the constexpr.. | 11:48 |
@wiking | wanna talk about the coreml stuff | 11:48 |
@wiking | gf712: yeah but not :) | 11:48 |
@wiking | since now SGObject.h is changing | 11:48 |
@wiking | and if that changes | 11:49 |
@wiking | then ccache is NOP{ | 11:49 |
@wiking | *nop | 11:49 |
gf712 | ok, might be worth reverting it then | 11:49 |
gf712 | anyway | 11:49 |
gf712 | yes the coreml stuff | 11:50 |
@wiking | yeah those thing need to go into implementation unfortunately :( | 11:50 |
@wiking | btw it should be enough to revert this https://github.com/shogun-toolbox/shogun/commit/46f7838f3c0815e821a3bd0b8805e152e26e9da7 | 11:52 |
@wiking | the python stuff can stay i guess | 11:52 |
gf712 | yup, the python stuff is useful and shouldn't affect it | 11:52 |
gf712 | but need to keep the main version getter | 11:53 |
gf712 | wiking so you store stuff in a map in the macro | 11:54 |
gf712 | and then get it in the converter right? | 11:54 |
gf712 | but then you don't have info about the template | 11:55 |
gf712 | other than querying CMachine? | 11:55 |
@wiking | mmm so now the factory part is not working yet | 11:56 |
@wiking | coz there actually need a factory for each converter to be registered | 11:57 |
@wiking | so either a typedef std::function<std::shared_ptr<ICoreMLConverter>(std::shared_ptr<CoreML::Specification::Model>)> ConverterFactoryFunction | 11:58 |
@wiking | should be registered | 11:58 |
@wiking | or a ctor | 11:58 |
@wiking | but afaik ctors cannot be registered :) | 11:58 |
@wiking | i mean with std::function | 11:58 |
@wiking | or? :) | 11:58 |
gf712 | no you can't | 11:58 |
@wiking | but if i go with the one above ConverterFactoryFunction | 11:59 |
gf712 | because it would make it very messy | 11:59 |
@wiking | then i need to add a static function | 11:59 |
@wiking | to the converters | 11:59 |
gf712 | you mean the &shogun::coreml::convert_svm for example? | 12:02 |
gf712 | sorry it's quite a lot of code so trying to find out how it works :p | 12:03 |
@wiking | ICoreMLConverter::create | 12:03 |
@wiking | but yeah that wont work :) | 12:04 |
@wiking | i mean there's need to be a static function that is like a factory | 12:04 |
@wiking | static std::shared_ptr<ICoreMLConverter> create(std::shared_ptr<CoreML::Specification::Model>); | 12:04 |
gf712 | oh right | 12:05 |
gf712 | yea | 12:05 |
@wiking | and then comes the problem | 12:05 |
@wiking | since it's static | 12:05 |
@wiking | type info :) | 12:05 |
@wiking | but yeah maybe it should be done via the visitor | 12:05 |
@wiking | so ICoreMLConverter has a sharedptr create(visitor.....) | 12:06 |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 12:06 | |
@wiking | and then in the visitor there's the actual implementation of this | 12:06 |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 12:07 | |
-!- mode/#shogun [+o besser82] by ChanServ | 12:07 | |
@wiking | that wont work either | 12:08 |
@wiking | lemme think | 12:08 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has joined #shogun | 12:10 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 12:10 | |
gf712 | wiking what won't work? | 12:11 |
@wiking | might just | 12:12 |
@wiking | gf712: | 12:16 |
@wiking | ok so here's the thing | 12:16 |
@wiking | we need to add a static method to ICoreMLConverter that is the factory method right? | 12:16 |
@wiking | so that we can call it from the std::map | 12:16 |
@wiking | so something like this | 12:17 |
@wiking | static std::shared_ptr<ICoreMLConverter> create(std::shared_ptr<CoreML::Specification::Model>); | 12:17 |
@wiking | i cannot put there in the function arg visitor | 12:17 |
@wiking | as actually that visitor we wanna create or? :) | 12:17 |
@wiking | i mean the class' visitor | 12:17 |
@wiking | or the visitor's class :) | 12:17 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has quit [Ping timeout: 245 seconds] | 12:20 | |
-!- Lefteris [836fb90d@gateway/web/freenode/ip.131.111.185.13] has joined #shogun | 12:23 | |
gf712 | wiking oh man this is giving me a headache, not used to these patterns :D | 12:25 |
@wiking | hehehe | 12:26 |
@wiking | have a better idea ? :) | 12:26 |
@wiking | i'm open to anything | 12:26 |
gf712 | so what is the fundamental issue? | 12:27 |
@wiking | now with this design | 12:27 |
@wiking | that i cannot implement a std::function<std::shared_ptr<ICoreMLConverter>(std::shared_ptr<CoreML::Specification::Model>)> | 12:27 |
@wiking | ok weird question | 12:29 |
@wiking | if i simply add | 12:29 |
@wiking | std::shared_ptr<ICoreMLConverter> create(std::shared_ptr<CoreML::Specification::Model>); | 12:29 |
@wiking | to CoreMLConverter | 12:29 |
@wiking | none static | 12:29 |
@wiking | and do a template spec like this | 12:29 |
@wiking | template<> | 12:29 |
@wiking | std::shared_ptr<ICoreMLConverter> CoreMLConverter<CSVM, CoreML::Specification::SupportVectorRegressor>::create(std::shared_ptr<CoreML::Specification::Model> model_spec) | 12:29 |
@wiking | { | 12:29 |
@wiking | return std::make_shared<SVMRegressorConverter>(model_spec); | 12:29 |
@wiking | } | 12:29 |
@wiking | any ideas why do i get | 12:29 |
@wiking | "void shogun::coreml::visitor::visit<shogun::coreml::CoreMLConverter<shogun::CSVM, CoreML::Specification::SupportVectorRegressor> const, shogun::CSVM const>(shogun::coreml::CoreMLConverter<shogun::CSVM, CoreML::Specification::SupportVectorRegressor> const*, shogun::CSVM const*)", referenced from: | 12:29 |
@wiking | shogun::coreml::CoreMLConverter<shogun::CSVM, CoreML::Specification::SupportVectorRegressor>::convert(shogun::coreml::visitor&, shogun::CMachine const*) const in SVMConverter.cc.o | 12:29 |
@wiking | aaah fuck | 12:31 |
@wiking | just a sec | 12:31 |
gf712 | hmm? what's the error? | 12:31 |
@wiking | nononoooooo | 12:31 |
@wiking | that's the error | 12:32 |
@wiking | it's a linker error | 12:32 |
@wiking | so if i add the ctor of SVMRegressorConverter | 12:33 |
@wiking | into this | 12:34 |
@wiking | template<> | 12:34 |
@wiking | std::shared_ptr<ICoreMLConverter> CoreMLConverter<CSVM, CoreML::Specification::SupportVectorRegressor>::create(std::shared_ptr<CoreML::Specification::Model> model_spec) | 12:34 |
@wiking | which should be the implementation for the factory function for SVMRegressorConverter | 12:34 |
@wiking | then i get this linker error | 12:34 |
@wiking | as soon as i remove the ctor | 12:34 |
@wiking | it's all ok | 12:34 |
@wiking | dont get it | 12:35 |
@wiking | gf712: ok i have a solution | 12:52 |
@wiking | super ugly | 12:52 |
@wiking | but now i cannot get reference on that function | 12:57 |
@wiking | asdf | 12:57 |
@wiking | gf712: https://pastebin.com/XU8x51Wq | 12:58 |
@wiking | :D | 12:58 |
-shogun-buildbot:#shogun- Build deb4 - python3 #489 is complete: Failure [failed test python (failure)] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/489 | 13:03 | |
gf712 | wiking ok, just having lunch, I'll have a look in a bit :D | 13:09 |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 13:09 | |
gf712 | template<> template<> is a thing? | 13:09 |
@wiking | apparently | 13:11 |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 13:12 | |
-!- mode/#shogun [+o besser82] by ChanServ | 13:12 | |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has joined #shogun | 13:21 | |
gf712 | wiking that is indeed some super ugly line of code | 13:21 |
-!- mode/#shogun [+o HeikoS] by ChanServ | 13:21 | |
Lefteris | Guys, is there a problem with the octave CI? | 13:23 |
Lefteris | I am asking because last night it failed but on my PC it was fine | 13:25 |
@HeikoS | Lefteris we would need error msg etc | 13:26 |
@HeikoS | lets see what the CI says for this one | 13:26 |
@HeikoS | and if there is an error we have to fix it | 13:26 |
Lefteris | Yes | 13:26 |
@HeikoS | it might well be that it behaves differently for different versions | 13:27 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has quit [Ping timeout: 272 seconds] | 13:36 | |
@wiking | gf712: this is like impossible to solve :D | 13:39 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has joined #shogun | 13:54 | |
-!- mode/#shogun [+o HeikoS] by ChanServ | 13:54 | |
@HeikoS | Lefteris can you gist the octave example? | 13:54 |
@wiking | gf712: i've got into a deadlock | 14:00 |
@wiking | i'll push the stuff now in | 14:00 |
gf712 | OK, I can have another look later today! | 14:01 |
@wiking | thnx | 14:01 |
@wiking | i'll be hacking | 14:01 |
@wiking | the problem is there's a linker error | 14:01 |
@wiking | compiles just fine | 14:01 |
@wiking | :)))) | 14:01 |
@HeikoS | Lefteris I commented..... another problem with the PR :D | 14:04 |
@HeikoS | wiking lisitsyn around? | 14:07 |
@wiking | a bit | 14:07 |
@HeikoS | I noticed something annoying | 14:07 |
@HeikoS | when I started hiding LibLinear from SWIG | 14:07 |
@HeikoS | this means that the solver type enums are also hidden | 14:07 |
@HeikoS | so examples fail | 14:07 |
@HeikoS | so either we make enums visible to swig | 14:08 |
@wiking | :> | 14:08 |
@HeikoS | or we refactor somehow the way to specify things like solver types | 14:08 |
@HeikoS | if we go for a) we need to move them to a global file as otherwise it is messy | 14:08 |
@HeikoS | but then plugins ... | 14:08 |
@HeikoS | plugins and enums seems to be a problem | 14:09 |
@wiking | there's quite a lot of enums actually we need to get rid of in base classes | 14:10 |
@wiking | but about this.... mmmm that's a good q | 14:10 |
@wiking | HeikoS: btw do not commit stuff locally atm as that contaminates your whole ccache | 14:11 |
@wiking | :D | 14:11 |
@wiking | fix is coming though https://github.com/shogun-toolbox/shogun/pull/4496 | 14:12 |
@wiking | :) | 14:12 |
@HeikoS | yes I saw :) | 14:12 |
@HeikoS | locally means also I cannot push to my PRs? | 14:12 |
@HeikoS | or only the dev branch? | 14:12 |
@wiking | wherever you commit | 14:12 |
@HeikoS | ok | 14:12 |
@HeikoS | ill stop | 14:12 |
@wiking | that is based on develop | 14:12 |
@wiking | then you are just constantly killiung your ccache | 14:12 |
@wiking | i mean it's up to how much electricity and time you have | 14:12 |
@wiking | ;) | 14:12 |
@HeikoS | lol | 14:13 |
@wiking | just as an advice | 14:13 |
@HeikoS | i dont compile locally actually | 14:13 |
@wiking | ahahhahah | 14:13 |
@wiking | ok | 14:13 |
@HeikoS | donbot | 14:13 |
@wiking | then it's fine | 14:13 |
@wiking | :) | 14:13 |
@HeikoS | and azure | 14:13 |
@HeikoS | ah I was actually wondering why it started from scratch | 14:13 |
@HeikoS | but anyhow | 14:13 |
@HeikoS | global list of enums doesnt work for plugins | 14:13 |
@wiking | yes i know | 14:13 |
@HeikoS | so | 14:13 |
@HeikoS | strings? :D | 14:13 |
@wiking | hahahahah | 14:13 |
@HeikoS | lisitsyn ^ | 14:14 |
@HeikoS | sergey we need you | 14:14 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has quit [Ping timeout: 240 seconds] | 14:21 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection] | 14:24 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 14:25 | |
-!- mode/#shogun [+o wiking] by ChanServ | 14:25 | |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 15:09 | |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 15:12 | |
-!- mode/#shogun [+o besser82] by ChanServ | 15:12 | |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has joined #shogun | 15:22 | |
HeikoS | lisitsyn | 15:23 |
HeikoS | wiking you ever came across this lib: | 15:31 |
HeikoS | https://github.com/aantron/better-enums | 15:31 |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 15:31 | |
@wiking | DONE | 15:36 |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 15:37 | |
-!- mode/#shogun [+o besser82] by ChanServ | 15:37 | |
@wiking | ccache asdf | 15:38 |
@wiking | :D | 15:38 |
@wiking | i commited :D | 15:38 |
HeikoS | hehe :) | 15:39 |
HeikoS | let me rebase | 15:39 |
HeikoS | so wiking | 15:40 |
@wiking | yes | 15:40 |
HeikoS | we basically need a way to convert strings to enums | 15:40 |
HeikoS | so that interfaces can specify stuff | 15:40 |
HeikoS | but we keep the enums in the c++ | 15:40 |
@wiking | so swig only hacko? | 15:41 |
HeikoS | yes | 15:41 |
HeikoS | machine("LibLinear", solver_type="my_solver") | 15:41 |
HeikoS | and then something like | 15:41 |
HeikoS | enum myenum = _from_string("my_solver") | 15:41 |
HeikoS | and that is passed on to the actual put in libshogun | 15:41 |
HeikoS | this lib above does that, but it requires changing the enum types :( | 15:42 |
HeikoS | I wonder what other options there would be | 15:42 |
HeikoS | we want to avoid having strings in c++ level | 15:42 |
HeikoS | but we also cannot enum types in interface level | 15:42 |
HeikoS | every plugin basically needs to know how to instantiate its own enum defitions from strings | 15:43 |
HeikoS | and when a plugin is shipped, the enum comes in the header file | 15:43 |
HeikoS | pure dynamic loading of plugin is still tricky as that requires to specify enums from c++ without knowing the type != meh | 15:44 |
HeikoS | ah fuck | 15:44 |
HeikoS | with plugins, this also comes to the c++ code | 15:44 |
HeikoS | the problem I mean | 15:44 |
HeikoS | only base types are available and that includes enums of plugins are not part of API and there we go | 15:45 |
HeikoS | so we need a base type that can represent enum-style choices | 15:45 |
HeikoS | looks like string :( | 15:45 |
HeikoS | ok Ill sign off for today. will get back on this later | 15:46 |
HeikoS | see you | 15:46 |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has quit [Ping timeout: 240 seconds] | 15:51 | |
-!- Lefteris [836fb90d@gateway/web/freenode/ip.131.111.185.13] has quit [Quit: Page closed] | 15:57 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection] | 16:08 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 16:08 | |
-!- mode/#shogun [+o wiking] by ChanServ | 16:09 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 264 seconds] | 16:13 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 16:19 | |
-!- mode/#shogun [+o wiking] by ChanServ | 16:19 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Ping timeout: 268 seconds] | 16:24 | |
-!- wiking [~wiking@inf-ise-etx-dock-1-111.ethz.ch] has joined #shogun | 16:48 | |
-!- wiking [~wiking@inf-ise-etx-dock-1-111.ethz.ch] has quit [Changing host] | 16:48 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 16:48 | |
-!- mode/#shogun [+o wiking] by ChanServ | 16:48 | |
@wiking | gf712: ccache is back on CI | 16:53 |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Remote host closed the connection] | 17:04 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 17:43 | |
-!- mode/#shogun [+o wiking] by ChanServ | 17:43 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun | 17:44 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Read error: Connection reset by peer] | 17:44 | |
gf712 | wiking: good! | 17:44 |
wiking_ | gf712: refactored the thing | 17:44 |
wiking_ | now it's much simpler | 17:44 |
wiking_ | and works | 17:44 |
gf712 | ah cool! | 17:44 |
gf712 | so how does it work now? | 17:44 |
wiking_ | gf712: got a sec? | 17:44 |
gf712 | yup | 17:44 |
wiking_ | to discuss some design things? | 17:44 |
wiking_ | ok | 17:44 |
wiking_ | lemme give u pointers | 17:44 |
wiking_ | ok so check this part | 17:45 |
wiking_ | https://github.com/shogun-toolbox/shogun/commit/49f91d4234c655bbbb922627e9ae3995e9b44588#diff-da43a277a1ec4e07e2d2c8d37d31e475R82 | 17:45 |
wiking_ | starting from line 92 is the actual core of the converter | 17:46 |
wiking_ | and for example everything between 82-92 is redundant code (you would need to do the same thing in every converter,... | 17:46 |
wiking_ | ass well as the catch/return part | 17:46 |
wiking_ | obviously some of the things are type params like SVMRegressorConverterType::supported_types | 17:47 |
wiking_ | etc | 17:47 |
wiking_ | or CoreML::Specification::SupportVectorRegressor | 17:47 |
gf712 | yup I see | 17:47 |
wiking_ | but i wonder | 17:47 |
wiking_ | if there's a nice way to do this wrapping | 17:47 |
wiking_ | so that you dont need to just write the actual conversion part there | 17:48 |
wiking_ | and write the checker/try/catch somewhere once | 17:48 |
wiking_ | https://github.com/shogun-toolbox/shogun/commit/49f91d4234c655bbbb922627e9ae3995e9b44588#diff-da43a277a1ec4e07e2d2c8d37d31e475R126 is similar | 17:48 |
wiking_ | i mean you could just do REGISTER_CONVERTER(SVMRegressorConverter) and the rest could be assumed internally in the macro | 17:48 |
gf712 | I guess you can write another function that takes ConverterType? | 17:49 |
gf712 | hmm yes macro makes it simpler | 17:49 |
wiking_ | of course in a way if you dont define SVMRegressorConverter[Type] then the macro will fail compile time | 17:49 |
wiking_ | this way since u need to pass it explicitly | 17:49 |
wiking_ | this is assured that there are no implicit things | 17:49 |
wiking_ | but then again its just shitty code that is being copypasted | 17:49 |
wiking_ | :) | 17:49 |
gf712 | you mean copy pasted by the macro? | 17:50 |
wiking_ | so now i listen to your ideas | 17:50 |
wiking_ | so i mean | 17:50 |
wiking_ | REGISTER_CONVERTER(SVMRegressorConverter, SVMRegressorConverterType::supported_types, []() { return std::make_shared<SVMRegressorConverter>(); }) | 17:50 |
gf712 | oh right yes | 17:50 |
wiking_ | this way there's no implicit things going on | 17:50 |
wiking_ | but | 17:50 |
wiking_ | i could simply do this | 17:50 |
wiking_ | REGISTER_CONVERTER(SVMRegressorConverter, SVMRegressorConverterType::supported_types, []() { return std::make_shared<SVMRegressorConverter>(); }) | 17:50 |
wiking_ | i meang | 17:50 |
wiking_ | REGISTER_CONVERTER(SVMRegressorConverter) | 17:50 |
wiking_ | and assume that SVMRegressorConverterType is defined | 17:51 |
gf712 | I would say that is dangerous | 17:51 |
wiking_ | i mean that lambda definitely should go within the macro | 17:51 |
wiking_ | gf712: i mean it's compile time | 17:51 |
gf712 | because then in the future people might not understand that | 17:51 |
gf712 | when they add stuff? | 17:51 |
wiking_ | idk why i cannot refer to supported_types via SVMRegressorConverter:: supported_types | 17:51 |
wiking_ | yeye | 17:52 |
wiking_ | i mean usually thats a good design | 17:52 |
wiking_ | that you dont do these type of implicit assumptions | 17:52 |
wiking_ | and ask for the user to provide stuff | 17:52 |
wiking_ | hence maybe the lambda shoudl stay as well | 17:52 |
wiking_ | but i really believe that that's really not necessary | 17:52 |
wiking_ | because later maybe the user want to have a different factory method for a given class? :) | 17:53 |
wiking_ | of course i could define 2 macros | 17:53 |
wiking_ | one where everything is explicit | 17:53 |
wiking_ | 2nd where the factory method is generated by the macro itself | 17:53 |
gf712 | hmmm I would say keep the lambda one even though it's verbose? | 17:53 |
gf712 | but I guess having the two can't hurt? | 17:53 |
gf712 | anyway so what do you mean with "i cannot refer to supported_types via SVMRegressorConverter:: supported_types" | 17:54 |
gf712 | ? | 17:54 |
wiking_ | see that now the list is provided like this | 17:54 |
wiking_ | SVMRegressorConverterType::supported_types | 17:54 |
wiking_ | which is actually | 17:54 |
wiking_ | CoreMLConverter<CSVM, CoreML::Specification::SupportVectorRegressor>:: supported_types | 17:55 |
wiking_ | it'd be nicer that that set is actually part of the class that inherits from CoreMLConverter<CSVM, CoreML::Specification::SupportVectorRegressor> namely SVMRegressorConverter | 17:55 |
wiking_ | or? :) | 17:55 |
gf712 | hmmm does it? I think it makes sense how it is now no? | 18:00 |
-shogun-buildbot:#shogun- Build deb4 - python3 #490 is complete: Success [build successful] - http://buildbot.shogun-toolbox.org:8080/#builders/28/builds/490 | 18:00 | |
gf712 | actually maybe not | 18:00 |
gf712 | ok, I see why you would want it in SVMRegressorConverter instead | 18:00 |
gf712 | these template<> are really confusing me, not used to writing classes anymore :( | 18:02 |
wiking_ | gf712: anyhow | 18:06 |
wiking_ | first part is more interesting | 18:07 |
wiking_ | to remove all that code | 18:07 |
wiking_ | as it's literally copy-paste | 18:07 |
wiking_ | started to do the GLMRegressorConverter | 18:07 |
wiking_ | and it is all the same | 18:07 |
wiking_ | you have the required | 18:07 |
wiking_ | you have the new obj | 18:07 |
wiking_ | then try catch | 18:08 |
wiking_ | etc | 18:08 |
gf712 | yes, sounds good | 18:08 |
wiking_ | maybe | 18:08 |
wiking_ | i define a helper template | 18:08 |
wiking_ | with some number of args | 18:08 |
gf712 | btw have you tested it? | 18:08 |
wiking_ | gf712: yeye unit tests pass | 18:09 |
wiking_ | i mean | 18:09 |
wiking_ | i haven't ran an obj on mac yet | 18:09 |
wiking_ | :) | 18:09 |
wiking_ | but i've just realised that the CI test instance should actually use macos | 18:09 |
wiking_ | that way i can add integration tests | 18:09 |
gf712 | ah ok! I haven't seen the tests yet | 18:09 |
wiking_ | gf712: i mean it's just a simple unit test | 18:09 |
wiking_ | checks whether the values of the given spec and the original obj | 18:10 |
wiking_ | match | 18:10 |
wiking_ | but i could add an integration test | 18:10 |
wiking_ | that actually runs the model | 18:10 |
wiking_ | using macos' CoreML framework | 18:10 |
wiking_ | :) | 18:10 |
wiking_ | and compare the results | 18:10 |
wiking_ | with CMachine->apply | 18:10 |
gf712 | oh right right | 18:11 |
gf712 | I thought it would be save -> load -> compare if you have the same thing you started with :D | 18:12 |
wiking_ | hehehe | 18:12 |
wiking_ | i dont have load functionality | 18:12 |
wiking_ | here | 18:12 |
wiking_ | this is only one way | 18:12 |
wiking_ | CMachine -> coreml | 18:12 |
gf712 | ah ok! | 18:12 |
gf712 | glad it works though | 18:12 |
wiking_ | ok simplfied | 18:23 |
gf712 | cool! | 18:24 |
gf712 | still compiles? | 18:24 |
wiking_ | yes | 18:25 |
wiking_ | lemme push | 18:25 |
gf712 | OK! I'll have a look later | 18:25 |
gf712 | I gotta go now! | 18:25 |
wiking_ | mmm | 18:25 |
wiking_ | some weird warning | 18:25 |
gf712 | talk to you later! | 18:25 |
wiking_ | i need to see how to fix it | 18:26 |
wiking_ | ttyl | 18:26 |
-!- gf712 [90520889@gateway/web/freenode/ip.144.82.8.137] has quit [Ping timeout: 256 seconds] | 18:30 | |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has joined #shogun | 18:40 | |
-!- HeikoS [4dedf3c3@gateway/web/cgi-irc/kiwiirc.com/ip.77.237.243.195] has quit [Ping timeout: 240 seconds] | 19:00 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has quit [Remote host closed the connection] | 19:24 | |
-!- wiking [~wiking@huwico/staff/wiking] has joined #shogun | 19:50 | |
-!- mode/#shogun [+o wiking] by ChanServ | 19:50 | |
-!- besser82 [~besser82@fedora/besser82] has quit [Remote host closed the connection] | 20:22 | |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 21:33 | |
-!- mode/#shogun [+o besser82] by ChanServ | 21:33 | |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 22:25 | |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 22:25 | |
-!- mode/#shogun [+o besser82] by ChanServ | 22:25 | |
-!- wiking_ [~wiking@c-185-45-237-122.customer.ggaweb.ch] has joined #shogun | 22:29 | |
-!- wiking [~wiking@huwico/staff/wiking] has quit [Read error: Connection reset by peer] | 22:29 | |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 22:38 | |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 22:39 | |
-!- mode/#shogun [+o besser82] by ChanServ | 22:39 | |
-!- besser82 [~besser82@fedora/besser82] has quit [Quit: Freedom, Friends, Features, First [fedoraproject.org]] | 23:22 | |
-!- besser82 [~besser82@fedora/besser82] has joined #shogun | 23:30 | |
-!- mode/#shogun [+o besser82] by ChanServ | 23:30 | |
--- Log closed Thu Jan 31 00:00:51 2019 |
Generated by irclog2html.py 2.10.0 by Marius Gedminas - find it at mg.pov.lt!