fal 1.5.8__py3-none-any.whl → 1.5.10__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/app.py +10 -2
- fal/apps.py +4 -2
- fal/workflows.py +10 -4
- {fal-1.5.8.dist-info → fal-1.5.10.dist-info}/METADATA +3 -3
- {fal-1.5.8.dist-info → fal-1.5.10.dist-info}/RECORD +9 -9
- {fal-1.5.8.dist-info → fal-1.5.10.dist-info}/WHEEL +1 -1
- {fal-1.5.8.dist-info → fal-1.5.10.dist-info}/entry_points.txt +0 -0
- {fal-1.5.8.dist-info → fal-1.5.10.dist-info}/top_level.txt +0 -0
fal/_fal_version.py
CHANGED
fal/app.py
CHANGED
|
@@ -69,6 +69,12 @@ async def _set_logger_labels(
|
|
|
69
69
|
logger_labels: dict[str, str], channel: async_grpc.Channel
|
|
70
70
|
):
|
|
71
71
|
try:
|
|
72
|
+
import sys
|
|
73
|
+
|
|
74
|
+
# Flush any prints that were buffered before setting the logger labels
|
|
75
|
+
sys.stderr.flush()
|
|
76
|
+
sys.stdout.flush()
|
|
77
|
+
|
|
72
78
|
isolate = definitions.IsolateStub(channel)
|
|
73
79
|
isolate_request = definitions.SetMetadataRequest(
|
|
74
80
|
# TODO: when submit is shipped, get task_id from an env var
|
|
@@ -77,9 +83,11 @@ async def _set_logger_labels(
|
|
|
77
83
|
)
|
|
78
84
|
res = isolate.SetMetadata(isolate_request)
|
|
79
85
|
code = await res.code()
|
|
80
|
-
assert str(code) == "StatusCode.OK"
|
|
86
|
+
assert str(code) == "StatusCode.OK", str(code)
|
|
81
87
|
except BaseException:
|
|
82
|
-
|
|
88
|
+
# NOTE hiding this for now to not print on every request
|
|
89
|
+
# logger.debug("Failed to set logger labels", exc_info=True)
|
|
90
|
+
pass
|
|
83
91
|
|
|
84
92
|
|
|
85
93
|
def wrap_app(cls: type[App], **kwargs) -> fal.api.IsolatedFunction:
|
fal/apps.py
CHANGED
|
@@ -173,7 +173,8 @@ def submit(app_id: str, arguments: dict[str, Any], *, path: str = "") -> Request
|
|
|
173
173
|
app_id = _backwards_compatible_app_id(app_id)
|
|
174
174
|
url = _QUEUE_URL_FORMAT.format(app_id=app_id)
|
|
175
175
|
if path:
|
|
176
|
-
|
|
176
|
+
_path = path[len("/") :] if path.startswith("/") else path
|
|
177
|
+
url += "/" + _path
|
|
177
178
|
|
|
178
179
|
creds = get_default_credentials()
|
|
179
180
|
|
|
@@ -235,7 +236,8 @@ def _connect(app_id: str, *, path: str = "/realtime") -> Iterator[_RealtimeConne
|
|
|
235
236
|
app_id = _backwards_compatible_app_id(app_id)
|
|
236
237
|
url = _REALTIME_URL_FORMAT.format(app_id=app_id)
|
|
237
238
|
if path:
|
|
238
|
-
|
|
239
|
+
_path = path[len("/") :] if path.startswith("/") else path
|
|
240
|
+
url += "/" + _path
|
|
239
241
|
|
|
240
242
|
creds = get_default_credentials()
|
|
241
243
|
|
fal/workflows.py
CHANGED
|
@@ -5,7 +5,7 @@ import webbrowser
|
|
|
5
5
|
from argparse import ArgumentParser
|
|
6
6
|
from collections import Counter
|
|
7
7
|
from dataclasses import dataclass, field
|
|
8
|
-
from typing import Any, Iterator, Union, cast
|
|
8
|
+
from typing import Any, Dict, Iterator, List, Union, cast
|
|
9
9
|
|
|
10
10
|
import graphlib
|
|
11
11
|
import rich
|
|
@@ -21,8 +21,8 @@ from fal import flags
|
|
|
21
21
|
from fal.exceptions import FalServerlessException
|
|
22
22
|
from fal.rest_client import REST_CLIENT
|
|
23
23
|
|
|
24
|
-
JSONType = Union[
|
|
25
|
-
SchemaType =
|
|
24
|
+
JSONType = Union[Dict[str, Any], List[Any], str, int, float, bool, None, "Leaf"]
|
|
25
|
+
SchemaType = Dict[str, Any]
|
|
26
26
|
|
|
27
27
|
VARIABLE_PREFIX = "$"
|
|
28
28
|
INPUT_VARIABLE_NAME = "input"
|
|
@@ -50,7 +50,13 @@ def parse_leaf(raw_leaf: str) -> Leaf:
|
|
|
50
50
|
f"Invalid leaf: {raw_leaf} (must start with a reference)"
|
|
51
51
|
)
|
|
52
52
|
|
|
53
|
-
|
|
53
|
+
# remove the $ prefix
|
|
54
|
+
_reference = (
|
|
55
|
+
reference[len(VARIABLE_PREFIX) :]
|
|
56
|
+
if reference.startswith(VARIABLE_PREFIX)
|
|
57
|
+
else reference
|
|
58
|
+
)
|
|
59
|
+
leaf: Leaf = ReferenceLeaf(_reference)
|
|
54
60
|
for raw_part in raw_parts:
|
|
55
61
|
if raw_part.isdigit():
|
|
56
62
|
leaf = IndexLeaf(leaf, int(raw_part))
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: fal
|
|
3
|
-
Version: 1.5.
|
|
3
|
+
Version: 1.5.10
|
|
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
|
|
7
7
|
Description-Content-Type: text/markdown
|
|
8
|
-
Requires-Dist: isolate[build]<
|
|
9
|
-
Requires-Dist: isolate-proto
|
|
8
|
+
Requires-Dist: isolate[build]<0.15.0,>=0.14.2
|
|
9
|
+
Requires-Dist: isolate-proto<0.7.0,>=0.6.0
|
|
10
10
|
Requires-Dist: grpcio==1.64.0
|
|
11
11
|
Requires-Dist: dill==0.3.7
|
|
12
12
|
Requires-Dist: cloudpickle==3.0.0
|
|
@@ -1,11 +1,11 @@
|
|
|
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=P7goVWbGPchomrbByBEMBRXJIJ_T8Ru_zmlneedpaSQ,413
|
|
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=xTtPvDqaEHsq2lFsMwRZiHb4hzjVY3y6lV-xbzkSetI,43375
|
|
7
|
-
fal/app.py,sha256=
|
|
8
|
-
fal/apps.py,sha256=
|
|
7
|
+
fal/app.py,sha256=NOpg0oJm1Od4lawUpN1_TO6CTV4pndnyDCWWaSEyfTE,21543
|
|
8
|
+
fal/apps.py,sha256=PjxIdwCL9tYxohajhdFo0MwtZGwVTJODtlerOrmSA6o,7251
|
|
9
9
|
fal/container.py,sha256=V7riyyq8AZGwEX9QaqRQDZyDN_bUKeRKV1OOZArXjL0,622
|
|
10
10
|
fal/files.py,sha256=QgfYfMKmNobMPufrAP_ga1FKcIAlSbw18Iar1-0qepo,2650
|
|
11
11
|
fal/flags.py,sha256=oWN_eidSUOcE9wdPK_77si3A1fpgOC0UEERPsvNLIMc,842
|
|
@@ -14,7 +14,7 @@ fal/rest_client.py,sha256=kGBGmuyHfX1lR910EoKCYPjsyU8MdXawT_cW2q8Sajc,568
|
|
|
14
14
|
fal/sdk.py,sha256=HAkOv0q53h4LPBdvjJHu_FST0Iq-SYzNKhx1qeKJZfs,22403
|
|
15
15
|
fal/sync.py,sha256=ZuIJA2-hTPNANG9B_NNJZUsO68EIdTH0dc9MzeVE2VU,4340
|
|
16
16
|
fal/utils.py,sha256=9q_QrQBlQN3nZYA1kEGRfhJWi4RjnO4H1uQswfaei9w,2146
|
|
17
|
-
fal/workflows.py,sha256=
|
|
17
|
+
fal/workflows.py,sha256=Zl4f6Bs085hY40zmqScxDUyCu7zXkukDbW02iYOLTTI,14805
|
|
18
18
|
fal/auth/__init__.py,sha256=r8iA2-5ih7-Fik3gEC4HEWNFbGoxpYnXpZu1icPIoS0,3561
|
|
19
19
|
fal/auth/auth0.py,sha256=rSG1mgH-QGyKfzd7XyAaj1AYsWt-ho8Y_LZ-FUVWzh4,5421
|
|
20
20
|
fal/auth/local.py,sha256=sndkM6vKpeVny6NHTacVlTbiIFqaksOmw0Viqs_RN1U,1790
|
|
@@ -127,8 +127,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
|
|
|
127
127
|
openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
|
|
128
128
|
openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
|
|
129
129
|
openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
|
|
130
|
-
fal-1.5.
|
|
131
|
-
fal-1.5.
|
|
132
|
-
fal-1.5.
|
|
133
|
-
fal-1.5.
|
|
134
|
-
fal-1.5.
|
|
130
|
+
fal-1.5.10.dist-info/METADATA,sha256=lvpI1VqkawW4qvFqGy6M1ZE0UDp1JgtQoQYY1c5AsYw,3997
|
|
131
|
+
fal-1.5.10.dist-info/WHEEL,sha256=P9jw-gEje8ByB7_hXoICnHtVCrEwMQh-630tKvQWehc,91
|
|
132
|
+
fal-1.5.10.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
|
|
133
|
+
fal-1.5.10.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
|
|
134
|
+
fal-1.5.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|