[Wikidata-bugs] [Maniphest] T287813: [Session] Developing a bot to add mass information from APIs to Wikidata: OpenCitations Bot
Csisc updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T287813 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Csisc Cc: #bot-frameworks, #wikidata, Csisc, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, JJMC89, Headbomb, _jensen, rosalieper, Bodhisattwa, Scott_WUaS, APerson, Wikidata-bugs, Xqt, aude, Mbch331, Ainali ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287813: [Session] Developing a bot to add mass information from APIs to Wikidata: OpenCitations Bot
Csisc updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T287813 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Csisc Cc: #bot-frameworks, #wikidata, Csisc, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, JJMC89, Headbomb, _jensen, rosalieper, Bodhisattwa, Scott_WUaS, APerson, Wikidata-bugs, Xqt, aude, Mbch331, Ainali ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287813: [Session] Developing a bot to add mass information from APIs to Wikidata: OpenCitations Bot
Csisc created this task. Csisc added projects: Wikimania-Hackathon-2021, Bot-Frameworks, Wikidata. Restricted Application added a subscriber: Aklapper. TASK DESCRIPTION **Username or display name:** Houcemeddine Turki (User:Csisc) **Session type (select one):** [X] Presentation (including Q/A) - 25 mins [ ] Discussion (including Q/A) - 55 mins [ ] Workshop (including Q/A) - 55 mins **Date and time:** August 13th, 2021, 17:00 UTC Session Details --- **Short description of the session (~150 words):** In this brief presentation, I demonstrate how to create a bot that extracts information from the REST API of a CC0 Semantic Database and automatically add the obtained output to Wikidata. I will use Python 3.9 with freely available libraries like Requests as well as with several Wikidata tools like the Wikidata Hub and QuickStatements API for developing the bot. For the demonstration, I will apply this method to create the OpenCitations Bot that adds citation data from OpenCitations COCI API to Wikidata. **Target audience:** Beginners with basic knowledge of Python, Wikidata Contributors **(Optional) Additional resources:** - https://github.com/csisc/OpenCitations-Bot - https://meta.wikimedia.org/wiki/User:OpenCitations_Bot - https://www.wikidata.org/wiki/Wikidata:Requests_for_permissions/Bot/OpenCitations_Bot - https://realpython.com/python-requests/ TASK DETAIL https://phabricator.wikimedia.org/T287813 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Csisc Cc: #bot-frameworks, #wikidata, Csisc, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, JJMC89, Headbomb, _jensen, rosalieper, Bodhisattwa, Scott_WUaS, APerson, Wikidata-bugs, Xqt, aude, Mbch331, Ainali ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
Michaelcochez closed this task as "Resolved". Michaelcochez added a comment. The example I was looking at fits the case you describe. Server {"meta":{"domain":"wikidata.beta.wmflabs.org","stream":"wd_propertysuggester.server_side_property_request","id":"8c5be2b3-b817-4505-9980-a891db3a5699","dt":"2021-07-30T23:39:01.124Z","request_id":"5147f620-f18f-11eb-8a8c-542020854490"},"http":{"request_headers":{"user-agent":"Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/91.0.4472.101 Safari/537.36"}},"$schema":"/analytics/mediawiki/wd_propertysuggester/server_side_property_request/1.0.0","propertysuggester_name":"PropertySuggester","existing_properties":[],"existing_types":[],"request_duration_ms":-1,"add_suggestions_made":["694"],"language_code":"en","event_id":"not16276883407032500716a","dt":"2021-07-30T23:39:01Z"} Client {"$schema":"/analytics/mediawiki/wd_propertysuggester/client_side_property_request/1.0.0","num_characters":1,"user_id":"not logged in","session_id":"YQRsGiDkDtOJKw9uS8U9qQAAABA","entity_id":"Q91","event_id":"not16276878015152500716a","meta":{"stream":"wd_propertysuggester.client_side_property_request","domain":"wikidata.beta.wmflabs.org","id":"4bb6f96d-4b25-464a-9067-7c127fef4764","dt":"2021-07-30T23:30:21.867Z","request_id":"1bc72c60-f18e-11eb-8115-0b14de326e0b"},"dt":"2021-07-30T23:30:01.515Z"} TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj, Michaelcochez Cc: Michaelcochez, Aklapper, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T285098: Production A/B test deployment - Improved Property Suggester/Recommender
Michaelcochez closed subtask T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester as Resolved. TASK DETAIL https://phabricator.wikimedia.org/T285098 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Michaelcochez Cc: Ottomata, Lucas_Werkmeister_WMDE, Martaannaj, Michaelcochez, Michael, Addshore, Aklapper, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Iflorez, Kent7301, alaa_wmde, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T285098: Production A/B test deployment - Improved Property Suggester/Recommender
Martaannaj updated the task description. TASK DETAIL https://phabricator.wikimedia.org/T285098 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj Cc: Ottomata, Lucas_Werkmeister_WMDE, Martaannaj, Michaelcochez, Michael, Addshore, Aklapper, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Iflorez, Kent7301, alaa_wmde, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Lydia_Pintscher, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
Martaannaj added a comment. @Michaelcochez Should be fixed now, in the case where there are no properties already attributed to the entity the PropertySuggester would simply return a pre-set list, so the request duration would be 0 ms. This in turn would cause the line $this->requestDuration ?: -1 to replace the 0 by -1, causing the error. TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj Cc: Michaelcochez, Aklapper, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
gerritbot added a project: Patch-For-Review. TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj, gerritbot Cc: Michaelcochez, Aklapper, Biggs657, Invadibot, Lalamarie69, maantietaja, Juan90264, Alter-paule, Beast1978, Un1tY, Akuckartz, Hook696, Kent7301, joker88john, CucyNoiD, Nandana, Gaboe420, Giuliamocci, Cpaulf30, Lahi, Gq86, Af420, Bsandipan, GoranSMilovanovic, QZanden, LawExplorer, Lewizho99, Maathavan, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
gerritbot added a comment. Change 709209 had a related patch set uploaded (by Martaannaj; author: Martaannaj): [mediawiki/extensions/PropertySuggester@master] Fix setting the request duration correctly for the PropertySuggester https://gerrit.wikimedia.org/r/709209 TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj, gerritbot Cc: Michaelcochez, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
Martaannaj added a comment. @Michaelcochez can you give me an example of an entity where this happens? Because looking at https://wikidata.beta.wmflabs.org/wiki/Q86 (served by the PropertySuggester) the request duration gets logged nicely. In the implementation, in the case where the call to the SchemaTreeRecommender times out the request gets handled by the PropertySuggester. In these cases the request duration gets logged as -1 to indicate that it was supposed to be handled by the SchemaTreeRecommender but something went wrong with the request so it ended up being executed by the PropertySuggester. Maybe this is what you see in the logs? I think that what should be seen is one event log where the recommender used is the 'SchemaTreeRecommender' with the request duration of -1 and then another server side log for the same entity but with the recommender used 'PropertySuggester' TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj Cc: Michaelcochez, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org
[Wikidata-bugs] [Maniphest] T287797: request_duration_ms is -1 in A/B testing when the request goes to the PropertySuggester
Martaannaj added a comment. @Michaelcochez can you give me an example of an entity where this happens? Because looking at https://wikidata.beta.wmflabs.org/wiki/Q86 (served by the PropertySuggester) the request duration gets logged nicely. In the implementation, in the case where the call to the SchemaTreeRecommender times out the request gets handled by the PropertySuggester. In these cases the request duration gets logged as -1 to indicate that it was supposed to be handled by the SchemaTreeRecommender but something went wrong with the request so it ended up being executed by the PropertySuggester. Maybe this is what you see in the logs? TASK DETAIL https://phabricator.wikimedia.org/T287797 EMAIL PREFERENCES https://phabricator.wikimedia.org/settings/panel/emailpreferences/ To: Martaannaj Cc: Michaelcochez, Aklapper, Invadibot, maantietaja, Akuckartz, Nandana, Lahi, Gq86, GoranSMilovanovic, QZanden, LawExplorer, _jensen, rosalieper, Scott_WUaS, Wikidata-bugs, aude, Sjoerddebruin, Mbch331 ___ Wikidata-bugs mailing list -- wikidata-bugs@lists.wikimedia.org To unsubscribe send an email to wikidata-bugs-le...@lists.wikimedia.org