fal 1.13.3__py3-none-any.whl → 1.13.5__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.
Potentially problematic release.
This version of fal might be problematic. Click here for more details.
- fal/_fal_version.py +2 -2
- fal/api.py +5 -0
- fal/app.py +19 -1
- {fal-1.13.3.dist-info → fal-1.13.5.dist-info}/METADATA +1 -1
- {fal-1.13.3.dist-info → fal-1.13.5.dist-info}/RECORD +8 -8
- {fal-1.13.3.dist-info → fal-1.13.5.dist-info}/WHEEL +1 -1
- {fal-1.13.3.dist-info → fal-1.13.5.dist-info}/entry_points.txt +0 -0
- {fal-1.13.3.dist-info → fal-1.13.5.dist-info}/top_level.txt +0 -0
fal/_fal_version.py
CHANGED
fal/api.py
CHANGED
|
@@ -1119,6 +1119,11 @@ class BaseServable:
|
|
|
1119
1119
|
request, CUDAOutOfMemoryException()
|
|
1120
1120
|
)
|
|
1121
1121
|
|
|
1122
|
+
# last line of defense against misc GPU errors that could indicate a bad
|
|
1123
|
+
# worker
|
|
1124
|
+
if any(marker in str(exc).lower() for marker in ["cuda", "cudnn", "nvml"]):
|
|
1125
|
+
return JSONResponse({"detail": "GPU error"}, 503)
|
|
1126
|
+
|
|
1122
1127
|
return JSONResponse({"detail": "Internal Server Error"}, 500)
|
|
1123
1128
|
|
|
1124
1129
|
routes = self.collect_routes()
|
fal/app.py
CHANGED
|
@@ -345,7 +345,25 @@ class App(BaseServable):
|
|
|
345
345
|
async def provide_hints_headers(request, call_next):
|
|
346
346
|
response = await call_next(request)
|
|
347
347
|
try:
|
|
348
|
-
|
|
348
|
+
# make sure the hints can be encoded in latin-1, so we don't crash
|
|
349
|
+
# when serving.
|
|
350
|
+
# https://github.com/encode/starlette/blob/a766a58d14007f07c0b5782fa78cdc370b892796/starlette/datastructures.py#L568
|
|
351
|
+
hints = []
|
|
352
|
+
for hint in self.provide_hints():
|
|
353
|
+
try:
|
|
354
|
+
_ = hint.encode("latin-1")
|
|
355
|
+
hints.append(hint)
|
|
356
|
+
except UnicodeEncodeError:
|
|
357
|
+
from fastapi.logger import logger
|
|
358
|
+
|
|
359
|
+
logger.warning(
|
|
360
|
+
"Ignoring hint %s for %s because it can't be encoded in "
|
|
361
|
+
"latin-1",
|
|
362
|
+
hint,
|
|
363
|
+
self.__class__.__name__,
|
|
364
|
+
)
|
|
365
|
+
|
|
366
|
+
response.headers["X-Fal-Runner-Hints"] = ",".join(hints)
|
|
349
367
|
except NotImplementedError:
|
|
350
368
|
# This lets us differentiate between apps that don't provide hints
|
|
351
369
|
# and apps that provide empty hints.
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
fal/__init__.py,sha256=wXs1G0gSc7ZK60-bHe-B2m0l_sA6TrFk4BxY0tMoLe8,784
|
|
2
2
|
fal/__main__.py,sha256=4JMK66Wj4uLZTKbF-sT3LAxOsr6buig77PmOkJCRRxw,83
|
|
3
|
-
fal/_fal_version.py,sha256=
|
|
3
|
+
fal/_fal_version.py,sha256=wNBo9Et0ZuMuyxkOVRCmEvmamdGfbunJjwXY4viGgLY,513
|
|
4
4
|
fal/_serialization.py,sha256=rD2YiSa8iuzCaZohZwN_MPEB-PpSKbWRDeaIDpTEjyY,7653
|
|
5
5
|
fal/_version.py,sha256=EBGqrknaf1WygENX-H4fBefLvHryvJBBGtVJetaB0NY,266
|
|
6
|
-
fal/api.py,sha256=
|
|
7
|
-
fal/app.py,sha256=
|
|
6
|
+
fal/api.py,sha256=gVZKtdMRNKacBCNVmdZZRGMyF3hrR2bqGiAzUBstkDM,45661
|
|
7
|
+
fal/app.py,sha256=aRb8t-5QCrIPeKHY39yJ3231T5uHGZLhSurkRBtzyu8,24216
|
|
8
8
|
fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
|
|
9
9
|
fal/config.py,sha256=mS38EIwjR6h2x5wdrTU5E2hubSZm6D35Qigjteg0RJk,2707
|
|
10
10
|
fal/container.py,sha256=PM7e1RloTCexZ64uAv7sa2RSZxPI-X8KcxkdaZqEfjw,1914
|
|
@@ -134,8 +134,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
|
|
|
134
134
|
openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
|
|
135
135
|
openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
|
|
136
136
|
openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
|
|
137
|
-
fal-1.13.
|
|
138
|
-
fal-1.13.
|
|
139
|
-
fal-1.13.
|
|
140
|
-
fal-1.13.
|
|
141
|
-
fal-1.13.
|
|
137
|
+
fal-1.13.5.dist-info/METADATA,sha256=WKXSB0wWCy7LdarKL3a5hg5Q8RRwI5hLtaQjAfegyZE,4062
|
|
138
|
+
fal-1.13.5.dist-info/WHEEL,sha256=wXxTzcEDnjrTwFYjLPcsW_7_XihufBwmpiBeiXNBGEA,91
|
|
139
|
+
fal-1.13.5.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
|
|
140
|
+
fal-1.13.5.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
|
|
141
|
+
fal-1.13.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|