Page MenuHomePhabricator

Adapt GrowthExperiments to new Image Suggestions API
Closed, ResolvedPublicFeature

Description

Once the Image Suggestions API is productionized, GrowthExperiments needs to be adjusted to use the new API.

If the API signature doesn't change, all that's needed is to update $wgGEImageRecommendationServiceUrl / $wgGEImageRecommendationServiceHttpProxy. If it does change, we probably want separate classes for the old and new API so we can switch back and forth via configuration.

Example request: curl https://image-suggestion.discovery.wmnet:30443/public/image_suggestions/suggestions/cswiki/344465

Example response:

1{
2 "rows": [
3 {
4 "wiki": "cswiki",
5 "page_id": 344465,
6 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
7 "image": "08_5Mala_Alkasaat.ogg",
8 "confidence": 80,
9 "found_on": null,
10 "kind": [
11 "istype-commons-category"
12 ],
13 "origin_wiki": "commonswiki",
14 "page_rev": 17463093
15 },
16 {
17 "wiki": "cswiki",
18 "page_id": 344465,
19 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
20 "image": "240A5737.jpg",
21 "confidence": 80,
22 "found_on": null,
23 "kind": [
24 "istype-commons-category"
25 ],
26 "origin_wiki": "commonswiki",
27 "page_rev": 17463093
28 },
29 {
30 "wiki": "cswiki",
31 "page_id": 344465,
32 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
33 "image": "47Soul_Onstage_at_London's_Village_Underground.jpg",
34 "confidence": 80,
35 "found_on": null,
36 "kind": [
37 "istype-commons-category"
38 ],
39 "origin_wiki": "commonswiki",
40 "page_rev": 17463093
41 },
42 {
43 "wiki": "cswiki",
44 "page_id": 344465,
45 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
46 "image": "47Soul_‘Balfron_Promise’_Pre-Launch_Party.jpg",
47 "confidence": 80,
48 "found_on": null,
49 "kind": [
50 "istype-commons-category"
51 ],
52 "origin_wiki": "commonswiki",
53 "page_rev": 17463093
54 },
55 {
56 "wiki": "cswiki",
57 "page_id": 344465,
58 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
59 "image": "Al-Risālah_al-Sharafīyah.pdf",
60 "confidence": 80,
61 "found_on": null,
62 "kind": [
63 "istype-commons-category"
64 ],
65 "origin_wiki": "commonswiki",
66 "page_rev": 17463093
67 },
68 {
69 "wiki": "cswiki",
70 "page_id": 344465,
71 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
72 "image": "Al-Urmawi.JPG",
73 "confidence": 80,
74 "found_on": null,
75 "kind": [
76 "istype-commons-category"
77 ],
78 "origin_wiki": "commonswiki",
79 "page_rev": 17463093
80 },
81 {
82 "wiki": "cswiki",
83 "page_id": 344465,
84 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
85 "image": "Aleppomusic.jpg",
86 "confidence": 90,
87 "found_on": [
88 "cawiki",
89 "dewiki",
90 "elwiki",
91 "euwiki",
92 "hewiki",
93 "itwiki",
94 "ptwiki",
95 "srwiki",
96 "ukwiki",
97 "urwiki"
98 ],
99 "kind": [
100 "istype-lead-image",
101 "istype-wikidata-image"
102 ],
103 "origin_wiki": "commonswiki",
104 "page_rev": 17463093
105 },
106 {
107 "wiki": "cswiki",
108 "page_id": 344465,
109 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
110 "image": "Alwania_By_Mehdi_Karooni.webm",
111 "confidence": 80,
112 "found_on": null,
113 "kind": [
114 "istype-commons-category"
115 ],
116 "origin_wiki": "commonswiki",
117 "page_rev": 17463093
118 },
119 {
120 "wiki": "cswiki",
121 "page_id": 344465,
122 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
123 "image": "Arabian_Epic_music.opus",
124 "confidence": 80,
125 "found_on": null,
126 "kind": [
127 "istype-commons-category"
128 ],
129 "origin_wiki": "commonswiki",
130 "page_rev": 17463093
131 },
132 {
133 "wiki": "cswiki",
134 "page_id": 344465,
135 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
136 "image": "Arabic-busalik-scale.svg",
137 "confidence": 80,
138 "found_on": null,
139 "kind": [
140 "istype-commons-category"
141 ],
142 "origin_wiki": "commonswiki",
143 "page_rev": 17463093
144 },
145 {
146 "wiki": "cswiki",
147 "page_id": 344465,
148 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
149 "image": "Arabic-busalik-tetrachord.svg",
150 "confidence": 80,
151 "found_on": null,
152 "kind": [
153 "istype-commons-category"
154 ],
155 "origin_wiki": "commonswiki",
156 "page_rev": 17463093
157 },
158 {
159 "wiki": "cswiki",
160 "page_id": 344465,
161 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
162 "image": "Audiofhylogo.png",
163 "confidence": 80,
164 "found_on": null,
165 "kind": [
166 "istype-commons-category"
167 ],
168 "origin_wiki": "commonswiki",
169 "page_rev": 17463093
170 },
171 {
172 "wiki": "cswiki",
173 "page_id": 344465,
174 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
175 "image": "Bayyati-maqam-ajnas-in-Persian.svg",
176 "confidence": 80,
177 "found_on": null,
178 "kind": [
179 "istype-commons-category"
180 ],
181 "origin_wiki": "commonswiki",
182 "page_rev": 17463093
183 },
184 {
185 "wiki": "cswiki",
186 "page_id": 344465,
187 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
188 "image": "Busalik-characteristics-fa.tif",
189 "confidence": 80,
190 "found_on": null,
191 "kind": [
192 "istype-commons-category"
193 ],
194 "origin_wiki": "commonswiki",
195 "page_rev": 17463093
196 },
197 {
198 "wiki": "cswiki",
199 "page_id": 344465,
200 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
201 "image": "Busalik-scale-fa.tif",
202 "confidence": 80,
203 "found_on": null,
204 "kind": [
205 "istype-commons-category"
206 ],
207 "origin_wiki": "commonswiki",
208 "page_rev": 17463093
209 },
210 {
211 "wiki": "cswiki",
212 "page_id": 344465,
213 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
214 "image": "Dahman.jpg",
215 "confidence": 80,
216 "found_on": [
217 "frwiki"
218 ],
219 "kind": [
220 "istype-lead-image"
221 ],
222 "origin_wiki": "commonswiki",
223 "page_rev": 17463093
224 },
225 {
226 "wiki": "cswiki",
227 "page_id": 344465,
228 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
229 "image": "Djamel_Mellouk_Compositeur.jpg",
230 "confidence": 80,
231 "found_on": null,
232 "kind": [
233 "istype-commons-category"
234 ],
235 "origin_wiki": "commonswiki",
236 "page_rev": 17463093
237 },
238 {
239 "wiki": "cswiki",
240 "page_id": 344465,
241 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
242 "image": "Fundamental-scale-in-Arab-music.ogg",
243 "confidence": 80,
244 "found_on": null,
245 "kind": [
246 "istype-commons-category"
247 ],
248 "origin_wiki": "commonswiki",
249 "page_rev": 17463093
250 },
251 {
252 "wiki": "cswiki",
253 "page_id": 344465,
254 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
255 "image": "Fundamental-scale-in-Arab-music.svg",
256 "confidence": 80,
257 "found_on": null,
258 "kind": [
259 "istype-commons-category"
260 ],
261 "origin_wiki": "commonswiki",
262 "page_rev": 17463093
263 },
264 {
265 "wiki": "cswiki",
266 "page_id": 344465,
267 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
268 "image": "Kazem_Main.jpg",
269 "confidence": 80,
270 "found_on": [
271 "svwiki"
272 ],
273 "kind": [
274 "istype-lead-image"
275 ],
276 "origin_wiki": "commonswiki",
277 "page_rev": 17463093
278 },
279 {
280 "wiki": "cswiki",
281 "page_id": 344465,
282 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
283 "image": "Kooch_Song_(Excerpt).ogg",
284 "confidence": 80,
285 "found_on": null,
286 "kind": [
287 "istype-commons-category"
288 ],
289 "origin_wiki": "commonswiki",
290 "page_rev": 17463093
291 },
292 {
293 "wiki": "cswiki",
294 "page_id": 344465,
295 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
296 "image": "Lautenmacher-1568.png",
297 "confidence": 80,
298 "found_on": [
299 "kowiki"
300 ],
301 "kind": [
302 "istype-lead-image"
303 ],
304 "origin_wiki": "commonswiki",
305 "page_rev": 17463093
306 },
307 {
308 "wiki": "cswiki",
309 "page_id": 344465,
310 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
311 "image": "Maler_der_Geschichte_von_Bayâd_und_Riyâd_002.jpg",
312 "confidence": 80,
313 "found_on": [
314 "eowiki",
315 "fawiki",
316 "idwiki",
317 "lawiki",
318 "tawiki",
319 "zhwiki"
320 ],
321 "kind": [
322 "istype-lead-image"
323 ],
324 "origin_wiki": "commonswiki",
325 "page_rev": 17463093
326 },
327 {
328 "wiki": "cswiki",
329 "page_id": 344465,
330 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
331 "image": "Microtonal-accidentals-in-different-music-systems.ogg",
332 "confidence": 80,
333 "found_on": null,
334 "kind": [
335 "istype-commons-category"
336 ],
337 "origin_wiki": "commonswiki",
338 "page_rev": 17463093
339 },
340 {
341 "wiki": "cswiki",
342 "page_id": 344465,
343 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
344 "image": "Microtonal-accidentals-in-different-music-systems.svg",
345 "confidence": 80,
346 "found_on": null,
347 "kind": [
348 "istype-commons-category"
349 ],
350 "origin_wiki": "commonswiki",
351 "page_rev": 17463093
352 },
353 {
354 "wiki": "cswiki",
355 "page_id": 344465,
356 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
357 "image": "Omar_Souleyman_syrian_singer.jpg",
358 "confidence": 80,
359 "found_on": null,
360 "kind": [
361 "istype-commons-category"
362 ],
363 "origin_wiki": "commonswiki",
364 "page_rev": 17463093
365 },
366 {
367 "wiki": "cswiki",
368 "page_id": 344465,
369 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
370 "image": "Petra,_Jordan,_Musicians.jpg",
371 "confidence": 80,
372 "found_on": null,
373 "kind": [
374 "istype-commons-category"
375 ],
376 "origin_wiki": "commonswiki",
377 "page_rev": 17463093
378 },
379 {
380 "wiki": "cswiki",
381 "page_id": 344465,
382 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
383 "image": "Ranin_Fadi.jpg",
384 "confidence": 80,
385 "found_on": null,
386 "kind": [
387 "istype-commons-category"
388 ],
389 "origin_wiki": "commonswiki",
390 "page_rev": 17463093
391 },
392 {
393 "wiki": "cswiki",
394 "page_id": 344465,
395 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
396 "image": "Struggle_(excerpt).ogg",
397 "confidence": 80,
398 "found_on": null,
399 "kind": [
400 "istype-commons-category"
401 ],
402 "origin_wiki": "commonswiki",
403 "page_rev": 17463093
404 },
405 {
406 "wiki": "cswiki",
407 "page_id": 344465,
408 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
409 "image": "Suzinak-intervals.svg",
410 "confidence": 80,
411 "found_on": null,
412 "kind": [
413 "istype-commons-category"
414 ],
415 "origin_wiki": "commonswiki",
416 "page_rev": 17463093
417 },
418 {
419 "wiki": "cswiki",
420 "page_id": 344465,
421 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
422 "image": "العود_الزيدوني_-_العود_ذو_الزندين_مع_مخترعِه_الفنان_زيدون_تريكو_-_Zaidoon_Treeko_with_Zaidooni_Oud_-_The_Oud_with_2_necks_(with_two_fingerboards)_S_BRBOS_David_Salman_Stuttgart_(2016).jpg",
423 "confidence": 80,
424 "found_on": null,
425 "kind": [
426 "istype-commons-category"
427 ],
428 "origin_wiki": "commonswiki",
429 "page_rev": 17463093
430 },
431 {
432 "wiki": "cswiki",
433 "page_id": 344465,
434 "id": "644c90bc-ba40-11ec-ba4c-f0d4e2e69820",
435 "image": "المغنية_الشعبية_الحاجه_شادية_1.jpg",
436 "confidence": 80,
437 "found_on": [
438 "nnwiki"
439 ],
440 "kind": [
441 "istype-lead-image"
442 ],
443 "origin_wiki": "commonswiki",
444 "page_rev": 17463093
445 },
446 {
447 "wiki": "cswiki",
448 "page_id": 344465,
449 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
450 "image": "08_5Mala_Alkasaat.ogg",
451 "confidence": 80,
452 "found_on": null,
453 "kind": [
454 "istype-commons-category"
455 ],
456 "origin_wiki": "commonswiki",
457 "page_rev": 17463093
458 },
459 {
460 "wiki": "cswiki",
461 "page_id": 344465,
462 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
463 "image": "240A5737.jpg",
464 "confidence": 80,
465 "found_on": null,
466 "kind": [
467 "istype-commons-category"
468 ],
469 "origin_wiki": "commonswiki",
470 "page_rev": 17463093
471 },
472 {
473 "wiki": "cswiki",
474 "page_id": 344465,
475 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
476 "image": "47Soul_Onstage_at_London's_Village_Underground.jpg",
477 "confidence": 80,
478 "found_on": null,
479 "kind": [
480 "istype-commons-category"
481 ],
482 "origin_wiki": "commonswiki",
483 "page_rev": 17463093
484 },
485 {
486 "wiki": "cswiki",
487 "page_id": 344465,
488 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
489 "image": "47Soul_‘Balfron_Promise’_Pre-Launch_Party.jpg",
490 "confidence": 80,
491 "found_on": null,
492 "kind": [
493 "istype-commons-category"
494 ],
495 "origin_wiki": "commonswiki",
496 "page_rev": 17463093
497 },
498 {
499 "wiki": "cswiki",
500 "page_id": 344465,
501 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
502 "image": "Al-Risālah_al-Sharafīyah.pdf",
503 "confidence": 80,
504 "found_on": null,
505 "kind": [
506 "istype-commons-category"
507 ],
508 "origin_wiki": "commonswiki",
509 "page_rev": 17463093
510 },
511 {
512 "wiki": "cswiki",
513 "page_id": 344465,
514 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
515 "image": "Al-Urmawi.JPG",
516 "confidence": 80,
517 "found_on": null,
518 "kind": [
519 "istype-commons-category"
520 ],
521 "origin_wiki": "commonswiki",
522 "page_rev": 17463093
523 },
524 {
525 "wiki": "cswiki",
526 "page_id": 344465,
527 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
528 "image": "Aleppomusic.jpg",
529 "confidence": 90,
530 "found_on": [
531 "cawiki",
532 "dewiki",
533 "elwiki",
534 "euwiki",
535 "hewiki",
536 "itwiki",
537 "ptwiki",
538 "srwiki",
539 "ukwiki",
540 "urwiki"
541 ],
542 "kind": [
543 "istype-lead-image",
544 "istype-wikidata-image"
545 ],
546 "origin_wiki": "commonswiki",
547 "page_rev": 17463093
548 },
549 {
550 "wiki": "cswiki",
551 "page_id": 344465,
552 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
553 "image": "Alwania_By_Mehdi_Karooni.webm",
554 "confidence": 80,
555 "found_on": null,
556 "kind": [
557 "istype-commons-category"
558 ],
559 "origin_wiki": "commonswiki",
560 "page_rev": 17463093
561 },
562 {
563 "wiki": "cswiki",
564 "page_id": 344465,
565 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
566 "image": "Arabian_Epic_music.opus",
567 "confidence": 80,
568 "found_on": null,
569 "kind": [
570 "istype-commons-category"
571 ],
572 "origin_wiki": "commonswiki",
573 "page_rev": 17463093
574 },
575 {
576 "wiki": "cswiki",
577 "page_id": 344465,
578 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
579 "image": "Arabic-busalik-scale.svg",
580 "confidence": 80,
581 "found_on": null,
582 "kind": [
583 "istype-commons-category"
584 ],
585 "origin_wiki": "commonswiki",
586 "page_rev": 17463093
587 },
588 {
589 "wiki": "cswiki",
590 "page_id": 344465,
591 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
592 "image": "Arabic-busalik-tetrachord.svg",
593 "confidence": 80,
594 "found_on": null,
595 "kind": [
596 "istype-commons-category"
597 ],
598 "origin_wiki": "commonswiki",
599 "page_rev": 17463093
600 },
601 {
602 "wiki": "cswiki",
603 "page_id": 344465,
604 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
605 "image": "Audiofhylogo.png",
606 "confidence": 80,
607 "found_on": null,
608 "kind": [
609 "istype-commons-category"
610 ],
611 "origin_wiki": "commonswiki",
612 "page_rev": 17463093
613 },
614 {
615 "wiki": "cswiki",
616 "page_id": 344465,
617 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
618 "image": "Bayyati-maqam-ajnas-in-Persian.svg",
619 "confidence": 80,
620 "found_on": null,
621 "kind": [
622 "istype-commons-category"
623 ],
624 "origin_wiki": "commonswiki",
625 "page_rev": 17463093
626 },
627 {
628 "wiki": "cswiki",
629 "page_id": 344465,
630 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
631 "image": "Busalik-characteristics-fa.tif",
632 "confidence": 80,
633 "found_on": null,
634 "kind": [
635 "istype-commons-category"
636 ],
637 "origin_wiki": "commonswiki",
638 "page_rev": 17463093
639 },
640 {
641 "wiki": "cswiki",
642 "page_id": 344465,
643 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
644 "image": "Busalik-scale-fa.tif",
645 "confidence": 80,
646 "found_on": null,
647 "kind": [
648 "istype-commons-category"
649 ],
650 "origin_wiki": "commonswiki",
651 "page_rev": 17463093
652 },
653 {
654 "wiki": "cswiki",
655 "page_id": 344465,
656 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
657 "image": "Dahman.jpg",
658 "confidence": 80,
659 "found_on": [
660 "frwiki"
661 ],
662 "kind": [
663 "istype-lead-image"
664 ],
665 "origin_wiki": "commonswiki",
666 "page_rev": 17463093
667 },
668 {
669 "wiki": "cswiki",
670 "page_id": 344465,
671 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
672 "image": "Djamel_Mellouk_Compositeur.jpg",
673 "confidence": 80,
674 "found_on": null,
675 "kind": [
676 "istype-commons-category"
677 ],
678 "origin_wiki": "commonswiki",
679 "page_rev": 17463093
680 },
681 {
682 "wiki": "cswiki",
683 "page_id": 344465,
684 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
685 "image": "Fundamental-scale-in-Arab-music.ogg",
686 "confidence": 80,
687 "found_on": null,
688 "kind": [
689 "istype-commons-category"
690 ],
691 "origin_wiki": "commonswiki",
692 "page_rev": 17463093
693 },
694 {
695 "wiki": "cswiki",
696 "page_id": 344465,
697 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
698 "image": "Fundamental-scale-in-Arab-music.svg",
699 "confidence": 80,
700 "found_on": null,
701 "kind": [
702 "istype-commons-category"
703 ],
704 "origin_wiki": "commonswiki",
705 "page_rev": 17463093
706 },
707 {
708 "wiki": "cswiki",
709 "page_id": 344465,
710 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
711 "image": "Kazem_Main.jpg",
712 "confidence": 80,
713 "found_on": [
714 "svwiki"
715 ],
716 "kind": [
717 "istype-lead-image"
718 ],
719 "origin_wiki": "commonswiki",
720 "page_rev": 17463093
721 },
722 {
723 "wiki": "cswiki",
724 "page_id": 344465,
725 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
726 "image": "Kooch_Song_(Excerpt).ogg",
727 "confidence": 80,
728 "found_on": null,
729 "kind": [
730 "istype-commons-category"
731 ],
732 "origin_wiki": "commonswiki",
733 "page_rev": 17463093
734 },
735 {
736 "wiki": "cswiki",
737 "page_id": 344465,
738 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
739 "image": "Lautenmacher-1568.png",
740 "confidence": 80,
741 "found_on": [
742 "kowiki"
743 ],
744 "kind": [
745 "istype-lead-image"
746 ],
747 "origin_wiki": "commonswiki",
748 "page_rev": 17463093
749 },
750 {
751 "wiki": "cswiki",
752 "page_id": 344465,
753 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
754 "image": "Maler_der_Geschichte_von_Bayâd_und_Riyâd_002.jpg",
755 "confidence": 80,
756 "found_on": [
757 "eowiki",
758 "fawiki",
759 "idwiki",
760 "lawiki",
761 "tawiki",
762 "zhwiki"
763 ],
764 "kind": [
765 "istype-lead-image"
766 ],
767 "origin_wiki": "commonswiki",
768 "page_rev": 17463093
769 },
770 {
771 "wiki": "cswiki",
772 "page_id": 344465,
773 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
774 "image": "Microtonal-accidentals-in-different-music-systems.ogg",
775 "confidence": 80,
776 "found_on": null,
777 "kind": [
778 "istype-commons-category"
779 ],
780 "origin_wiki": "commonswiki",
781 "page_rev": 17463093
782 },
783 {
784 "wiki": "cswiki",
785 "page_id": 344465,
786 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
787 "image": "Microtonal-accidentals-in-different-music-systems.svg",
788 "confidence": 80,
789 "found_on": null,
790 "kind": [
791 "istype-commons-category"
792 ],
793 "origin_wiki": "commonswiki",
794 "page_rev": 17463093
795 },
796 {
797 "wiki": "cswiki",
798 "page_id": 344465,
799 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
800 "image": "Omar_Souleyman_syrian_singer.jpg",
801 "confidence": 80,
802 "found_on": null,
803 "kind": [
804 "istype-commons-category"
805 ],
806 "origin_wiki": "commonswiki",
807 "page_rev": 17463093
808 },
809 {
810 "wiki": "cswiki",
811 "page_id": 344465,
812 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
813 "image": "Petra,_Jordan,_Musicians.jpg",
814 "confidence": 80,
815 "found_on": null,
816 "kind": [
817 "istype-commons-category"
818 ],
819 "origin_wiki": "commonswiki",
820 "page_rev": 17463093
821 },
822 {
823 "wiki": "cswiki",
824 "page_id": 344465,
825 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
826 "image": "Ranin_Fadi.jpg",
827 "confidence": 80,
828 "found_on": null,
829 "kind": [
830 "istype-commons-category"
831 ],
832 "origin_wiki": "commonswiki",
833 "page_rev": 17463093
834 },
835 {
836 "wiki": "cswiki",
837 "page_id": 344465,
838 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
839 "image": "Struggle_(excerpt).ogg",
840 "confidence": 80,
841 "found_on": null,
842 "kind": [
843 "istype-commons-category"
844 ],
845 "origin_wiki": "commonswiki",
846 "page_rev": 17463093
847 },
848 {
849 "wiki": "cswiki",
850 "page_id": 344465,
851 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
852 "image": "Suzinak-intervals.svg",
853 "confidence": 80,
854 "found_on": null,
855 "kind": [
856 "istype-commons-category"
857 ],
858 "origin_wiki": "commonswiki",
859 "page_rev": 17463093
860 },
861 {
862 "wiki": "cswiki",
863 "page_id": 344465,
864 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
865 "image": "العود_الزيدوني_-_العود_ذو_الزندين_مع_مخترعِه_الفنان_زيدون_تريكو_-_Zaidoon_Treeko_with_Zaidooni_Oud_-_The_Oud_with_2_necks_(with_two_fingerboards)_S_BRBOS_David_Salman_Stuttgart_(2016).jpg",
866 "confidence": 80,
867 "found_on": null,
868 "kind": [
869 "istype-commons-category"
870 ],
871 "origin_wiki": "commonswiki",
872 "page_rev": 17463093
873 },
874 {
875 "wiki": "cswiki",
876 "page_id": 344465,
877 "id": "9040e21c-c15d-11ec-99c8-f0d4e2e69820",
878 "image": "المغنية_الشعبية_الحاجه_شادية_1.jpg",
879 "confidence": 80,
880 "found_on": [
881 "nnwiki"
882 ],
883 "kind": [
884 "istype-lead-image"
885 ],
886 "origin_wiki": "commonswiki",
887 "page_rev": 17463093
888 }
889 ]
890}

Same request (https://image-suggestion-api.wmcloud.org/image-suggestions/v0/wikipedia/cs/pages/Arabsk%C3%A1_hudba?source=ima) with the old API:

1{
2 "seed": 8723,
3 "pages": [
4 {
5 "project": "cswiki",
6 "page": "Arabská_hudba",
7 "page_id": 344465,
8 "suggestions": [
9 {
10 "filename": "Aleppomusic.jpg",
11 "confidence_rating": "medium",
12 "source": {
13 "name": "ima",
14 "details": {
15 "from": "wikipedia",
16 "found_on": "elwiki,ptwiki,dewiki,hewiki,cawiki,euwiki,srwiki,ukwiki,urwiki,azwiki,itwiki",
17 "dataset_id": "328040d8-185e-4cb5-b9c3-8fe2d200f350"
18 }
19 }
20 },
21 {
22 "filename": "Majid Al Muhandis.jpg",
23 "confidence_rating": "high",
24 "source": {
25 "name": "ima",
26 "details": {
27 "from": "wikidata",
28 "found_on": "",
29 "dataset_id": "328040d8-185e-4cb5-b9c3-8fe2d200f350"
30 }
31 }
32 },
33 {
34 "filename": "Maler_der_Geschichte_von_Bayâd_und_Riyâd_002.jpg",
35 "confidence_rating": "medium",
36 "source": {
37 "name": "ima",
38 "details": {
39 "from": "wikipedia",
40 "found_on": "fawiki,idwiki,zhwiki,eowiki,lawiki,tawiki",
41 "dataset_id": "328040d8-185e-4cb5-b9c3-8fe2d200f350"
42 }
43 }
44 }
45 ]
46 }
47 ]
48}

Blocked by T304891: New Service Request Generated Datasets: Image Suggestions Service.
Blocks T294362: Image Suggestions POC Deprecation & Plan for Production.

Notes

If we need to sort the suggestions, the results can be sorted via confidence and timestamp (derived from id). In the current implementation (with the old API), we are getting the first suggestion for which there is sufficient metadata so sorting the response from the new API may not be necessary to achieve feature parity.

Related Objects

Event Timeline

There are a very large number of changes, so older changes are hidden. Show Older Changes
kostajh changed the task status from Open to Stalled.May 30 2022, 12:12 PM
kostajh triaged this task as Medium priority.

I have some questions about how to interpret the new API response compared to the old one, so marking as stalled until we have some more clarity on those.

kostajh changed the task status from Stalled to Open.Jun 2 2022, 11:51 AM

I have some questions about how to interpret the new API response compared to the old one, so marking as stalled until we have some more clarity on those.

What I've learned:

  • multiple results can appear for the same page_id/page_rev due to how the data pipeline is run. If that happens, we should always use the first result, as that is the most up-to-date
  • the old API used low/medium/high as values for confidence, the new one uses an integer value, still waiting to hear back on how that maps to the old definition
kostajh updated the task description. (Show Details)
kostajh set Due Date to Jun 29 2022, 10:00 PM.Jun 2 2022, 12:06 PM
kostajh raised the priority of this task from Medium to High.

Change 806348 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add image: create ImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/806348

Hi @Trizek-WMF, I'm planning to get the last set of changes in by the end of this week so that it can be in next week's train. Will let you know if anything changes.

Hi @Trizek-WMF, I'm planning to get the last set of changes in by the end of this week so that it can be in next week's train. Will let you know if anything changes.

@Trizek-WMF just to add to that: after it's in next week's train, we can enable on testwiki for verification there, and then we can enable in the 1st round wikis the following week. After that, we would be able to move forward with T301601: Scale: deploy to "add an image" to second round of wikis.

Thank you! Second week of July is good.

Change 806348 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add image: create ImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/806348

Change 807625 had a related patch set uploaded (by MewOphaswongse; author: MewOphaswongse):

[mediawiki/extensions/GrowthExperiments@master] Add an image: Support new image suggestions API via NewImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/807625

Change 808207 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] GrowthExperiments: Set GEImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/808207

Change 808208 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] GrowthExperiments: Set GEImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/808208

Change 807625 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add an image: Support new image suggestions API via ProductionImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/807625

Change 808211 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] GrowthExperiments: Switch GEImageRecommendationApiHandler to production

https://gerrit.wikimedia.org/r/808211

Change 808211 abandoned by Kosta Harlan:

[operations/mediawiki-config@master] GrowthExperiments: Switch GEImageRecommendationApiHandler to production

Reason:

https://gerrit.wikimedia.org/r/808211

Change 808235 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] ProductionImageRecommendationApiHandler: Don't assume found_on exists

https://gerrit.wikimedia.org/r/808235

@mewoph I figured out how to set up a tunnel from your local setup (developer docs).

Some observations in testing with article ID 6721577 and masquerading as ptwiki:

  • ProductionImageRecommendationApiHandler: sometimes the found_on property is null (patch)
  • ServiceImageRecommendationProvider: we iterate over all 52 responses, which seems excessive
  • ServiceImageRecommendationProvider: it seems to fail if a single response doesn't pass validation, which seems wrong? It should skip entries which don't pass validation but should return the set of good recommendations – or maybe just the first one?
    • I did not debug why some of these were failing validation

Change 808235 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ProductionImageRecommendationApiHandler: Don't assume found_on exists

https://gerrit.wikimedia.org/r/808235

  • ServiceImageRecommendationProvider: we iterate over all 52 responses, which seems excessive
  • ServiceImageRecommendationProvider: it seems to fail if a single response doesn't pass validation, which seems wrong? It should skip entries which don't pass validation but should return the set of good recommendations – or maybe just the first one?

Thanks @kostajh! For these patches, I tried to keep the existing behavior of ServiceImageRecommendationProvider::processApiResponseData. Returning after we find one valid response makes sense to me. To be honest, I'm not sure why this method is set up in this way. Do you have more context as to why?

Change 808260 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] tests: Add regression test for missing found_on property

https://gerrit.wikimedia.org/r/808260

  • ServiceImageRecommendationProvider: we iterate over all 52 responses, which seems excessive
  • ServiceImageRecommendationProvider: it seems to fail if a single response doesn't pass validation, which seems wrong? It should skip entries which don't pass validation but should return the set of good recommendations – or maybe just the first one?

Thanks @kostajh! For these patches, I tried to keep the existing behavior of ServiceImageRecommendationProvider::processApiResponseData. Returning after we find one valid response makes sense to me. To be honest, I'm not sure why this method is set up in this way. Do you have more context as to why?

I'm not sure. IIRC, at some point we had the idea that the user might choose between multiple images. But at the moment they only choose from one, so I think returning after the first valid, highest ranked result makes sense.

Change 808260 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] tests: Add regression test for missing found_on property

https://gerrit.wikimedia.org/r/808260

Change 808280 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[mediawiki/extensions/GrowthExperiments@master] tests: Add another regression test for missing found_on property

https://gerrit.wikimedia.org/r/808280

Change 808280 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] tests: Add another regression test for missing found_on property

https://gerrit.wikimedia.org/r/808280

mewoph subscribed.

Moving this back to in progress to track the config changes to enable the new API. The tasks to support the new API are in QA.

Change 808207 merged by jenkins-bot:

[operations/mediawiki-config@master] [betalabs] GrowthExperiments: Set GEImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/808207

Change 811701 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/puppet@production] Add image-suggestion listener to service-proxy

https://gerrit.wikimedia.org/r/811701

Change 811701 merged by Giuseppe Lavagetto:

[operations/puppet@production] Add image-suggestion listener to service-proxy

https://gerrit.wikimedia.org/r/811701

Change 808208 merged by jenkins-bot:

[operations/mediawiki-config@master] GrowthExperiments: Set GEImageRecommendationApiHandler

https://gerrit.wikimedia.org/r/808208

Change 811904 had a related patch set uploaded (by Urbanecm; author: Urbanecm):

[operations/mediawiki-config@master] Revert "GrowthExperiments: Set GEImageRecommendationApiHandler"

https://gerrit.wikimedia.org/r/811904

Change 811904 merged by Urbanecm:

[operations/mediawiki-config@master] Revert "GrowthExperiments: Set GEImageRecommendationApiHandler"

https://gerrit.wikimedia.org/r/811904

Change 811954 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[operations/mediawiki-config@master] GrowthExperiments: Set GEImageRecommendationApiHandler (attempt 2)

https://gerrit.wikimedia.org/r/811954

Change 811954 merged by jenkins-bot:

[operations/mediawiki-config@master] GrowthExperiments: Set GEImageRecommendationApiHandler (attempt 2)

https://gerrit.wikimedia.org/r/811954

Mentioned in SAL (#wikimedia-operations) [2022-07-07T13:27:50Z] <urbanecm@deploy1002> Synchronized wmf-config/ProductionServices.php: aa1d8c8ce27c4e19a621250b6fb3cefdb6b64574: GrowthExperiments: Set GEImageRecommendationApiHandler (T306032; 1/2) (duration: 03m 20s)

Mentioned in SAL (#wikimedia-operations) [2022-07-07T13:31:27Z] <urbanecm@deploy1002> Synchronized wmf-config/: aa1d8c8ce27c4e19a621250b6fb3cefdb6b64574: GrowthExperiments: Set GEImageRecommendationApiHandler (T306032; 2/2) (duration: 03m 37s)

kostajh changed the task status from Stalled to In Progress.Jul 8 2022, 11:41 AM
kostajh moved this task from In Progress to QA on the Growth-Team (Sprint 0 (Growth Team)) board.

Where are we about this task?

Done and waiting for QA, although the somewhat related T306034: Write GrowthExperiments image recommendation user feedback to EventGate is still open.

Urbanecm_WMF changed the task status from In Progress to Open.Sep 9 2022, 4:41 PM

@kostajh: Hi, the Due Date set for this open task passed a while ago.
Could you please either update or reset the Due Date (by clicking Edit Task), or set the status of this task to resolved in case this task is done? Thanks!

@kostajh: Hi, the Due Date set for this open task passed a while ago.
Could you please either update or reset the Due Date (by clicking Edit Task), or set the status of this task to resolved in case this task is done? Thanks!

The remaining subtasks are in QA, as is this one (cc @Etonkovidova). I'll remove the due date in the meantime.