Monkey patching as a desperate measure. (#2704)

* Monkey patching as a desperate measure.

* New snapshot ?
This commit is contained in:
Nicolas Patry 2024-10-28 11:25:13 +01:00 committed by GitHub
parent 513d19b955
commit 98330df65e
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 23 additions and 11 deletions

View File

@ -1,3 +1,15 @@
# ruff: noqa: E402
import requests
class SessionTimeoutFix(requests.Session):
def request(self, *args, **kwargs):
timeout = kwargs.pop("timeout", 120)
return super().request(*args, **kwargs, timeout=timeout)
requests.sessions.Session = SessionTimeoutFix
import asyncio import asyncio
import contextlib import contextlib
import json import json

View File

@ -16,52 +16,52 @@
}, },
{ {
"id": 21017, "id": 21017,
"logprob": -9.09375, "logprob": -9.0859375,
"text": "ometric" "text": "ometric"
}, },
{ {
"id": 81, "id": 81,
"logprob": -0.2590332, "logprob": -0.25927734,
"text": "_" "text": "_"
}, },
{ {
"id": 6009, "id": 6009,
"logprob": -2.203125, "logprob": -2.2109375,
"text": "mean" "text": "mean"
}, },
{ {
"id": 26, "id": 26,
"logprob": -0.30029297, "logprob": -0.2993164,
"text": "(" "text": "("
}, },
{ {
"id": 62, "id": 62,
"logprob": -5.6757812, "logprob": -5.671875,
"text": "L" "text": "L"
}, },
{ {
"id": 44, "id": 44,
"logprob": -3.0898438, "logprob": -3.0742188,
"text": ":" "text": ":"
}, },
{ {
"id": 1682, "id": 1682,
"logprob": -0.67333984, "logprob": -0.6777344,
"text": " List" "text": " List"
}, },
{ {
"id": 77, "id": 77,
"logprob": -0.3869629, "logprob": -0.38354492,
"text": "[" "text": "["
}, },
{ {
"id": 1808, "id": 1808,
"logprob": -0.92041016, "logprob": -0.91845703,
"text": "float" "text": "float"
}, },
{ {
"id": 10794, "id": 10794,
"logprob": -2.5390625, "logprob": -2.5371094,
"text": "]):" "text": "]):"
} }
], ],
@ -69,7 +69,7 @@
"tokens": [ "tokens": [
{ {
"id": 284, "id": 284,
"logprob": 0.0, "logprob": -0.048583984,
"special": false, "special": false,
"text": "\n " "text": "\n "
}, },