causilo-client 1.0.2__tar.gz → 1.0.4__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {causilo_client-1.0.2 → causilo_client-1.0.4}/PKG-INFO +8 -3
- {causilo_client-1.0.2 → causilo_client-1.0.4}/README.md +7 -2
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client/__init__.py +1 -1
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client/client.py +11 -4
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client.egg-info/PKG-INFO +8 -3
- {causilo_client-1.0.2 → causilo_client-1.0.4}/pyproject.toml +1 -1
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client/py.typed +0 -0
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client.egg-info/SOURCES.txt +0 -0
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client.egg-info/dependency_links.txt +0 -0
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client.egg-info/requires.txt +0 -0
- {causilo_client-1.0.2 → causilo_client-1.0.4}/causilo_client.egg-info/top_level.txt +0 -0
- {causilo_client-1.0.2 → causilo_client-1.0.4}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: causilo-client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Python client for the Causilo inference API
|
|
5
5
|
Author: Nums AI
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -127,8 +127,13 @@ credential was refused) and `CausiloTimeout`. Timeouts are the one failure the
|
|
|
127
127
|
client will not retry: the server is still computing, so instead it tells the
|
|
128
128
|
server the call was abandoned, and `.refunded` says how many cells came back.
|
|
129
129
|
The hosted API cannot stop a prediction once it has started (`POST /v1/cancel`
|
|
130
|
-
answers 501 there), so against it `.refunded` is `None
|
|
131
|
-
|
|
130
|
+
answers 501 there), so against it `.refunded` is `None`: a call already running
|
|
131
|
+
when your own timeout fires finishes and is counted in full, and one still
|
|
132
|
+
queued is not run. The server's own limit is different: a call that cannot
|
|
133
|
+
finish within the time a request waits (900 seconds, the server stopping the
|
|
134
|
+
work about 30 seconds before that) is stopped, nothing is counted, and the
|
|
135
|
+
client raises `CausiloTimeout` from the server's 504. The default `timeout` is
|
|
136
|
+
900 seconds, so that 504 arrives before it fires. The `RadixError` family of names from
|
|
132
137
|
releases before 0.8.19 remains importable as aliases of the same classes, so an
|
|
133
138
|
`except RadixError` written earlier still catches everything.
|
|
134
139
|
|
|
@@ -107,8 +107,13 @@ credential was refused) and `CausiloTimeout`. Timeouts are the one failure the
|
|
|
107
107
|
client will not retry: the server is still computing, so instead it tells the
|
|
108
108
|
server the call was abandoned, and `.refunded` says how many cells came back.
|
|
109
109
|
The hosted API cannot stop a prediction once it has started (`POST /v1/cancel`
|
|
110
|
-
answers 501 there), so against it `.refunded` is `None
|
|
111
|
-
|
|
110
|
+
answers 501 there), so against it `.refunded` is `None`: a call already running
|
|
111
|
+
when your own timeout fires finishes and is counted in full, and one still
|
|
112
|
+
queued is not run. The server's own limit is different: a call that cannot
|
|
113
|
+
finish within the time a request waits (900 seconds, the server stopping the
|
|
114
|
+
work about 30 seconds before that) is stopped, nothing is counted, and the
|
|
115
|
+
client raises `CausiloTimeout` from the server's 504. The default `timeout` is
|
|
116
|
+
900 seconds, so that 504 arrives before it fires. The `RadixError` family of names from
|
|
112
117
|
releases before 0.8.19 remains importable as aliases of the same classes, so an
|
|
113
118
|
`except RadixError` written earlier still catches everything.
|
|
114
119
|
|
|
@@ -1174,10 +1174,15 @@ def _to_error(response: requests.Response) -> CausiloError:
|
|
|
1174
1174
|
request_id=request_id,
|
|
1175
1175
|
)
|
|
1176
1176
|
if status == 504:
|
|
1177
|
+
# The server's own sentence when it sent one: it says whether the
|
|
1178
|
+
# charge was released, which this client cannot know (2026-11-02).
|
|
1179
|
+
said = str(doc.get("detail") or "").strip()
|
|
1177
1180
|
return CausiloTimeout(
|
|
1178
|
-
"
|
|
1179
|
-
|
|
1180
|
-
|
|
1181
|
+
(f"{said} (504; not retried.)" if said else
|
|
1182
|
+
"The service stopped this request because it could not finish "
|
|
1183
|
+
"within the time a request waits (504). It was not retried, "
|
|
1184
|
+
"because the same table would take as long again: send a "
|
|
1185
|
+
"smaller table, or fewer rows at a time."),
|
|
1181
1186
|
status=status,
|
|
1182
1187
|
error_code=code,
|
|
1183
1188
|
request_id=request_id,
|
|
@@ -1289,7 +1294,9 @@ def _causes(exc: BaseException):
|
|
|
1289
1294
|
exc = exc.__cause__ or exc.__context__
|
|
1290
1295
|
|
|
1291
1296
|
|
|
1292
|
-
# Statuses
|
|
1297
|
+
# Statuses never retried, whatever the body claims: a 502's work was already
|
|
1298
|
+
# charged, and a 504's table would take as long again (the service stops it
|
|
1299
|
+
# and charges nothing).
|
|
1293
1300
|
_NEVER_RETRY_STATUS = frozenset({502, 504})
|
|
1294
1301
|
|
|
1295
1302
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: causilo-client
|
|
3
|
-
Version: 1.0.
|
|
3
|
+
Version: 1.0.4
|
|
4
4
|
Summary: Python client for the Causilo inference API
|
|
5
5
|
Author: Nums AI
|
|
6
6
|
License-Expression: LicenseRef-Proprietary
|
|
@@ -127,8 +127,13 @@ credential was refused) and `CausiloTimeout`. Timeouts are the one failure the
|
|
|
127
127
|
client will not retry: the server is still computing, so instead it tells the
|
|
128
128
|
server the call was abandoned, and `.refunded` says how many cells came back.
|
|
129
129
|
The hosted API cannot stop a prediction once it has started (`POST /v1/cancel`
|
|
130
|
-
answers 501 there), so against it `.refunded` is `None
|
|
131
|
-
|
|
130
|
+
answers 501 there), so against it `.refunded` is `None`: a call already running
|
|
131
|
+
when your own timeout fires finishes and is counted in full, and one still
|
|
132
|
+
queued is not run. The server's own limit is different: a call that cannot
|
|
133
|
+
finish within the time a request waits (900 seconds, the server stopping the
|
|
134
|
+
work about 30 seconds before that) is stopped, nothing is counted, and the
|
|
135
|
+
client raises `CausiloTimeout` from the server's 504. The default `timeout` is
|
|
136
|
+
900 seconds, so that 504 arrives before it fires. The `RadixError` family of names from
|
|
132
137
|
releases before 0.8.19 remains importable as aliases of the same classes, so an
|
|
133
138
|
`except RadixError` written earlier still catches everything.
|
|
134
139
|
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|