[05:43:49] 10Scoring-platform-team (Current), 10ORES: Rebuild all modes for revscoring 2.2.2 - https://phabricator.wikimedia.org/T192917#4156189 (10awight) [05:44:12] 10Scoring-platform-team (Current), 10ORES: Rebuild all models for revscoring 2.2.2 - https://phabricator.wikimedia.org/T192917#4153801 (10awight) [10:47:59] 10Scoring-platform-team (Current), 10articlequality-modeling, 10User-Ladsgroup, 10artificial-intelligence: Train and test wp10 model for fawiki - https://phabricator.wikimedia.org/T190050#4156924 (10Ladsgroup) I double checked that. Both are pulled in. [11:53:45] 10Scoring-platform-team (Current), 10ORES, 10Wikidata, 10Beta-Cluster-reproducible, and 2 others: wikidata.beta.wmflabs.org/wiki/Special:RecentChanges InvalidArgumentException No model available for [goodfaith] - https://phabricator.wikimedia.org/T183266#4157100 (10Ladsgroup) [11:54:07] 10Scoring-platform-team (Current), 10ORES, 10Wikidata, 10Beta-Cluster-reproducible, and 2 others: wikidata.beta.wmflabs.org/wiki/Special:RecentChanges InvalidArgumentException No model available for [goodfaith] - https://phabricator.wikimedia.org/T183266#3848506 (10Ladsgroup) 05Open>03Resolved a:03La... [18:37:16] (03CR) 10Ladsgroup: [V: 032 C: 032] Update wheels for revscoring 2.2.2 [research/ores/wheels] - 10https://gerrit.wikimedia.org/r/427015 (owner: 10Awight) [18:38:04] (03PS1) 10Awight: Update submodules for revscoring 2.2.2 [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/428975 [18:38:52] (03CR) 10Ladsgroup: [V: 032 C: 032] Update submodules for revscoring 2.2.2 [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/428975 (owner: 10Awight) [18:39:04] (03CR) 10Ladsgroup: [V: 032 C: 032] Rename articlequality; remove repos from requirements [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/427043 (owner: 10Awight) [18:39:08] Amir1: oops, I was on the wrong channel.... [18:39:50] (03CR) 10Ladsgroup: [V: 032 C: 032] Rebuild wheels for revscoring 2.2.2 [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/427017 (owner: 10Awight) [18:40:16] :P [18:46:15] uh, oh. deployment-tin can’t clone from phabricator. [19:35:15] (03PS1) 10Awight: New models for arwiki, cawiki, huwiki, and lvwiki [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/428988 [19:35:47] Amir1: ^ One more thing... [19:42:46] and here comes another [19:43:54] (03PS1) 10Awight: Config follows renamed directory [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/428995 [19:53:41] Amir: Thanks for your help this afternoon! I have some follow up questions about how to use mwapi. I've installed mwapi, and I found some sample code that seems like it would work with some alterations, but I can't seem to make an initial query (with session.get?) that works, especially with a generator/specific page. Code here: https://www.mediawiki.org/wiki/API:Query#Generators . I also found code that makes an initial [19:53:41] query, but if I change anything, it throws errors (found here https://github.com/mediawiki-utilities/python-mwapi). Do you know what an initial query to make a generator for the page should look like? Sorry, I know this is fairly basic! [19:54:05] whoops, meant Amir1, sorry! [20:00:59] Amir1: beta is back up! I won’t mess with it for a while [20:02:43] ewhit_: hi! Can you share the query that’s failing? [20:03:20] query = session.get('https://en.wikipedia.org/w/api.php', continuation= True).json() I have no idea if this is even kind of right, sorry! [20:03:54] I'm just making sure the code I pulled elsewhere works right now, I'll tweak it to do what I need after I figure out what's going on [20:04:11] There should probably be some more params, like ?action=query [20:04:36] even if I'm using the Python wrapper? [20:05:19] mmm… ah lemme find what I did when using the mwapi lib [20:05:41] this code comes immediately after [20:06:02] https://www.irccloud.com/pastebin/143hWTVN/ [20:06:53] ewhit_: Here’s a thing I did which may have worked, https://github.com/wiki-ai/ores/commit/a972c3481b7aaa3ad439fabd9ae45e72c7e7db23#diff-48dde95a8ceb0ee803d0010b0a181c1cR33 [20:08:22] Ooh, thank you, I'll try this! [20:09:16] Your query params look good, fwiw. I’m comparing with https://www.mediawiki.org/w/api.php?action=help&modules=query%2Blinks [20:09:57] generator params seem right, too, https://www.mediawiki.org/w/api.php?action=help&modules=query%2Ballpages [20:15:53] One thing to do is just paste the query into a browser for initial debugging... [20:16:15] awight is the code you linked me to in Python? I'm getting a lot of syntax errors for some reason. [20:16:18] I will try that [20:16:20] (03CR) 10Ladsgroup: [V: 032 C: 032] New models for arwiki, cawiki, huwiki, and lvwiki [services/ores/deploy] - 10https://gerrit.wikimedia.org/r/428988 (owner: 10Awight) [20:16:52] It’s python—I’m not certain that I actually ran it, but *think* I did [20:17:15] What syntax errors? You’re using python 3, correct? [20:17:41] Correct. I just copy pasted and it just pulled up a google results for WM:API loool [20:18:06] hehe [20:18:12] right now illegal target for annotation, but previously it was just "invalid syntax" [20:18:37] wat [20:19:25] I dunno. I took your def, but had to edit out some things that were ORES-specific, but I still wanted to be able to define params. Looks like that broke it, but I'm not sure why [20:20:43] Lines 34-43 should be all the necessary mechanics [20:22:20] Paste yr def and I might be able to help with any missing glue [20:23:07] right now I have it successfully defining (yay!), but now it's saying functions aren't iterable [20:23:10] my current def; [20:23:14] https://www.irccloud.com/pastebin/GZUaprwL/ [20:23:41] I still don't think it knows what page to look at though [20:23:46] ah— u need params() to looks more like, “return { “action”: “query”… [20:23:57] and then when you call it, session.get(**params()) [20:25:32] I think “continuation” might be broken too, one moment... [20:26:14] IIRC, continuation is handled transparently by mwapi [20:26:34] if I don't include it I get a message about a parameter being missing [20:27:28] * awight reads https://pythonhosted.org/mwapi/session.html [20:28:10] continuation should be bare True rather than quoted, is what I think [20:28:37] ahhh that makes sense [20:29:34] I think I fixed the params, but I'm still getting this: get() argument after ** must be a mapping, not function [20:30:22] maybe do “kwargs = params()” in that case [20:30:37] then **kwargs as an input to get() [20:31:56] It's taking params now! Still not quite working, but better! [20:32:03] lol [20:32:11] “it’s alliiiive—almost" [20:32:26] * awight applies difibrillator [20:32:28] lol pretty much [20:35:36] do you have any idea why a generator object wouldn't be callable? (Sorry, I know I have a lot of questions!) [20:36:17] yah the result of a mwapi.Session.get call will be a generator if you say continuation=True. That one, right? [20:36:22] it’s essentially just a list [20:36:34] you can actually cast it to a list with “list(result)” if that' [20:36:40] if that’s helpful [20:36:55] or you can “for item in result:" [20:37:11] maybe there’s an extra pair of parens that’s calling the result? [20:37:19] hmmm [20:40:50] Looks like it's trying to iterate through the list, but for some reason doesn't want to acknowledge 'generator' [20:45:48] can i see? [20:46:04] sorry for delays, i’m watching a great panel convo [20:46:53] No worries, I have excessive questions. I'm sending you all of my code and the error I'm getting [20:46:53] [20:47:36] session = mwapi.Session('https://en.wikipedia.org', user_agent='ewhit') [20:47:36] def params(): [20:47:36] return{ [20:47:36] "action": "query", [20:47:36] "prop": "links", [20:47:57] harr [20:48:05] the error is [20:48:08] i lost u at “prop" [20:48:11] https://www.irccloud.com/pastebin/ii1xt1aI/ [20:50:19] The properties of the page you're querying. From the page on generators: https://www.mediawiki.org/wiki/API:Query#Generators [20:50:34] I think I may need to change from "links" to "generator" [20:51:13] nope, that wasn't it [20:53:23] I think prop:links in this case is using links from the titles namespace to create a list for the generator [20:53:27] afaict, “generator” is just a coincidence, the python error is unrelated to the params [20:53:43] What is “query"? [20:53:55] It looks like it’s the result of the .get call? [20:54:29] yes, and it should continue the .get call if continuation==True, I think? [20:54:37] ahh I see [20:55:32] looks like you actually want: session.get(query_continue=continue_value_from_result... [20:55:58] but the way you’re using get() with continuation=True should actually do the continuation internally to mwapi [20:56:11] hmmm [20:56:11] so the result is usable as it is, and you won’t have to make “continue" calls. [20:56:40] it may even be delaying continuation API calls until you consume items, doing lazy evaluation [20:57:06] i.e. it should work to do, [20:57:08] so do I not need the for loop section? [20:57:27] result = session.get(continuation=True, **params_dict) [20:57:33] for item in result: [20:57:37] that should be all [21:02:44] alright, I am getting new and exciting errors! Thank you! [21:03:09] lulz [21:05:35] (03CR) 10jenkins-bot: Localisation updates from https://translatewiki.net. [extensions/JADE] - 10https://gerrit.wikimedia.org/r/429061 (owner: 10L10n-bot) [21:15:43] (03CR) 10jenkins-bot: Localisation updates from https://translatewiki.net. [extensions/ORES] - 10https://gerrit.wikimedia.org/r/429069 (owner: 10L10n-bot) [21:29:32] o/ [21:36:26] 10Scoring-platform-team (Current), 10ORES: Rebuild all models for revscoring 2.2.2 - https://phabricator.wikimedia.org/T192917#4159567 (10awight) This is live on the beta cluster.