mirror of
https://github.com/not-kennethreitz/convore.json.git
synced 2026-06-21 15:40:58 +00:00
1 line
41 KiB
JSON
1 line
41 KiB
JSON
[{"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768337.3383069, "message": "Hello", "group_id": 9959, "id": 1228177}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768346.7626801, "message": "Hey, Pieter, welcome", "group_id": 9959, "id": 1228178}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768469.313971, "message": "For processing of images", "group_id": 9959, "id": 1228200}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768627.553299, "message": "so it is clear where opencl starts to win", "group_id": 9959, "id": 1228232}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768324.862179, "message": "Hey, thouis", "group_id": 9959, "id": 1228173}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768517.8053031, "message": "which backend first? pyopencl?", "group_id": 9959, "id": 1228213}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768945.1552441, "message": "1) having the advantage of all backend code being in one place, but duplicating the file structure 2) having the advantage of all code being local to their module close together", "group_id": 9959, "id": 1228273}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768698.0880129, "message": "I think that we could offer both?", "group_id": 9959, "id": 1228242}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768980.3773589, "message": "And with prospects of increasing?", "group_id": 9959, "id": 1228277}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769066.1956029, "message": "probably won't increase that much", "group_id": 9959, "id": 1228292}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769518.3270309, "message": "thouis: I think the idea is to provide a programmatic way of using different backends", "group_id": 9959, "id": 1228350}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769686.9500141, "message": "so backend= would provide fine-grained control, whereas use_backend would give overall control", "group_id": 9959, "id": 1228375}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769776.8542311, "message": "whereas otherwise you can simply say use_backend(x) and everything works", "group_id": 9959, "id": 1228386}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769964.628674, "message": "Then we're relying on import mechanisms to provide functions", "group_id": 9959, "id": 1228425}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770067.3981731, "message": "The same code should always execute the same way", "group_id": 9959, "id": 1228445}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770099.0496449, "message": "Not necessarily, it can then warn that the backend is not available", "group_id": 9959, "id": 1228448}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770375.082093, "message": "Whichever approach we take, the documentation will always be visible upon inspection, which is important.", "group_id": 9959, "id": 1228498}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770395.838325, "message": "Otherwise, we have to dynamically copy docs around", "group_id": 9959, "id": 1228505}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770887.4621339, "message": "me, too.", "group_id": 9959, "id": 1228581}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769109.438441, "message": "Yes, that makes sense", "group_id": 9959, "id": 1228298}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769219.1089439, "message": "(these backend directories in each submodule folder of course)", "group_id": 9959, "id": 1228312}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769315.451925, "message": "I think we'd probably discourage direct usage of the backends", "group_id": 9959, "id": 1228327}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769352.167141, "message": "when you would use the backend= parameter or the to-be-implemented @add_backends decorator, it would be imported automatically", "group_id": 9959, "id": 1228331}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770014.5947311, "message": "I think that can be supported through more explicit means.", "group_id": 9959, "id": 1228438}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770153.7370241, "message": "If I see use_backend('opencl') at the top, I see the same thing.", "group_id": 9959, "id": 1228457}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768579.136862, "message": "Looking at the proposal... Are we tied to the backend=... method of calling functions?", "group_id": 9959, "id": 1228228}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768783.946223, "message": "Okay. That can be discussed over email. But I think it should get a little time up front, before things become too solidified.", "group_id": 9959, "id": 1228258}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768785.5376301, "message": "Great", "group_id": 9959, "id": 1228259}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769095.4468279, "message": "I think it's easier on developers to have them close to the non-backend code.", "group_id": 9959, "id": 1228297}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770724.767947, "message": "I see", "group_id": 9959, "id": 1228556}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768537.71193, "message": "Yeah, opencl will be one of our main targets", "group_id": 9959, "id": 1228219}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768574.6561241, "message": "And just show the calling convention for Sobel, to see how it works", "group_id": 9959, "id": 1228227}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768655.3792341, "message": "At the moment I've implemented the initial suggestion of a backend parameter, but going for decorators would be ncie", "group_id": 9959, "id": 1228235}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768713.4565051, "message": "and then opencv is used preferably", "group_id": 9959, "id": 1228246}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768772.4174769, "message": "Pieter will push the code to github this weekend so that you can take a look", "group_id": 9959, "id": 1228257}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768855.928869, "message": "Yes that would work", "group_id": 9959, "id": 1228265}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769058.962904, "message": "Yes I feel the same", "group_id": 9959, "id": 1228290}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769295.4846721, "message": "so you can import submodule.function or submodule.backend.backendtype.function?", "group_id": 9959, "id": 1228323}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769335.36532, "message": "In case we need to restructure later", "group_id": 9959, "id": 1228330}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769417.838423, "message": "I would much prefer avoiding the keyword method, unless there's some justification I'm missing.", "group_id": 9959, "id": 1228338}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769476.1407471, "message": "I think the decorator approach would be a great default way", "group_id": 9959, "id": 1228346}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769974.408145, "message": "So we can't switch between backends easily at all", "group_id": 9959, "id": 1228429}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770495.6572299, "message": "and the code that uses it?", "group_id": 9959, "id": 1228523}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768331.718405, "message": "Chris won't be able to make it today, unfortunately", "group_id": 9959, "id": 1228176}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768369.1369171, "message": "Pieter just showed me what he did this week, so maybe he can just give you a quick summary", "group_id": 9959, "id": 1228180}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768923.3237939, "message": "There were two options we discussed: 1) having the backend info all grouped in one place or 2) adding backend directories to each submodule", "group_id": 9959, "id": 1228272}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769548.18646, "message": "if we only use module structures, this can't be done easily", "group_id": 9959, "id": 1228355}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769756.623225, "message": "thouis: problem is, backends don't support all functions", "group_id": 9959, "id": 1228382}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770125.9751821, "message": "If you read sobel(..., backend=opencl) everybody knows what you are doing", "group_id": 9959, "id": 1228452}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770137.240572, "message": "or use_backend(opencl)", "group_id": 9959, "id": 1228454}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770191.9226389, "message": "unless we hack into the import mechanisms", "group_id": 9959, "id": 1228463}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768721.700947, "message": "Otherwise, to change a large piece of code is painful", "group_id": 9959, "id": 1228248}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768877.9461679, "message": "Another thing worthy of discussion is how and where the backend code would be stored", "group_id": 9959, "id": 1228266}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768963.2463989, "message": "about 10", "group_id": 9959, "id": 1228276}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768986.0581009, "message": "and how many will get backends?", "group_id": 9959, "id": 1228278}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769243.383158, "message": "The default numpy code would remain in edges.py in the submodule dir", "group_id": 9959, "id": 1228315}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769398.8070869, "message": "@add_backends decorator would automatically scan the directory, pick up which backends are available, and add those options for the backend= keyword, right?", "group_id": 9959, "id": 1228336}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769460.248467, "message": "but users may also want to try the different options", "group_id": 9959, "id": 1228345}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768392.63076, "message": "Nope, Chris won't make it", "group_id": 9959, "id": 1228186}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768458.775537, "message": "for processing images, or capture?", "group_id": 9959, "id": 1228198}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768828.4074709, "message": "While other backends would be more broad strokes", "group_id": 9959, "id": 1228262}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768913.976825, "message": "Things can get overengineered pretty quickly, and if we could make it simple as possible it would be a plus", "group_id": 9959, "id": 1228271}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769116.9482751, "message": "I think that's the way Pieter also implemented it so far", "group_id": 9959, "id": 1228299}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769230.7467561, "message": "That sounds reasonable; if we have too many files to deal with we can always regroup them using a different strategy", "group_id": 9959, "id": 1228313}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769446.2982359, "message": "benchmarking is one that benefits developers", "group_id": 9959, "id": 1228342}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769779.6568379, "message": "can't it always default up to numpy?", "group_id": 9959, "id": 1228387}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769855.034194, "message": "Or even:", "group_id": 9959, "id": 1228399}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770296.563674, "message": "source module", "group_id": 9959, "id": 1228481}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768555.5683069, "message": "Do you have those benchmarks handy, on the large images?", "group_id": 9959, "id": 1228221}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770050.814873, "message": "I would like the scikit to look the same on all systems", "group_id": 9959, "id": 1228442}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768312.6971509, "message": "Hello.", "group_id": 9959, "id": 1228172}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768423.0955629, "message": "Ok, so we are first tackling the backend aspect of the gsoc", "group_id": 9959, "id": 1228193}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768809.9310529, "message": "Something like opencl only starts to show dividends in certain situations, so selecting it for a specific function makes more sense.", "group_id": 9959, "id": 1228261}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769676.1061621, "message": "yes.", "group_id": 9959, "id": 1228372}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769736.358088, "message": "transparent means that when I import sobel() from some backend, I can see that it's from that backend just by typing \"sobel\" at the prompt", "group_id": 9959, "id": 1228380}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769758.65119, "message": "So, for the \"move from one backend to another\", there is use_backend()", "group_id": 9959, "id": 1228383}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769869.271667, "message": "The user specifies a resolution order (opencl, opencv, numpy).", "group_id": 9959, "id": 1228401}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770387.542176, "message": "My only argument against the keyword approach is difficulty of introspection", "group_id": 9959, "id": 1228502}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770475.849647, "message": "then continue executing the default numpy implementation", "group_id": 9959, "id": 1228521}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770496.359616, "message": "Pieter, do you have that code snippet I sent on?", "group_id": 9959, "id": 1228524}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768385.872664, "message": "Are we waiting for Chris?", "group_id": 9959, "id": 1228182}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768517.9000461, "message": "I've continued with the sobel operator as test case and have made opencv and opencl versions for the existent numpy case", "group_id": 9959, "id": 1228214}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768527.9382639, "message": "ok.", "group_id": 9959, "id": 1228217}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768655.3307021, "message": "OpenCV is very fast, so it's great to see on such an early benchmark that this is a good approach", "group_id": 9959, "id": 1228234}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768681.9012799, "message": "Is it possible to make it more like matplotlib's use() function?", "group_id": 9959, "id": 1228239}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768702.36902, "message": "Once we do the backend setup using a decorator, this can be done", "group_id": 9959, "id": 1228243}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768705.2307529, "message": "use_backend(\"opencv\")", "group_id": 9959, "id": 1228244}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768709.942095, "message": "Yup", "group_id": 9959, "id": 1228245}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768721.7162089, "message": "where available", "group_id": 9959, "id": 1228249}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768722.324136, "message": "?", "group_id": 9959, "id": 1228250}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768745.4637771, "message": "numpy by default of couse", "group_id": 9959, "id": 1228253}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768787.6519871, "message": "Currently, the backend selection etc. is fairly manual... but everything's in place", "group_id": 9959, "id": 1228260}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306768945.8760171, "message": "how many submodules are there?", "group_id": 9959, "id": 1228274}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769022.3238821, "message": "I would prefer 2, with common code grouped in a top level backends directory, I think.", "group_id": 9959, "id": 1228280}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769045.5816751, "message": "I think all of the modules could benefit from other backends", "group_id": 9959, "id": 1228285}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769075.6790481, "message": "those are rough categories of algorithms", "group_id": 9959, "id": 1228294}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769133.1901469, "message": "At the moment I've been thinking of a name based system", "group_id": 9959, "id": 1228301}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769529.395004, "message": "Would the decorator way be more appealing than the keyword approach?", "group_id": 9959, "id": 1228352}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769568.943958, "message": "sorry, I don't follow", "group_id": 9959, "id": 1228358}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769582.1403971, "message": "for backend in (numpy, opencl): x = backend.sobel(...)", "group_id": 9959, "id": 1228359}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769633.254781, "message": "use_backend() might be too large a hammer.", "group_id": 9959, "id": 1228365}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769795.2118621, "message": "I don't mind the use_backend(x) approach, but I'd like to also be able to pick and choose.", "group_id": 9959, "id": 1228389}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769834.8342471, "message": "not necessarily.", "group_id": 9959, "id": 1228393}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769844.968915, "message": "in the backend, it could import from the numpy backend", "group_id": 9959, "id": 1228396}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769318.910764, "message": "sorry, fell behind there.", "group_id": 9959, "id": 1228329}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769595.343312, "message": "let me rephrase that", "group_id": 9959, "id": 1228361}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769661.8461289, "message": "One could consider a case where it would be useful to switch a project entirely to another backend", "group_id": 9959, "id": 1228369}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769991.0354581, "message": "for testing, you mean?", "group_id": 9959, "id": 1228432}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770058.0437961, "message": "With all backends present?", "group_id": 9959, "id": 1228443}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770086.598006, "message": "So if a backend is not present, it should fail?", "group_id": 9959, "id": 1228446}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770211.3561339, "message": "I'm suggesting that if I have: use_backends('opencl', 'opencv', 'numpy') at the top, when I look at \"sobel\" down below, it tells me which module it came from", "group_id": 9959, "id": 1228465}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770255.158494, "message": "via use_backend?", "group_id": 9959, "id": 1228471}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306768611.8068609, "message": "For a large image we have \nopencv 0.198058843613\nopencl 0.0707352161407", "group_id": 9959, "id": 1228230}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768721.333883, "message": "numpy", "group_id": 9959, "id": 1228247}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769809.767514, "message": "backend.some_func_that_is_not_implemented(...)", "group_id": 9959, "id": 1228392}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770257.98312, "message": "yeap", "group_id": 9959, "id": 1228472}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306768839.0059259, "message": "So, basically, use_backend(backend=opencv_backend) gets overridden by sobel(x, ..., backend=opencl)", "group_id": 9959, "id": 1228263}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769160.3973501, "message": "edges.py -> backend/edges_opencl.py", "group_id": 9959, "id": 1228308}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769552.2011721, "message": "Having to chase two levels (and know the defaults and the keyword along the way) makes it much more difficult to examine the underlying code.", "group_id": 9959, "id": 1228357}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769592.11777, "message": "well..", "group_id": 9959, "id": 1228360}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769694.6163459, "message": "I'd aim for explicit, transparent, and simple", "group_id": 9959, "id": 1228378}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770163.1152151, "message": "I'm not suggesting hiding that.", "group_id": 9959, "id": 1228459}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770308.199995, "message": "this can't be done dynamically, I agree.", "group_id": 9959, "id": 1228484}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770434.0654769, "message": "How does the decorator approach look, and work?", "group_id": 9959, "id": 1228511}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769150.761894, "message": "where each file in the module is mirrored by another file in the backend directory", "group_id": 9959, "id": 1228305}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769171.0116999, "message": "and backend/edges_opencv.py", "group_id": 9959, "id": 1228309}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769185.629606, "message": "The idea was to avoid subdirectories and keep things as flat as possible", "group_id": 9959, "id": 1228311}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769431.4207981, "message": "I can think of many uses", "group_id": 9959, "id": 1228341}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769447.7869401, "message": "or comparison", "group_id": 9959, "id": 1228343}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769449.5998759, "message": "It's much easier when debugging, for instance, to check a function's __module__ slot to find out where to look at the code", "group_id": 9959, "id": 1228344}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769540.001668, "message": "thouis: e.g., for backend in (numpy, opencl): x = sobel(..., backend=backend)", "group_id": 9959, "id": 1228354}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306769598.8185239, "message": "would the alternative be to use_backend()?", "group_id": 9959, "id": 1228362}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769610.7452099, "message": "hrm, backend.filter.sobel(...)?", "group_id": 9959, "id": 1228363}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769741.38381, "message": "We've followed a very similar approach on the plugin infrastructure", "group_id": 9959, "id": 1228381}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769766.5336471, "message": "so if you switch from numpy to opencl, you may have to modify your code, which won't be fun", "group_id": 9959, "id": 1228384}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769796.832334, "message": "but then you have to implement those logistics in each backend?", "group_id": 9959, "id": 1228390}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769643.607229, "message": "holtzhau: I think use_backend and the decorator suffer from the same problem (if it is a problem)", "group_id": 9959, "id": 1228366}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769694.002934, "message": "but not sure how to improve the inspection side of things", "group_id": 9959, "id": 1228377}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769988.33145, "message": "Which makes them untestable", "group_id": 9959, "id": 1228431}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770008.3934281, "message": "Yes, or benchmarking, or result comparison, or whatever", "group_id": 9959, "id": 1228436}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769908.8505371, "message": "The submodule imports everything from numpy, then tries to replace them with opencv, then opencl.", "group_id": 9959, "id": 1228412}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306769943.5933549, "message": "That would seem a lot more complex", "group_id": 9959, "id": 1228422}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770087.91803, "message": "So having code that explicitly chooses a backend strikes me as an important documentation feature", "group_id": 9959, "id": 1228447}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770195.7518671, "message": "I'm still trying to get my head around thouis' approach, so by testing it out a bit:\nfrom scikits.image.backend import opencv\nopencv.sobel(image)\nto me it seems that we are calling a opencv function (and there exists a slightly deprecated opencv functionality in the scikit). The fact that the api remains the same for all sobel functions are communicated clearly? For example sobel supports magnitude and on which axis you operate.", "group_id": 9959, "id": 1228464}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770237.589231, "message": "ok, so let's think what happens when you switch backends again", "group_id": 9959, "id": 1228470}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770324.529012, "message": "For that you need to make import explicit.", "group_id": 9959, "id": 1228490}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306769962.973783, "message": "At import time, yes. Afterward, fairly easy to understand, I think.", "group_id": 9959, "id": 1228424}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770124.4019859, "message": "I agree. But does that documentation have to be at the function call granularity?", "group_id": 9959, "id": 1228451}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770225.9605861, "message": "I don't think it takes much hacking.", "group_id": 9959, "id": 1228469}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770291.8429921, "message": "you reorder the arguments, and the source of sobel() changes.", "group_id": 9959, "id": 1228478}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770468.7064481, "message": "if that can't be found, then raise a warning", "group_id": 9959, "id": 1228520}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770522.0153151, "message": "the decorator is not for users, it's for developers", "group_id": 9959, "id": 1228526}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770547.5300679, "message": "ok.", "group_id": 9959, "id": 1228533}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770060.790385, "message": "If you start messing with imports, you never know what you are dealing with", "group_id": 9959, "id": 1228444}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770107.0732989, "message": "But one should be able to see from the code that a backend is being selected", "group_id": 9959, "id": 1228449}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770166.996139, "message": "OK", "group_id": 9959, "id": 1228460}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770449.721477, "message": "It just modifies the function to try something like:", "group_id": 9959, "id": 1228515}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770458.8515151, "message": "backend.get_function('filter.sobel')", "group_id": 9959, "id": 1228518}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770524.677073, "message": "so you'd do something like", "group_id": 9959, "id": 1228527}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770150.4440329, "message": "But if you use import magick to make that happen, who knows what you're trying to execute?", "group_id": 9959, "id": 1228456}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770186.108196, "message": "But we can't make use_backend('opencl') do what you suggest, I think", "group_id": 9959, "id": 1228461}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770356.967778, "message": "I think we can investigate both approaches.", "group_id": 9959, "id": 1228494}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770678.508435, "message": "Will do", "group_id": 9959, "id": 1228548}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770729.8068261, "message": "You always want the docs via IPython", "group_id": 9959, "id": 1228557}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770857.058481, "message": "Let's see what Chris's feedback is on this as well", "group_id": 9959, "id": 1228575}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770388.07183, "message": "But with the decorator approach, we never need to duplicate documentation", "group_id": 9959, "id": 1228503}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770406.010119, "message": "So you make the trade-off somewhere along the line", "group_id": 9959, "id": 1228506}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770527.5116761, "message": "@add_backends", "group_id": 9959, "id": 1228528}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770531.690809, "message": "def sobel(x, y, z):", "group_id": 9959, "id": 1228529}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770533.390461, "message": "...", "group_id": 9959, "id": 1228531}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770575.2305801, "message": "@add_backends\ndef rgb2hsv(img):\n # Simply put numpy definition here.\n # Then we have a reference implementation,\n # and the backend stuff is automatically added.\n\n # Don't have a reference implementation? OK:\n raise NotImplementedError", "group_id": 9959, "id": 1228536}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770631.883651, "message": "and then users can do rgb2hsb(image, backend=\"opencv\")", "group_id": 9959, "id": 1228539}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770665.25982, "message": "So add_backends could do the import sorting based on use_backends() and return the preferred backend version if it exists.", "group_id": 9959, "id": 1228543}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770667.384577, "message": "Maybe it would be easier to talk about this with code, so let's get the code on github ASAP", "group_id": 9959, "id": 1228544}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770677.987546, "message": "yes, probably.", "group_id": 9959, "id": 1228547}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770703.4513831, "message": "The idea is to document the function right there", "group_id": 9959, "id": 1228553}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770715.0190639, "message": "Then introspection at least gives you the docs, if not the source code", "group_id": 9959, "id": 1228554}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770739.3198581, "message": "I think (?) that's a more common operation that looking at the code", "group_id": 9959, "id": 1228560}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770794.9192369, "message": "I never trust documentation... :)", "group_id": 9959, "id": 1228566}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770797.5243051, "message": "It could do both. Stitch the top-level documentation into the low-level code, while still returning the low-level function to allow more direct introspection.", "group_id": 9959, "id": 1228567}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770813.343992, "message": "That's a little hacky, but only exposed during dynamic introspection, so maybe okay.", "group_id": 9959, "id": 1228570}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770860.2771111, "message": "Unfortunately, I have to run", "group_id": 9959, "id": 1228576}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770874.688745, "message": "But we'll talk next time around some real code, which might make things easier to visualise", "group_id": 9959, "id": 1228578}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770888.69346, "message": "Ok, for next week I'll implement some more functions, and we can finalize the architecture", "group_id": 9959, "id": 1228582}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306771002.408653, "message": "I'll post to my blog", "group_id": 9959, "id": 1228608}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770902.521683, "message": "API and behind the scenes", "group_id": 9959, "id": 1228586}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770922.2630229, "message": "and I mean \"finalize\" in a very fluidic sense ;)", "group_id": 9959, "id": 1228589}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770978.6502249, "message": "Talk to you later. Could you summarize via email, too?", "group_id": 9959, "id": 1228601}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306770989.8084121, "message": "Cheers", "group_id": 9959, "id": 1228604}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770916.7611301, "message": "sounds good.", "group_id": 9959, "id": 1228587}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1306771009.1635351, "message": "but will email as requested", "group_id": 9959, "id": 1228609}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306771011.5213411, "message": "Cool, perfect.", "group_id": 9959, "id": 1228610}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770958.5149341, "message": "Great, thank you for your time, and for the input... these discussions will help to form a better idea of how to do things in the end", "group_id": 9959, "id": 1228598}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770988.706254, "message": "(very short summary)", "group_id": 9959, "id": 1228602}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306770988.8481121, "message": "Sure, Pieter? Will you CC Chris?", "group_id": 9959, "id": 1228603}, {"user_id": 34630, "stars": [], "topic_id": 37401, "date_created": 1306770999.4042349, "message": "Bye", "group_id": 9959, "id": 1228606}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306771001.382385, "message": "Cheers", "group_id": 9959, "id": 1228607}, {"user_id": 22813, "stars": [], "topic_id": 37401, "date_created": 1306809216.9387381, "message": "one thing that I'd like to give some good thought to on the implementation of this, is the laziness with which a backend is selected. Let's assume for a second that I make a call to sobel(some_image, *some_args), and let's assume this by default uses the NumPy backend. Dispatching to the NumPy backend should incur almost zero overhead since I have not specified an alternative backend. That is, the NumPy backend should be probably be imported and available for immediate use from any function. \n\nNow, if I were to make a call to sobel(some_image, *some_args, backend='opencl) (invalid Python syntax notwithstanding), it's acceptable for the first time this function is called to have some import overhead. We don't want the opencl libs imported for people that aren't using them. However, the next time the function is called, there should be no more overhead than calling the default NumPy implementation.\n\nOne idea I had in mind was a lazy backend manager from which we could request function implementations, and with which functions registered themselves. Such a manager could be stateful, so that DEFAULT_STATE could mean many different things if, for example, a user does a \"use_backend('opencl')\" at the module level.", "group_id": 9959, "id": 1233838}, {"user_id": 22813, "stars": [], "topic_id": 37401, "date_created": 1306809272.2632589, "message": "Such a manager would also allow for a central point of optimazation, with say, Cython. For looking up and/or dispatching to the appropriate backend implementations.", "group_id": 9959, "id": 1233839}, {"user_id": 22813, "stars": [], "topic_id": 37401, "date_created": 1306809368.119226, "message": "Of course, one thing to keep in mind is that different imaging frameworks will likely have different call signatures or require arguments of a different form in order to operate correctly. We will need to brainstorm how we wish to handle this case.\n\nShould we accepts *args **kwargs by default for all functions and rely on backend documentation for calling conventions? Should we adopt a standard call for each function and then convert to/from the proper call signatures behind the scenes? etc...", "group_id": 9959, "id": 1233843}, {"user_id": 33559, "stars": [], "topic_id": 37401, "date_created": 1306826005.0663011, "message": "If backends have different parameters, how would we expose the documentation to the user? This can be done easily if the user calls \"use_backend(opencl)\" for example, because the backend manager can then snoop the backend-specific docstring and insert it appropriately. For \"sobel(..., backend=opencl)\" usage, this won't be possible. So where would that documentation be kept?", "group_id": 9959, "id": 1235298}, {"user_id": 22813, "stars": [], "topic_id": 37401, "date_created": 1306844338.6958001, "message": "and by \"I think it would best\", I certainly meant \"This is the first idea that popped into my head that had slightest chance of being feasible, so I'm writing it down.\"", "group_id": 9959, "id": 1237059}, {"user_id": 22813, "stars": [], "topic_id": 37401, "date_created": 1306844284.2030251, "message": "In such a case, I think it would be best to split the doc implementations. The callsite would get an explanation of what the function does, and the backend implementation would each document their respective call signatures. This is fine for wiki documentation where things can link back and forth. For an Ipython sessions, we might provide a hook the user can \"install\" like \"scikits.image.hook_ipython_help(True)\" which will obviously enough hook ipython's help system and pull the documentation together dynamically. \n\nThat's just one idea. I'm sure there are several ways we could skin this cat. What I'd like to avoid are costly conversions of arguments to the various call signatures that are required by the wrapped backend functions.", "group_id": 9959, "id": 1237057}, {"user_id": 33626, "stars": [], "topic_id": 37401, "date_created": 1307131031.100436, "message": "Hopefully if it comes down to a simple import on first use, repeated usage would only involve an if statement and or a dictionary lookup as overhead.\nWe have been planning on a similar API for all backends, and then with that one could transparently switch over with not much fuss. Is there a good use case for different parameters for different backends?", "group_id": 9959, "id": 1280518}] |