fal 1.45.1__py3-none-any.whl → 1.46.0__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/__init__.py +1 -0
- fal/api/apps.py +69 -0
- fal/api/client.py +116 -0
- fal/api/deploy.py +211 -0
- fal/api/runners.py +16 -0
- fal/app.py +9 -0
- fal/cli/apps.py +51 -60
- fal/cli/deploy.py +29 -181
- fal/cli/queue.py +2 -2
- fal/cli/runners.py +45 -47
- fal/distributed/__init__.py +3 -0
- fal/distributed/utils.py +420 -0
- fal/distributed/worker.py +776 -0
- fal/file_sync.py +13 -19
- {fal-1.45.1.dist-info → fal-1.46.0.dist-info}/METADATA +1 -1
- {fal-1.45.1.dist-info → fal-1.46.0.dist-info}/RECORD +21 -13
- /fal/{api.py → api/api.py} +0 -0
- {fal-1.45.1.dist-info → fal-1.46.0.dist-info}/WHEEL +0 -0
- {fal-1.45.1.dist-info → fal-1.46.0.dist-info}/entry_points.txt +0 -0
- {fal-1.45.1.dist-info → fal-1.46.0.dist-info}/top_level.txt +0 -0
fal/file_sync.py
CHANGED
|
@@ -266,9 +266,6 @@ class FileSync:
|
|
|
266
266
|
files_context_dir: Optional[str] = None,
|
|
267
267
|
) -> Tuple[List[FileMetadata], List[AppFileUploadException]]:
|
|
268
268
|
files = self.collect_files(paths, files_context_dir)
|
|
269
|
-
existing_hashes: List[FileMetadata] = []
|
|
270
|
-
uploaded_files: List[Tuple[FileMetadata, str]] = []
|
|
271
|
-
errors: List[AppFileUploadException] = []
|
|
272
269
|
|
|
273
270
|
# Filter out ignored files
|
|
274
271
|
if files_ignore:
|
|
@@ -302,24 +299,23 @@ class FileSync:
|
|
|
302
299
|
if rel_path not in seen_relative_paths:
|
|
303
300
|
seen_relative_paths.add(rel_path)
|
|
304
301
|
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
files_to_check.append(metadata)
|
|
302
|
+
if not unique_files:
|
|
303
|
+
return [], []
|
|
308
304
|
|
|
309
|
-
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
hashes_to_check = [metadata.hash for metadata in files_to_check]
|
|
313
|
-
missing_hashes = self.check_hashes_on_server(hashes_to_check)
|
|
305
|
+
hashes_to_check = list({metadata.hash for metadata in unique_files})
|
|
306
|
+
missing_hashes = set(self.check_hashes_on_server(hashes_to_check))
|
|
314
307
|
|
|
315
308
|
# Categorize based on server response
|
|
316
309
|
files_to_upload: List[FileMetadata] = []
|
|
317
|
-
for file in
|
|
318
|
-
if file.hash
|
|
319
|
-
|
|
320
|
-
|
|
310
|
+
for file in unique_files:
|
|
311
|
+
if file.hash in missing_hashes:
|
|
312
|
+
# No longer missing as we are uploading it
|
|
313
|
+
# Removing it avoids duplicate uploads
|
|
314
|
+
missing_hashes.remove(file.hash)
|
|
321
315
|
files_to_upload.append(file)
|
|
322
316
|
|
|
317
|
+
uploaded_files: List[Tuple[FileMetadata, str]] = []
|
|
318
|
+
errors: List[AppFileUploadException] = []
|
|
323
319
|
# Upload missing files in parallel with bounded concurrency
|
|
324
320
|
if files_to_upload:
|
|
325
321
|
# Embed it here to be able to pass it to the executor
|
|
@@ -348,13 +344,11 @@ class FileSync:
|
|
|
348
344
|
else:
|
|
349
345
|
uploaded_files.append((metadata, future.result()))
|
|
350
346
|
|
|
351
|
-
all_files = existing_hashes + [file for file, _ in uploaded_files]
|
|
352
|
-
|
|
353
347
|
# TODO: hide behind DEBUG flag?
|
|
354
348
|
console.print("File Structure:")
|
|
355
|
-
print_path_tree([m.relative_path for m in
|
|
349
|
+
print_path_tree([m.relative_path for m in unique_files])
|
|
356
350
|
|
|
357
|
-
return
|
|
351
|
+
return unique_files, errors
|
|
358
352
|
|
|
359
353
|
def close(self):
|
|
360
354
|
"""Close HTTP client."""
|
|
@@ -1,14 +1,13 @@
|
|
|
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=HSh8n5t3dT12FiqCeiBwPGGXi_9ERts2UyWRnVzpW5U,706
|
|
4
4
|
fal/_serialization.py,sha256=npXNsFJ5G7jzBeBIyVMH01Ww34mGY4XWhHpRbSrTtnQ,7598
|
|
5
5
|
fal/_version.py,sha256=1BbTFnucNC_6ldKJ_ZoC722_UkW4S9aDBSW9L0fkKAw,2315
|
|
6
|
-
fal/
|
|
7
|
-
fal/app.py,sha256=MsHx1UeUbV-FLqAifS6XkUfa0jYYl00UK51yHuqY9fE,27739
|
|
6
|
+
fal/app.py,sha256=izlqdqfUtNxKW6oJerJYbVaUIZwxlO-DTtqFrcTleyI,28039
|
|
8
7
|
fal/apps.py,sha256=pzCd2mrKl5J_4oVc40_pggvPtFahXBCdrZXWpnaEJVs,12130
|
|
9
8
|
fal/config.py,sha256=1HRaOJFOAjB7fbQoEPCSH85gMvEEMIMPeupVWgrHVgU,3572
|
|
10
9
|
fal/container.py,sha256=FTsa5hOW4ars-yV1lUoc0BNeIIvAZcpw7Ftyt3A4m_w,2000
|
|
11
|
-
fal/file_sync.py,sha256=
|
|
10
|
+
fal/file_sync.py,sha256=fZNZARPaqGH3sLaBXDsUPTnvi26d0r9NnHGysvPc6GE,11977
|
|
12
11
|
fal/files.py,sha256=9hA7mC3Xm794I-P2_YMf0QRebrnBIDz_kUnUd4O3BiQ,7904
|
|
13
12
|
fal/flags.py,sha256=QonyDM7R2GqfAB1bJr46oriu-fHJCkpUwXuSdanePWg,987
|
|
14
13
|
fal/project.py,sha256=QgfYfMKmNobMPufrAP_ga1FKcIAlSbw18Iar1-0qepo,2650
|
|
@@ -18,32 +17,41 @@ fal/sdk.py,sha256=Nk3dbVyYXQi2XtzBd5Bdex-6TK8iYMS6vPDqJvlhxyk,29431
|
|
|
18
17
|
fal/sync.py,sha256=ZuIJA2-hTPNANG9B_NNJZUsO68EIdTH0dc9MzeVE2VU,4340
|
|
19
18
|
fal/utils.py,sha256=sYjJLl68AG21BOmmE9H2aW161DMvCh3qIduH-CyZhk4,2179
|
|
20
19
|
fal/workflows.py,sha256=Zl4f6Bs085hY40zmqScxDUyCu7zXkukDbW02iYOLTTI,14805
|
|
20
|
+
fal/api/__init__.py,sha256=N8FaQCgKU05WTvxYBB8PYzkDJ34p3w8AsloRM2-q4SA,33
|
|
21
|
+
fal/api/api.py,sha256=tW3B4AbprSnpKDtGb_mjUwUwImd9VaaxUpMtS0f45ks,51860
|
|
22
|
+
fal/api/apps.py,sha256=YSy2RUvFGBmXp8OrtWf49FMLvzwS79e0LD426naaMx0,2219
|
|
23
|
+
fal/api/client.py,sha256=TYTaCz0mh5fnLcV37JUqDhWFYU6rqaqbfVli_jpaq_g,3665
|
|
24
|
+
fal/api/deploy.py,sha256=87ZFOFB8sGPaWNkfyU17hL3RapUWMUMPiOqxrwzcyi4,6435
|
|
25
|
+
fal/api/runners.py,sha256=4P1llGDhcl0xM5UayK8XvxGMU-o07gzZaAchkUUKREY,484
|
|
21
26
|
fal/auth/__init__.py,sha256=mtyQou8DGHC-COjW9WbtRyyzjyt7fMlhVmsB4U-CBh4,6509
|
|
22
27
|
fal/auth/auth0.py,sha256=g5OgEKe4rsbkLQp6l7EauOAVL6WsmKjuA1wmzmyvvhc,5354
|
|
23
28
|
fal/auth/local.py,sha256=sndkM6vKpeVny6NHTacVlTbiIFqaksOmw0Viqs_RN1U,1790
|
|
24
29
|
fal/cli/__init__.py,sha256=padK4o0BFqq61kxAA1qQ0jYr2SuhA2mf90B3AaRkmJA,37
|
|
25
30
|
fal/cli/_utils.py,sha256=XwYoJr8SahaKB9OkGkw178FBpSeFAB-GqDXUQgGoFRE,2196
|
|
26
31
|
fal/cli/api.py,sha256=ZuDE_PIC-czzneTAWMwvC7P7WnwIyluNZSuJqzCFhqI,2640
|
|
27
|
-
fal/cli/apps.py,sha256=
|
|
32
|
+
fal/cli/apps.py,sha256=fKL5tdi2BSmnv0b1YMRASCinZ1-aH4j10ioaP0l8iMA,12529
|
|
28
33
|
fal/cli/auth.py,sha256=ZLjxuF4LobETJ2CLGMj_QurE0PiJxzKdFJZkux8uLHM,5977
|
|
29
34
|
fal/cli/cli_nested_json.py,sha256=veSZU8_bYV3Iu1PAoxt-4BMBraNIqgH5nughbs2UKvE,13539
|
|
30
35
|
fal/cli/create.py,sha256=a8WDq-nJLFTeoIXqpb5cr7GR7YR9ZZrQCawNm34KXXE,627
|
|
31
36
|
fal/cli/debug.py,sha256=mTCjSpEZaNKcX225VZtry-BspFKSHURUuxUFuX6x5Cc,1488
|
|
32
|
-
fal/cli/deploy.py,sha256=
|
|
37
|
+
fal/cli/deploy.py,sha256=wTpMn1J9X8fytfeLKvJjwLN8sqcPKzWG0loin8ymqZ4,3890
|
|
33
38
|
fal/cli/doctor.py,sha256=8SZrYG9Ku0F6LLUHtFdKopdIgZfFkw5E3Mwrxa9KOSk,1613
|
|
34
39
|
fal/cli/files.py,sha256=-j0q4g53A7CWSczGLdfeUCTSd4zXoV3pfZFdman7JOw,3450
|
|
35
40
|
fal/cli/keys.py,sha256=iQVMr3WT8CUqSQT3qeCCiy6rRwoux9F-UEaC4bCwMWo,3754
|
|
36
41
|
fal/cli/main.py,sha256=LDy3gze9TRsvGa4uSNc8NMFmWMLpsyoC-msteICNiso,3371
|
|
37
42
|
fal/cli/parser.py,sha256=siSY1kxqczZIs3l_jLwug_BpVzY_ZqHpewON3am83Ow,6658
|
|
38
43
|
fal/cli/profile.py,sha256=PAY_ffifCT71VJ8VxfDVaXPT0U1oN8drvWZDFRXwvek,6678
|
|
39
|
-
fal/cli/queue.py,sha256=
|
|
44
|
+
fal/cli/queue.py,sha256=YhcD0URGeqaJXqTl1hPEV9-UqdWsQ-4beG5xE9AGLJI,2727
|
|
40
45
|
fal/cli/run.py,sha256=xFcNxBWD60PTbW51R4qqLifUL7dqgYYvw38Nz-18ZWc,1365
|
|
41
|
-
fal/cli/runners.py,sha256=
|
|
46
|
+
fal/cli/runners.py,sha256=29SQqBQQidABiDYaW-SA68HjxVw4tbxfXwimevX_xkw,17282
|
|
42
47
|
fal/cli/secrets.py,sha256=HfIeO2IZpCEiBC6Cs5Kpi3zckfDnc7GsLwLdgj3NnPU,3085
|
|
43
48
|
fal/cli/teams.py,sha256=_JcNcf659ZoLBFOxKnVP5A6Pyk1jY1vh4_xzMweYIDo,1285
|
|
44
49
|
fal/console/__init__.py,sha256=lGPUuTqIM9IKTa1cyyA-MA2iZJKVHp2YydsITZVlb6g,148
|
|
45
50
|
fal/console/icons.py,sha256=De9MfFaSkO2Lqfne13n3PrYfTXJVIzYZVqYn5BWsdrA,108
|
|
46
51
|
fal/console/ux.py,sha256=KMQs3UHQvVHDxDQQqlot-WskVKoMQXOE3jiVkkfmIMY,356
|
|
52
|
+
fal/distributed/__init__.py,sha256=jnLKLzTnF0GurjJnt7xD1-wB-oKWALZcZ1ZK0c6WI4g,134
|
|
53
|
+
fal/distributed/utils.py,sha256=8Wl1WytTtZQw4Ja-95D2vM40P26eYZNZe-fI2KVX7kU,12648
|
|
54
|
+
fal/distributed/worker.py,sha256=TReJBU1P1iXarKXVI8NvlXt7stMWxdvWIozJ2lZTF5w,26704
|
|
47
55
|
fal/exceptions/__init__.py,sha256=4hq-sy3dMZs6YxvbO_p6R-bK4Tzf7ubvA8AyUR0GVPo,349
|
|
48
56
|
fal/exceptions/_base.py,sha256=PLSOHQs7lftDaRYDHKz9xkB6orQvynmUTi4DrdPnYMs,1797
|
|
49
57
|
fal/exceptions/_cuda.py,sha256=L3qvDNaPTthp95IFSBI6pMt3YbRfn1H0inQkj_7NKF8,1719
|
|
@@ -144,8 +152,8 @@ openapi_fal_rest/models/workflow_node_type.py,sha256=-FzyeY2bxcNmizKbJI8joG7byRi
|
|
|
144
152
|
openapi_fal_rest/models/workflow_schema.py,sha256=4K5gsv9u9pxx2ItkffoyHeNjBBYf6ur5bN4m_zePZNY,2019
|
|
145
153
|
openapi_fal_rest/models/workflow_schema_input.py,sha256=2OkOXWHTNsCXHWS6EGDFzcJKkW5FIap-2gfO233EvZQ,1191
|
|
146
154
|
openapi_fal_rest/models/workflow_schema_output.py,sha256=EblwSPAGfWfYVWw_WSSaBzQVju296is9o28rMBAd0mc,1196
|
|
147
|
-
fal-1.
|
|
148
|
-
fal-1.
|
|
149
|
-
fal-1.
|
|
150
|
-
fal-1.
|
|
151
|
-
fal-1.
|
|
155
|
+
fal-1.46.0.dist-info/METADATA,sha256=bOq6HL6Lzc-yql9GTNRaTHcqlwMpuNyULT90kR4Rzo8,4185
|
|
156
|
+
fal-1.46.0.dist-info/WHEEL,sha256=_zCd3N1l69ArxyTb8rzEoP9TpbYXkqRFSNOD5OuxnTs,91
|
|
157
|
+
fal-1.46.0.dist-info/entry_points.txt,sha256=32zwTUC1U1E7nSTIGCoANQOQ3I7-qHG5wI6gsVz5pNU,37
|
|
158
|
+
fal-1.46.0.dist-info/top_level.txt,sha256=r257X1L57oJL8_lM0tRrfGuXFwm66i1huwQygbpLmHw,21
|
|
159
|
+
fal-1.46.0.dist-info/RECORD,,
|
/fal/{api.py → api/api.py}
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|