fal 1.13.2__py3-none-any.whl → 1.13.4__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 CHANGED
@@ -17,5 +17,5 @@ __version__: str
17
17
  __version_tuple__: VERSION_TUPLE
18
18
  version_tuple: VERSION_TUPLE
19
19
 
20
- __version__ = version = '1.13.2'
21
- __version_tuple__ = version_tuple = (1, 13, 2)
20
+ __version__ = version = '1.13.4'
21
+ __version_tuple__ = version_tuple = (1, 13, 4)
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
- response.headers["X-Fal-Runner-Hints"] = ",".join(self.provide_hints())
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.
fal/exceptions/_cuda.py CHANGED
@@ -38,6 +38,9 @@ def _is_cuda_out_of_memory(exception: BaseException) -> bool:
38
38
  if "NVML_SUCCESS == r INTERNAL ASSERT FAILED" in msg:
39
39
  return True
40
40
 
41
+ if "CUDNN_STATUS_INTERNAL_ERROR" in msg:
42
+ return True
43
+
41
44
  return False
42
45
 
43
46
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: fal
3
- Version: 1.13.2
3
+ Version: 1.13.4
4
4
  Summary: fal is an easy-to-use Serverless Python Framework
5
5
  Author: Features & Labels <support@fal.ai>
6
6
  Requires-Python: >=3.8
@@ -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=hTrFYarxhkgFoSWsNux9T4qa4NvhnWLOscYReFS8bQs,513
3
+ fal/_fal_version.py,sha256=PjPNf6HjvMHh44728cyV13E5eqdX78hsSVd0lhauNcY,513
4
4
  fal/_serialization.py,sha256=rD2YiSa8iuzCaZohZwN_MPEB-PpSKbWRDeaIDpTEjyY,7653
5
5
  fal/_version.py,sha256=EBGqrknaf1WygENX-H4fBefLvHryvJBBGtVJetaB0NY,266
6
6
  fal/api.py,sha256=dNl6c_CvoFqG5tGXcA6nH6zhuHUDQY3KKLZfNYAIGGo,45400
7
- fal/app.py,sha256=kHBe5QT7eeptMZ_X70vjPaeBG7Qv2u0a-mxvcEABHgQ,23402
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
@@ -42,7 +42,7 @@ fal/console/icons.py,sha256=De9MfFaSkO2Lqfne13n3PrYfTXJVIzYZVqYn5BWsdrA,108
42
42
  fal/console/ux.py,sha256=KMQs3UHQvVHDxDQQqlot-WskVKoMQXOE3jiVkkfmIMY,356
43
43
  fal/exceptions/__init__.py,sha256=m2okJEpax11mnwmoqO_pCGtbt-FvzKiiuMhKo2ok-_8,270
44
44
  fal/exceptions/_base.py,sha256=LwzpMaW_eYQEC5s26h2qGXbNA-S4bOqC8s-bMCX6HjE,1491
45
- fal/exceptions/_cuda.py,sha256=bajgVfzubYjxJIwFlvUyBhPobX8HnZozCANUDconV94,1653
45
+ fal/exceptions/_cuda.py,sha256=L3qvDNaPTthp95IFSBI6pMt3YbRfn1H0inQkj_7NKF8,1719
46
46
  fal/exceptions/auth.py,sha256=gxRago5coI__vSIcdcsqhhq1lRPkvCnwPAueIaXTAdw,329
47
47
  fal/logging/__init__.py,sha256=avgKA2V8GJeUtZuWZJjSYgkkrXKpuDMS-YiIBmLda7w,1599
48
48
  fal/logging/isolate.py,sha256=jIryi46ZVlJ1mfan4HLNQQ3jwMi8z-WwfqqLlttQVkc,2449
@@ -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.2.dist-info/METADATA,sha256=WYWB2pvBi7a0iqR_lfx9aKKSUIwoUG4F_SX5th7POsY,4062
138
- fal-1.13.2.dist-info/WHEEL,sha256=pxyMxgL8-pra_rKaQ4drOZAegBVuX-G_4nRHjjgWbmo,91
139
- fal-1.13.2.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
140
- fal-1.13.2.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
141
- fal-1.13.2.dist-info/RECORD,,
137
+ fal-1.13.4.dist-info/METADATA,sha256=6Vywaor5_XGK16hsBOMv11jTrDqb964BNTqLNvh6ulk,4062
138
+ fal-1.13.4.dist-info/WHEEL,sha256=SmOxYU7pzNKBqASvQJ7DjX3XGUF92lrGhMb3R6_iiqI,91
139
+ fal-1.13.4.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
140
+ fal-1.13.4.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
141
+ fal-1.13.4.dist-info/RECORD,,
@@ -1,5 +1,5 @@
1
1
  Wheel-Version: 1.0
2
- Generator: setuptools (79.0.0)
2
+ Generator: setuptools (79.0.1)
3
3
  Root-Is-Purelib: true
4
4
  Tag: py3-none-any
5
5