- Configure beta cluster to pull section recommendation data from production via T335641: Use the prop=growthimagesuggestiondata API as an image recommendation source
- Import articles from production
- Import weighted tags from production
See also:
See also:
Change 920283 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[operations/mediawiki-config@master] [beta] GrowthExperiments: Use ActionApiImageRecommendationApiHandler
Mentioned in SAL (#wikimedia-operations) [2023-05-24T12:47:22Z] <tgr_> running changeWikiConfig.php on Growth pilot wikis for T337348
Beta:
tgr@deployment-mwmaint02:~$ for WIKI in ar bn cs es; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done
Production (needed because of T337330):
tgr@mwmaint1002:~$ for WIKI in ar bn cs es fr; do mwscript GrowthExperiments:changeWikiConfig.php --wiki=${WIKI}wiki --json --page MediaWiki:NewcomerTasks.json --summary 'Prepare section image recommendations. This should have no visible effect (disabled via other means). [[phab:T337330]] [[phab:T321754]]' --create-only section-image-recommendation '{"type": "section-image-recommendation", "group": "medium", "maxTasksPerDay": 25}' ; done
Change 920283 merged by jenkins-bot:
[operations/mediawiki-config@master] [beta] GrowthExperiments: Use ActionApiImageRecommendationApiHandler
Change 924110 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix variable name
Change 924110 merged by jenkins-bot:
[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix variable name
Change 924111 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):
[operations/mediawiki-config@master] GrowthExperiments: Fix beta $wgGEImageRecommendationServiceUrl
Change 924111 merged by jenkins-bot:
[operations/mediawiki-config@master] [beta] GrowthExperiments: Fix beta $wgGEImageRecommendationServiceUrl
Blocked on deploying rEGRE76227375bb1f: Section images: Accept more recommendation types as the name of the type has changed.
for LANG in en ar bn cs es; do echo "$LANG>>>" # get list of pages with recommendations curl -s "https://${LANG}.wikipedia.org/w/api.php?action=query&format=json&export=1&generator=search&formatversion=2&gsrsearch=hasrecommendation%3Aimage_section&gsrlimit=500" > export.json cat export.json | jq --raw-output '.query.export' > export.xml cat export.json | jq --raw-output '.query.pages[].title' > pages-$LANG.txt # import pages mwscript importDump.php ${LANG}wiki --username-prefix prod --no-local-users --report 50 export.xml mwscript rebuildrecentchanges.php ${LANG}wiki mwscript initSiteStats.php ${LANG}wiki --update # update search index mwscript CirrusSearch:ForceSearchIndex.php ${LANG}wiki --namespace 0 --skipLinks --indexOnSkip mwscript CirrusSearch:ForceSearchIndex.php ${LANG}wiki --namespace 0 --skipParse mwscript GrowthExperiments:importOresTopics.php ${LANG}wiki --apiUrl="https://${LANG}.wikipedia.org/w/api.php" --wikiId=${LANG}wiki --pageList pages-$LANG.txt mwscript CirrusSearch:UpdateWeightedTags.php ${LANG}wiki --tagType=recommendation.image_section --page-list pages-$LANG.txt done #validate for LANG in en ar bn cs es; do mwscript GrowthExperiments:listTaskCounts.php ${LANG}wiki --topictype ores --tasktype section-image-recommendation --output json | jq '.taskTypeCounts["section-image-recommendation"]' done
Recommendations are set up on beta enwiki, arwiki, bnwiki, cswiki, eswiki. (There is no beta frwiki and setting it up didn't seem worth the effort.)
Users need to opt in with ge.utils.enableSectionImageRecommendations() right now, that will be fixed soon.
Note that beta enwiki has lots of false positives ("the section already has an image"). I think that's just due to content changing more quickly on production enwiki. Beta en is also quite slow, no idea about that.
Section-level add image task is present in en, bn, es, cs, ar beta wikis - works as expected. Thanks, @Tgr!