[15:47:37] Amir1, working on documentation. Check out our blog. https://phabricator.wikimedia.org/phame/blog/view/8/ [15:47:59] I'll get all our old updates posted and then I'll add one for this week. [15:48:02] *this week* [15:48:03] lol [15:48:08] last month and a half :) [15:55:24] halfak: hey, are you available for a short question? :D [15:55:29] Sure [15:55:37] Oh hey. Saw your messages at 3AM :P [15:55:57] lol [15:56:08] Protip, if you type "What time is it in " in google, it helps with timezone math :P [15:56:41] yeah I knew that. But I usually just send you the message, regardless of the time, before I forget what I wanna say :P [15:56:58] but I am aware you won't immediately reply [16:01:23] Ahh. Maybe I'll just silence notifications from you then so I don't wake up in the middle of the night. Normally, if I get a bunch of messages in the middle of the night, there's some sort of issue with ORES in production. [16:01:29] halfak: basically I want to ask your opinion regarding to measuring image quality. I found this link on Commons: https://commons.wikimedia.org/wiki/Commons:Image_guidelines#Quality_and_featured_photographic_images. From the table, I think the only feasible feature that we can engineer is "image size". So, calculate the image MB size, based on the image height & width. [16:01:29] I find that other image quality metrics require us to apply image processing method which might not be feasible in terms of my timeframe. What do you think about this? [16:02:00] What process does this support? [16:02:06] halfak: oh nooo, don't silence my notification. Next time, I will be aware with the timezone thingy :P [16:02:16] Is the size of the file in MB not part of the metadata? [16:02:42] this is for engineering image quality feature [16:04:35] halfak: if I look at your image on Commons (https://commons.wikimedia.org/wiki/File:Halfaker,_Aaron_Sept_2013.jpg), I can't find the file MB in the metadata section [16:05:49] https://commons.wikimedia.org/w/api.php?action=help&modules=query%2Bimageinfo [16:06:00] But, I don't think it's a problem. There's a way to find the picture MB from the picture height & width. See https://en.wikipedia.org/wiki/Pixel#Megapixel [16:06:19] Yeah, but that API does not seem to return the pic MB [16:06:25] it only returns the image height and width [16:06:43] https://commons.wikimedia.org/w/api.php?action=query&titles=File:Halfaker,_Aaron_Sept_2013.jpg&prop=imageinfo&iiprop=size [16:06:47] Yes it does [16:06:51] Read the docs [16:06:52] :P [16:07:43] it does return height and width right? [16:07:49] or do you mean it return MB? [16:08:58] Yes [16:09:03] See "size" [16:09:08] halfak: if you refer "size" as MB, I am not sure if it is in MB. [16:09:17] It's in bytes [16:09:30] Divide by 1024 * 1024 to get MB [16:10:34] hmmm [16:12:37] 3383923B / (1024 * 1024) = 3.227MB [16:13:15] Im not sure because [16:13:32] I found this MB calculator: https://toolstud.io/photo/megapixel.php?width=3200&height=2133&compare=video&calculate=uncompressed. [16:13:32] It says the image size in MB is 6 MB [16:14:30] that's with no compression [16:14:47] jpeg us a cinoressed format [16:15:16] Platonides: "jpeg us a cinoressed format"? [16:15:18] what do you mean? [16:15:26] oops [16:15:35] *jpeg is a compressed format [16:16:34] ah BTW, we are talking about MP (megapixels) not MB [16:18:57] halfak: Ok. Nevertheless, could I just use the "size" which returned by the API to engineer the image quality feature? or should I use the MP calculation which is shown at https://en.wikipedia.org/wiki/Pixel#Megapixel? [16:23:25] glorian_wd, oh! [16:23:30] MB = Megabytes [16:23:56] height * width = MP [16:24:05] Yeah. Sorry, I have also just realized that we are talking about MP (Megapixels) as in https://commons.wikimedia.org/wiki/Commons:Image_guidelines#Quality_and_featured_photographic_images [16:25:24] halfak: ok, so we should just use the MP for the image quality feature right? as you said, MP is obtained by multiplying height and width [16:25:55] glorian_wd, Seems like the signal will be weak. [16:26:04] Obviously yes [16:26:09] What problem would you be helping with this? [16:27:16] Because according to the https://commons.wikimedia.org/wiki/Commons:Image_guidelines, image megapixels seems become one of the determining factor of image quality [16:27:39] but ther eare other criteria such like noise, exposure, color, etc. [16:27:42] there are* [16:29:18] And, image MP seems become the most feasible way to engineer image quality feature at the moment. However, I am aware that it may become a weak signal [16:30:22] halfak: so, I need your guidance about this [16:31:25] o/ [16:31:32] glorian_wd, What will people do with this analysis/model [16:31:36] Hi Zppix! [16:32:34] Zppix, you'll find that Amir1 and awight mostly know what's going on with ORES/Scoring stuff, so when I'm not around, feel free to ping them. [16:33:01] Zppix, I'll give you an example of the kind of work I was talking to you about. See https://phabricator.wikimedia.org/T166910 [16:33:28] halfak: do you mean what people do with this MP analysis? I think people use it for helping them to determine an image quality [16:33:37] We need to find a local wiktionary editor to help organize a group of people to label edits as *damaging* and *goodfaith* so that we can build useful models for them. [16:34:02] Note my message to jberkel -- an editor who originally requested that we start looking at english wiktionary. [16:34:05] halfak: I did a workset on enwiki a few days ago, so yeah im faimilar with some of the work [16:34:23] Awesome. :) I'm due for some more work on that campaign too. Hard to find time. [16:34:37] I am talking about item quality model. But, I am sure we have been talking in the same context [16:34:40] glorian_wd, what kind of wiki process is involved in assessing image quality? [16:34:40] :D [16:36:52] halfak: I am not sure, but if I read at https://commons.wikimedia.org/wiki/Commons:Image_guidelines, I think people propose high quality image based on certain criteria such like image MP, noise, etc. [16:37:16] glorian_wd, so this model would recommend likely high quality images for review? [16:37:39] halfak: T164973 I may work on this any things i need to do before i start? [16:37:40] T164973: Have a clear message when a campaign is over - https://phabricator.wikimedia.org/T164973 [16:38:14] Cool! I can help you get your system ready for development. [16:38:28] halfak: erm. I think we haven't in the same page. If you look at https://www.wikidata.org/wiki/Wikidata:Item_quality, one of the quality criteria for Wikidata is image quality. So, I think we need to engineer that feature for item quality model [16:38:34] Zppix, Wikilabels is a pain because you'll need to set up a local postgres install [16:38:39] But we have some scripts to help with that [16:38:50] halfak: is it not on a gerrit-repo? [16:38:59] glorian_wd, oh. I see. [16:39:09] i already have mutiple postgrel instances [16:39:13] Nice. [16:39:26] Github > gerrit for usability so it's a decision we made here. [16:39:40] so no gerrit ? [16:39:45] halfak: sorry, I should have mentioned about that quality criteria to put you into context :) [16:39:45] All our prod stuff is mirrored to gerrit/diffusion [16:39:58] no gerrit for wikilabels 'cause it lives in labs. [16:40:40] so where would i find the code repo [16:41:40] https://github.com/wiki-ai/wikilabels [16:42:04] ok thanks! [16:47:34] where would i find the code for messages for campaign-related stuff [16:50:02] Zppix, See "forms" in https://github.com/wiki-ai/wikilabels-wmflabs-deploy [16:50:14] I think you'll be putting messages in the main repo though. [16:50:27] https://github.com/wiki-ai/wikilabels-wmflabs-deploy/tree/master/forms/i18n [16:50:40] Messages for each type of form we ask people to fill out re. an edit/page/etc. [16:59:34] thanks halfak again [16:59:48] :) no thank you for jumping in! [17:10:37] There's a lot of good stuff on the ai mailing list. I almost totally forgot that I used to post there more often. [17:10:42] I need to get back into that groove. [17:13:07] Damn. There's a lot of stuff though! We're going to have a *huge* blog history. [17:19:16] halfak: link i want to subscribe [17:19:28] https://phabricator.wikimedia.org/phame/blog/view/8/ [17:19:43] I'm current as of the end of October 2016 [17:19:49] Slowly working through the whole thing. :) [17:21:08] I missed some updates :( And phame doesn't let you re-order history. [17:21:10] i cant find the message for T164973 am i blind? [17:21:11] T164973: Have a clear message when a campaign is over - https://phabricator.wikimedia.org/T164973 [17:21:33] Zppix, I'll show you what message appears right now. One sec. [17:22:01] k [17:23:37] Oh weird. It looks like we might have this hard-coded! [17:24:19] https://github.com/wiki-ai/wikilabels/blob/2ae0b5b4814bdec941f0aa04f95ae70873fda58a/wikilabels/database/worksets.py#L145 [17:24:22] There it is. [17:24:53] We raise this error when there are no more tasks for a specific user. [17:25:12] There are situations where the campaign isn't done and this is returned. [17:25:35] E.g. if we need two labels per item and the only items without a second label have already been labeled by the current user. [17:25:42] We don't let a use label a task more than once. [17:27:17] so I need to create a sperate label for when campiagn is actually closed or nto? [17:27:19] not* [17:27:27] (fyi i posted to ai mailing list!) [17:27:59] Zppix, yes. [17:28:26] halfak: alright i can do that [17:30:38] halfak: question is the integrity error shown to the user or is it just for the backend? [17:31:23] It looks like the UI forwards the message to the user. [17:31:50] We going either do i18n on the backend (not impossible) or we could convert the warning into the right message on the front-end. [17:36:26] im correct in saying if a campaign is ended it wont show up on the labels website (or atleast allow users to request worksets [17:36:27] right [17:37:21] It will still show up. We need to manually disable it. It seems like we should have a fast "complete?" check for a campaign. [17:37:50] is the logic for campaign ending in db/campaign.py? [17:39:23] e.g. SELECT 1 FROM task INNER JOIN campaign ON campaign_id = campaign.id LEFT JOIN label ON task_id = task.id WHERE campaign = GROUP BY task.id HAVING COUNT(label.data) < campaign.labels_per_task [17:39:26] Or something like that [17:40:45] ill just edit the existing message and ill have someone else more experienced with wikilabels do the campaign ending message if thats ok [17:41:03] That sounds OK [17:43:01] is there a campaign status page? [17:43:14] There is [17:43:36] http://labels.wmflabs.org/stats/enwiki/ [17:43:42] ok [17:53:40] github is being weird and wont let me pull request or commit .... [17:54:17] Zppix, I could invite you to the repo or you could create your own fork. [17:54:20] Let me just invite you [17:54:30] i've tried a fork [17:54:33] What's your github user? [17:54:34] Oh [17:54:38] Pix1234 [17:55:03] Invite sent. [17:55:20] Please do not commit directly to master. Always push to a branch and make a PR. :D [17:57:51] Zppix, love your intro email :) [17:57:58] brb [17:58:18] thanks and yeah it still wont let me do it its like the button is broken [17:58:26] (and i never commit to master unless its a repo i created lol) [17:58:42] (or its gerrit) [17:59:21] i can put the code on phab pastes if you want [18:14:05] Zppix, which button? [18:17:34] can you do a PR im unable to the green button is broken (hence is why i created a new branch) [18:19:48] ugh [18:19:52] hold on i got to fix [18:28:58] ^ thats what i meant to commit :P [18:30:55] halfak: can you PR branch t164973 for me (green button to submit it isnt working for me) [18:31:32] Zppix, https://github.com/wiki-ai/wikilabels/pull/180 [18:31:51] I see thanks [18:32:27] Looks like your editor doesn't like having line breaks at the end of files. [18:34:05] Weird... cause i even put one :P [18:34:36] maybe it was something happened somewhere between client -> github [18:35:18] Zppix: Hey. Nice to meet you [18:35:40] halfak: Hey, I'm around for the hack session I will be around for two or three hours. [18:36:27] o/ Amir1 [18:36:39] Check this out https://phabricator.wikimedia.org/phame/blog/view/8/ [18:36:59] I missed a few status updates and put them in the comment on the closest blog post. [18:37:18] It looks very nice [18:38:17] I figure we should start posting our detailed updates in the blog and linking to them from a mailing list post. [18:38:42] Amir1, want to try posting https://lists.wikimedia.org/pipermail/ai/2017-May/000164.html ? [18:38:54] It'll be the last one in the sequence that I'm pulling from the mailing list. [18:38:55] halfak: i created T166955 [18:38:55] T166955: Create a message for when campaign is over. - https://phabricator.wikimedia.org/T166955 [18:39:12] Zppix, nice thanks. [18:39:24] Amir1: nice to meet you too :) [18:39:24] Could you pull my query over to there? [18:39:26] Sure [18:39:30] halfak: yes [18:39:44] halfak: I can't make a post [18:39:54] Amir1, I figured. Now to figure how to fix that [18:40:00] "Write post" is disabled for me [18:40:03] okay cool [18:40:21] Amir1, OK try again [18:40:24] halfak: i think you have to have phab admin? [18:40:32] also halfak i moved it [18:40:36] Thanks [18:41:05] Yup [18:41:06] Thanks [18:41:14] \o/ [18:41:27] Will wait for you to post before I post our next status update :) [18:42:27] halfak: how would i call the base_url? [18:42:37] halfak: now when I click on create new post it says "No Create Permission" [18:42:44] "You do not have permission to create these objects." [18:42:54] lol wtf [18:42:58] kk looking again [18:43:01] Zppix, right with you [18:43:06] no worries [18:43:11] I got all day :P [18:43:40] I think to create phame things you have to have phab admin or something similar [18:43:51] (im not quite sure how wmf has phab perms set) [18:45:26] phame is kind of stupid. [18:45:54] anyone who can edit should be able to create. I don't see separate create perm. [18:46:02] * halfak hops over to devtools to ask around [18:46:16] (i mean just let developers use blog.wikimedia.org) *starts campaiging for equal rights for developer blogs* [18:48:41] Zppix, yeah. We lost that battle. Honestly, I'm OK with having a separate space for technical stuff. [18:48:59] Amir1, ok I asked. I guess we'll need to wait. :/ [18:49:10] If andre is around he'd know [18:49:39] hes the phabricator enclopedia [18:50:38] OK now looking at wikilabels config for an example. [18:51:09] Zppix, see https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/wsgi/routes/campaigns.py#L10 [18:51:22] That "config" argument is the configuration that comes from the file I linked to. [18:51:52] Here's where "assign workset" comes from. https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/wsgi/routes/campaigns.py#L74 [18:52:15] Here's where we catch "IntegrityError" https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/wsgi/routes/campaigns.py#L83 [18:52:39] Theoretically, we could append to str(e) with the string you want. [18:52:50] ok [18:52:52] im still confused on how to call the base url [18:52:58] I will be back in ten minutes [18:53:39] Zppix, will make you a snippet of code [18:54:01] ok [18:54:40] This one is just an FYI.. Here's where the config gets built. I'm copy-pasting from here to make your snippet. https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/utilities/dev_server.py#L31 [18:57:24] Oh crud. [18:57:26] I was dumb [18:57:40] Well I'll show you how to access stuff from the config. [18:57:47] But I think we'll need to do this another way. [18:58:22] ok [18:59:33] https://gist.github.com/halfak/3fb0a92ea87ca007de2646da84e629f9 [18:59:38] For config access. [18:59:45] But we don't want the "maintenance notice" url. [18:59:46] :) [19:00:31] Zppix, I think we want to do this: http://flask.pocoo.org/docs/0.12/quickstart/#url-building [19:01:37] just just copy what you pasted without ['maintenance_notice']? [19:02:46] No. it'll be flask.url_for('stats_wiki', wiki=wiki) [19:03:41] On this line: https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/wsgi/routes/campaigns.py#L84 [19:04:06] And here, add "from flask import url_for": https://github.com/wiki-ai/wikilabels/blob/master/wikilabels/wsgi/routes/campaigns.py#L3 [19:05:33] ok [19:07:25] do i override the current stuff on line 3 and 84 or move them down a line? [19:07:48] Zppix, you could just add "url_for" to the list of "request, session" [19:10:50] do i need to remove the url now? [20:07:20] . [20:13:09] Zppix, sorry I mistyped, you don't want "flask." at the beginning of that link. [20:13:11] *line [20:13:31] what link [20:13:33] You'll want to append that URL on the end of the message when an Integrity error happens. [20:13:34] line* [20:13:45] the one that comes out of url_for [20:13:45] https://github.com/wiki-ai/wikilabels/commit/ebbb7e177208125d8da6917a579dd1740bfa2eda#diff-fa9d77e8b974a462299b6639718b60aeR81 [20:14:13] ok what do i append with (sorry im not familar with the way you guys are doing this) [20:16:34] You know how you were appending the message on the string for InterityError in campaigns.py? [20:16:57] Well, do a similar thing in this route file (also "campaigns.py") but after str(e) [20:17:18] But here, use the url_for to make sure we don't hardcode something bad :) [20:18:20] the interityerror was already there i just added on to it so do i just add the same exact thing i changed in db/workset.py? [20:18:37] Yeah except don't hardcode the URL [20:19:18] is there an existing example of this being done in wikilabel code? [20:24:46] Hmm... nothing like this [20:25:02] It's just string concatenation. You've already done it. [20:28:44] Maybe if I could understand what's confusing. [20:29:00] in the message what do i put to display the url correctly [20:30:43] Looking at this line: https://github.com/wiki-ai/wikilabels/blob/T164973/wikilabels/wsgi/routes/campaigns.py#L85 [20:31:35] return responses.conflict(str(e)) --> return responses.conflict(str(e) + " Please try again or check campaign status at " + url_for("stats_wiki"))) [20:32:08] I missed that up url_for("stats_wiki") --> url_for("stats_wiki", wiki=wiki) [20:32:46] so what about db/workset.py do i remove what i did there? [20:32:51] Yes [20:33:43] kk [20:35:59] I've got to run. I'm be back online around the same time tomorrow. [20:36:05] Have a good one folks! o/ [20:36:09] halfak: okay thanks for the help [21:28:19] Amir1: i see your back :P [21:28:31] Sorry for the spam :D [21:28:45] Amir1: its okay we all like attention:P [21:29:04] Zppix: I would be happy to help out and I will stay around for at least three hours [21:29:17] why dont we use wikibugs? [21:29:38] wikibugs in here? [21:29:42] yes [21:29:58] We do (but I muted it so I can't see anything from wikibugs) [21:30:26] Amir1: i dont have it muted and i dont see anything and ive done stuff (unless it only reacts to certain ai related tags [21:30:41] hmm [21:30:42] yeah wikibugs isnt in here [21:30:47] let me check its config [21:30:55] I think it's broken because we changed name of the tags [21:31:01] I will get it fixed [21:31:38] Amir1: i can wirte the patch [21:31:44] just tell me what tags [21:31:58] Yeah sure [21:32:03] https://phabricator.wikimedia.org/tag/scoring-platform-team-backlog/ and https://phabricator.wikimedia.org/tag/scoring-platform-team/ [21:32:12] There are already in wikibugs [21:32:23] but probably as "revision scoring as service" or something like that [21:32:35] check my patches in that repo [21:33:04] Amir1: yeah isee that ill fix it [21:33:12] Thanks! [21:40:16] Amir1: https://gerrit.wikimedia.org/r/357102 [21:41:19] Great [21:41:31] I don't have +2 rights but I pull people in [21:42:09] Amir1: im working on that [21:42:21] Amir1: i just wanted to make sure it was correct [21:42:37] Yeah, that is [21:44:08] Amir1: okay i asked merjin to look at it [21:44:39] he will work on it tomorrow [21:46:29] awesome. I'm subscribed to the patch [21:46:41] poke me again if it got stuck [21:52:47] Amir1: ok [21:54:31] am i okay to merge the pr on wikilabels Amir1 ? [21:55:37] Zppix: Do you want me to merge it? [21:55:41] I haven't reviewed it [21:56:08] I can if you think its good to go [21:56:23] (i have access to the repo) [21:56:53] I need to review it first [21:57:52] ok [22:01:56] Zppix: review done [22:33:40] Amir1: fixed [22:37:04] Zppix: Great, there is one small thing: "url_for('stats_wiki', wiki-wiki)" won't be needed or I'm wrong [22:37:31] also it will cause syntax error because "wiki-wiki" is not a valid var name [22:37:35] halfak: told me to put that [22:37:39] I will test and apply fixes [22:37:49] Can I see the discussion? [22:38:02] it should be in your chat log [22:38:05] scroll up [22:43:51] Zppix: I missed that up url_for("stats_wiki") --> url_for("stats_wiki", wiki=wiki) [22:44:01] that's what aaron said :) [22:44:04] wiki=wiki [22:44:07] not wiki-wiki [22:45:37] fell free to fix [22:59:03] is it good to merge if so ill merge Amir1 [23:00:00] Zppix: merge please, I changed the title so it would be verbose [23:02:18] Amir1: done [23:02:45] Thanks! [23:03:07] Amir1: is the code live on labs now as well? [23:03:26] It's in labs but it's not deployed yet [23:03:37] ah i see ok