Comments (5)
Noting the requests
docs on the timeout parameter: https://requests.readthedocs.io/en/latest/user/advanced/#timeouts
By the way, was this motivated by a specific URL that was failing to respond in a timely manner? And do you remember what that URL was?
from manubot.
This was motivated because I tried a manubot cite command that took over 10 minutes to search for 5 isbn.
$ time manubot cite --csl https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl --txt isbn:9789587784251 isbn:9798665944401 isbn:9781090802965 isbn:978-1491910399 isbn:9780128029145
## WARNING
Error parsing search_query output as JSON for isbn:9798665944401:
No items returned from any translator
## WARNING
Error in get_isbn_csl_item_zotero for 9798665944401 due to a JSONDecodeError:
[Errno Expecting value] No items returned from any translator: 0
## WARNING
Error in get_isbn_csl_item_citoid for 9798665944401 due to a KeyError:
'Metadata for ISBN 9798665944401 not found at https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/9798665944401'
Benjamin Smith. (2020). Ciencia De Datos - Guía completa para principiantes aprende sobre los reinos de la ciencia de datos de la A a la Z.
Garc??a Herrero, J., Molina L??pez, J. M., Berlanga de Jes??s, A., Patricio Guisado, M. ??ngel., Bustamante, ??lvaro. L., Padilla R, & Washington. (2018). Ciencia de datos: t??cnicas anal??ticas y aprendizaje estad??stico. Un enfoque pr??ctico. Alfaomega.
Jones, H. (2019). Ciencia de los datos: la gu??a definitiva sobre an??lisis de datos, miner??a de datos, almacenamiento de datos, visualizaci??n de datos, Big Data para empresas y apriendizaje autom??tico para principiantes.
Talia, D., Trunfio, P., & Marozzo, F. (2016). Data Analysis in the Cloud: Models, Techniques and Applications. http://www.sciencedirect.com/science/book/9780128028810
Wickham, H., & Grolemund, G. (2016). R for data science: import, tidy, transform, visualize, and model data (First edition). O’Reilly.
real 11m39.976s
user 0m0.705s
sys 0m0.070s
Upon investigation, I found that most of this time is waiting for multiple responses that won't come.
This is the same command on #338 dev environment:
(manubot-dev)$ time manubot cite --csl https://raw.githubusercontent.com/citation-style-language/styles/master/apa.csl --txt isbn:9789587784251 isbn:9798665944401 isbn:9781090802965 isbn:978-1491910399 isbn:9780128029145
## WARNING
Error in get_isbn_csl_item_zotero for 9789587784251 due to a ReadTimeout:
HTTPSConnectionPool(host='translate.manubot.org', port=443): Read timed out. (read timeout=3)
## WARNING
Error parsing search_query output as JSON for isbn:9798665944401:
No items returned from any translator
## WARNING
Error in get_isbn_csl_item_zotero for 9798665944401 due to a JSONDecodeError:
Expecting value: line 1 column 1 (char 0)
## WARNING
Error in get_isbn_csl_item_citoid for 9798665944401 due to a KeyError:
'Metadata for ISBN 9798665944401 not found at https://en.wikipedia.org/api/rest_v1/data/citation/mediawiki/9798665944401'
Benjamin Smith. (2020). Ciencia De Datos - Guía completa para principiantes aprende sobre los reinos de la ciencia de datos de la A a la Z.
Jesús., G. H. (2018). Ciencia de datos : técnicas analíticas y aprendizaje estadístico. Un enfoque práctico. Alfaomega. https://www.worldcat.org/oclc/1142377999
Jones, H. (2019). Ciencia de los datos: la gu??a definitiva sobre an??lisis de datos, miner??a de datos, almacenamiento de datos, visualizaci??n de datos, Big Data para empresas y apriendizaje autom??tico para principiantes.
Talia, D., Trunfio, P., & Marozzo, F. (2016). Data Analysis in the Cloud: Models, Techniques and Applications. http://www.sciencedirect.com/science/book/9780128028810
Wickham, H., & Grolemund, G. (2016). R for data science: import, tidy, transform, visualize, and model data (First edition). O’Reilly.
real 0m44.535s
user 0m1.145s
sys 0m0.042s
There are still improvements to be made, but 1 min for 5 references is much more tolerable than 12.
from manubot.
@dhimmel I'm almost done with this feature would you rather have dev history or a single squashed commit?
from manubot.
I'm almost done with this feature would you rather have dev history or a single squashed commit?
In PR either is fine. We usually squash merge so it's okay for the PR to have many commits.
Upon investigation, I found that most of this time is waiting for multiple responses that won't come.
Is most of the time spent on looking up the ISBN 9798665944401
(which doesn't seem to exist or at least doesn't have metadata)? I am asking because I think the issue might be more specific than timeout should be specified for all requests.
Many requests will fail without delay when a bad identifier is passed. It seems the ISBN requests are an exception since they get stuck on bad identifiers. Perhaps we only need to set timeout when the APIs have an issue with taking too long.
from manubot.
It does seem to exist:
$ fdclose 2 manubot cite --txt isbn:9798665944401
1. Ciencia De Datos - Guía completa para principiantes aprende sobre los reinos de la ciencia de datos de la A a la Z
Benjamin Smith
(2020)
ISBN: 9798665944401
from manubot.
Related Issues (20)
- Manuscript build failing due to import error for `soft_unicode` from `markup_safe` HOT 2
- ImportError: cannot import name 'soft_unicode' from 'markupsafe' HOT 4
- docx manuscript fails to open on MS word HOT 7
- Quarto integration HOT 9
- Make use of Manubot logo on PyPI and elsewhere HOT 1
- Collect reference warnings and errors
- Test are too slow HOT 4
- Request to rate limited APIs do not respect limits outside function boundary.
- manubot cite supplies the first name and last name swapped HOT 4
- Upgrade CSL Schema to v1.0.2 HOT 4
- Pubmed NCBI E-Utils API calls with `rettype=full` have an empty response HOT 3
- Does `cite` batch requests for multiple IDs? HOT 2
- PMID citations not working anymore HOT 7
- page break without a title HOT 5
- ai-revision not available when installing via pip HOT 9
- Support ORCID API identifier types? HOT 3
- date-specific Wikipedia URL is not parsed correctly§ HOT 2
- Pin pyrate limiter version or upgrade to 3.0.0 HOT 6
- reference format? HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from manubot.