genblaze-replicate 0.2.1__tar.gz → 0.2.2__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.
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/PKG-INFO +1 -1
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/genblaze_replicate/provider.py +4 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/pyproject.toml +1 -1
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/.gitignore +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/README.md +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/genblaze_replicate/__init__.py +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/genblaze_replicate/_errors.py +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/genblaze_replicate/py.typed +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/tests/__init__.py +0 -0
- {genblaze_replicate-0.2.1 → genblaze_replicate-0.2.2}/tests/test_replicate_provider.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: genblaze-replicate
|
|
3
|
-
Version: 0.2.
|
|
3
|
+
Version: 0.2.2
|
|
4
4
|
Summary: Replicate provider adapter for genblaze
|
|
5
5
|
Project-URL: Homepage, https://github.com/backblaze-labs/genblaze
|
|
6
6
|
Project-URL: Documentation, https://github.com/backblaze-labs/genblaze
|
|
@@ -29,6 +29,7 @@ from genblaze_core.providers import (
|
|
|
29
29
|
route_by_media_type,
|
|
30
30
|
validate_asset_url,
|
|
31
31
|
)
|
|
32
|
+
from genblaze_core.providers.retry import retry_after_from_response
|
|
32
33
|
from genblaze_core.runnable.config import RunnableConfig
|
|
33
34
|
|
|
34
35
|
from ._errors import map_replicate_error
|
|
@@ -123,6 +124,7 @@ class ReplicateProvider(BaseProvider):
|
|
|
123
124
|
raise ProviderError(
|
|
124
125
|
f"Replicate submit failed: {exc}",
|
|
125
126
|
error_code=map_replicate_error(exc),
|
|
127
|
+
retry_after=retry_after_from_response(exc),
|
|
126
128
|
) from exc
|
|
127
129
|
|
|
128
130
|
def poll(self, prediction_id: Any, config: RunnableConfig | None = None) -> bool:
|
|
@@ -137,6 +139,7 @@ class ReplicateProvider(BaseProvider):
|
|
|
137
139
|
raise ProviderError(
|
|
138
140
|
f"Replicate poll failed: {exc}",
|
|
139
141
|
error_code=map_replicate_error(exc),
|
|
142
|
+
retry_after=retry_after_from_response(exc),
|
|
140
143
|
) from exc
|
|
141
144
|
|
|
142
145
|
def fetch_output(self, prediction_id: Any, step: Step) -> Step:
|
|
@@ -220,4 +223,5 @@ class ReplicateProvider(BaseProvider):
|
|
|
220
223
|
raise ProviderError(
|
|
221
224
|
f"Replicate fetch_output failed: {exc}",
|
|
222
225
|
error_code=map_replicate_error(exc),
|
|
226
|
+
retry_after=retry_after_from_response(exc),
|
|
223
227
|
) from exc
|
|
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
|
|
|
4
4
|
|
|
5
5
|
[project]
|
|
6
6
|
name = "genblaze-replicate"
|
|
7
|
-
version = "0.2.
|
|
7
|
+
version = "0.2.2"
|
|
8
8
|
description = "Replicate provider adapter for genblaze"
|
|
9
9
|
authors = [{name = "Jeronimo De Leon", email = "jdeleon@backblaze.com"}]
|
|
10
10
|
readme = "README.md"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|