poma 0.2.2__py3-none-any.whl → 0.2.3__py3-none-any.whl
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.
- poma/client.py +11 -0
- {poma-0.2.2.dist-info → poma-0.2.3.dist-info}/METADATA +1 -1
- {poma-0.2.2.dist-info → poma-0.2.3.dist-info}/RECORD +6 -6
- {poma-0.2.2.dist-info → poma-0.2.3.dist-info}/WHEEL +0 -0
- {poma-0.2.2.dist-info → poma-0.2.3.dist-info}/licenses/LICENSE +0 -0
- {poma-0.2.2.dist-info → poma-0.2.3.dist-info}/top_level.txt +0 -0
poma/client.py
CHANGED
|
@@ -139,6 +139,8 @@ class Poma:
|
|
|
139
139
|
"""
|
|
140
140
|
time.sleep(initial_delay)
|
|
141
141
|
current_interval = poll_interval
|
|
142
|
+
last_status = None
|
|
143
|
+
|
|
142
144
|
while True:
|
|
143
145
|
time.sleep(current_interval)
|
|
144
146
|
try:
|
|
@@ -181,9 +183,18 @@ class Poma:
|
|
|
181
183
|
elif status == "processing":
|
|
182
184
|
if show_progress:
|
|
183
185
|
print(f"Job {job_id} is still processing...")
|
|
186
|
+
if last_status == "pending":
|
|
187
|
+
current_interval = poll_interval
|
|
188
|
+
current_interval = min(current_interval * 1.5, max_interval)
|
|
189
|
+
elif status == "pending":
|
|
190
|
+
if show_progress:
|
|
191
|
+
print(
|
|
192
|
+
f"Job {job_id} is pending (queued due to rate limiting, sequential processing - common on demo accounts)..."
|
|
193
|
+
)
|
|
184
194
|
current_interval = min(current_interval * 1.5, max_interval)
|
|
185
195
|
else:
|
|
186
196
|
raise InvalidResponseError(f"Unexpected job status: {status}")
|
|
197
|
+
last_status = status
|
|
187
198
|
except httpx.HTTPStatusError as error:
|
|
188
199
|
raise RemoteServerError(
|
|
189
200
|
f"HTTP error: {error.response.status_code} {error.response.text}"
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
poma/__init__.py,sha256=SARVBTJw2pkIXR2_OYMPYjB7W335er_2-9j4yhzVTZI,266
|
|
2
|
-
poma/client.py,sha256=
|
|
2
|
+
poma/client.py,sha256=ez_vwvhZkgRELP2EuKbs4xZjvAIRxMEytfwnbC_78O0,14863
|
|
3
3
|
poma/exceptions.py,sha256=CsawBf0pwtZvm_0kPxLQ5WsIU_vCzNoMEMF_o5OJkBQ,519
|
|
4
4
|
poma/retrieval.py,sha256=rdFjUI9_soOLA5Cs7YGgWXpObFULx-VsQ66CdC8Zwrg,13658
|
|
5
5
|
poma/integrations/__init__.py,sha256=xrrJluggTLtrKs4jLOZUWkFENqWSHSnhCqYQYY51kq0,405
|
|
6
6
|
poma/integrations/langchain_poma.py,sha256=wDVrPJde7gRJR4ml3wS4qiL_dM4w2RDKVZYM_FrYgHM,14202
|
|
7
7
|
poma/integrations/llamaindex_poma.py,sha256=biSAwcbKShsTdnjtCtM63GCzD5Nig4-85ZBquB_CG8w,14516
|
|
8
|
-
poma-0.2.
|
|
9
|
-
poma-0.2.
|
|
10
|
-
poma-0.2.
|
|
11
|
-
poma-0.2.
|
|
12
|
-
poma-0.2.
|
|
8
|
+
poma-0.2.3.dist-info/licenses/LICENSE,sha256=YRzZ4sQOWV3ut0G4LHZJ2hT90shzZufGlXoIx4LWFEo,15254
|
|
9
|
+
poma-0.2.3.dist-info/METADATA,sha256=PrpZjFh4b1hsv-rad2HVTj3f1qjqvNkNkvx1ISc3kf0,3083
|
|
10
|
+
poma-0.2.3.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
11
|
+
poma-0.2.3.dist-info/top_level.txt,sha256=f_3c5Y6SojNnH0iiiE898fIKF6R2LqWyAw-BGi-72YI,5
|
|
12
|
+
poma-0.2.3.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|