ai-pipeline-core 0.4.4__py3-none-any.whl → 0.4.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.
- ai_pipeline_core/__init__.py +1 -1
- ai_pipeline_core/deployment/deploy.py +43 -8
- ai_pipeline_core/deployment/remote.py +1 -1
- {ai_pipeline_core-0.4.4.dist-info → ai_pipeline_core-0.4.5.dist-info}/METADATA +1 -1
- {ai_pipeline_core-0.4.4.dist-info → ai_pipeline_core-0.4.5.dist-info}/RECORD +7 -7
- {ai_pipeline_core-0.4.4.dist-info → ai_pipeline_core-0.4.5.dist-info}/WHEEL +0 -0
- {ai_pipeline_core-0.4.4.dist-info → ai_pipeline_core-0.4.5.dist-info}/licenses/LICENSE +0 -0
ai_pipeline_core/__init__.py
CHANGED
|
@@ -312,6 +312,28 @@ class Deployer:
|
|
|
312
312
|
|
|
313
313
|
return builds
|
|
314
314
|
|
|
315
|
+
def _build_vendor_packages(self) -> list[Path]:
|
|
316
|
+
"""Build vendor wheels from [tool.deploy].vendor_packages paths.
|
|
317
|
+
|
|
318
|
+
Returns:
|
|
319
|
+
List of built wheel paths, deduplicated by filename.
|
|
320
|
+
"""
|
|
321
|
+
vendor_paths: list[str] = self._pyproject_data.get("tool", {}).get("deploy", {}).get("vendor_packages", [])
|
|
322
|
+
if not vendor_paths:
|
|
323
|
+
return []
|
|
324
|
+
|
|
325
|
+
self._info(f"Building {len(vendor_paths)} vendor package(s)")
|
|
326
|
+
wheels: list[Path] = []
|
|
327
|
+
seen: set[str] = set()
|
|
328
|
+
for vendor_path_str in vendor_paths:
|
|
329
|
+
vendor_dir = Path(vendor_path_str).resolve()
|
|
330
|
+
wheel = self._build_wheel_from_source(vendor_dir)
|
|
331
|
+
if wheel.name not in seen:
|
|
332
|
+
wheels.append(wheel)
|
|
333
|
+
seen.add(wheel.name)
|
|
334
|
+
self._success(f"Built vendor wheel: {wheel.name}")
|
|
335
|
+
return wheels
|
|
336
|
+
|
|
315
337
|
def _create_gcs_bucket(self, bucket_folder: str) -> Any:
|
|
316
338
|
"""Create a GcsBucket instance for uploading files.
|
|
317
339
|
|
|
@@ -457,6 +479,14 @@ class Deployer:
|
|
|
457
479
|
paused=False,
|
|
458
480
|
)
|
|
459
481
|
|
|
482
|
+
# Populate parameter schema from flow function signature
|
|
483
|
+
deployment._set_defaults_from_flow(flow) # pyright: ignore[reportPossiblyUnboundVariable]
|
|
484
|
+
|
|
485
|
+
# Inject result type schema so consumers can discover the response shape
|
|
486
|
+
return_type = getattr(flow.fn, "__annotations__", {}).get("return") # pyright: ignore[reportPossiblyUnboundVariable]
|
|
487
|
+
if return_type is not None and hasattr(return_type, "model_json_schema"):
|
|
488
|
+
deployment._parameter_openapi_schema.definitions["_ResultSchema"] = return_type.model_json_schema()
|
|
489
|
+
|
|
460
490
|
# Verify work pool exists before deploying
|
|
461
491
|
async with get_client() as client:
|
|
462
492
|
try:
|
|
@@ -494,21 +524,26 @@ class Deployer:
|
|
|
494
524
|
# Phase 2: Build agent bundles (if configured)
|
|
495
525
|
agent_builds = self._build_agents()
|
|
496
526
|
|
|
497
|
-
# Phase 3:
|
|
498
|
-
vendor_wheels
|
|
527
|
+
# Phase 3: Build vendor packages from [tool.deploy].vendor_packages
|
|
528
|
+
vendor_wheels = self._build_vendor_packages()
|
|
529
|
+
|
|
530
|
+
# Also include cli_agents wheels from agent builds
|
|
499
531
|
if agent_builds:
|
|
500
|
-
|
|
532
|
+
seen_agent: set[str] = set()
|
|
501
533
|
for build_info in agent_builds.values():
|
|
502
534
|
for filename, filepath in build_info["files"].items():
|
|
503
|
-
if filename.endswith(".whl") and filename not in
|
|
504
|
-
vendor_wheels
|
|
505
|
-
|
|
535
|
+
if filename.endswith(".whl") and filename not in seen_agent and "cli_agents" in filename:
|
|
536
|
+
if filename not in {w.name for w in vendor_wheels}:
|
|
537
|
+
vendor_wheels.append(filepath)
|
|
538
|
+
seen_agent.add(filename)
|
|
539
|
+
|
|
540
|
+
# Phase 4: Upload flow package + vendor wheels
|
|
506
541
|
await self._upload_package(tarball, vendor_wheels)
|
|
507
542
|
|
|
508
|
-
# Phase
|
|
543
|
+
# Phase 5: Upload agent bundles
|
|
509
544
|
await self._upload_agents(agent_builds)
|
|
510
545
|
|
|
511
|
-
# Phase
|
|
546
|
+
# Phase 6: Create/update Prefect deployment
|
|
512
547
|
await self._deploy_via_api(agent_builds)
|
|
513
548
|
|
|
514
549
|
print()
|
|
@@ -93,7 +93,7 @@ def remote_deployment(
|
|
|
93
93
|
else:
|
|
94
94
|
parameters[pname] = value
|
|
95
95
|
|
|
96
|
-
full_name = f"{deployment_class.name}/{deployment_name or deployment_class.name}"
|
|
96
|
+
full_name = f"{deployment_class.name}/{deployment_name or deployment_class.name.replace('-', '_')}"
|
|
97
97
|
|
|
98
98
|
result = await run_remote_deployment(full_name, parameters)
|
|
99
99
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-pipeline-core
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.5
|
|
4
4
|
Summary: Core utilities for AI-powered processing pipelines using prefect
|
|
5
5
|
Project-URL: Homepage, https://github.com/bbarwik/ai-pipeline-core
|
|
6
6
|
Project-URL: Repository, https://github.com/bbarwik/ai-pipeline-core
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
ai_pipeline_core/__init__.py,sha256=
|
|
1
|
+
ai_pipeline_core/__init__.py,sha256=ydSl96FjnoGhcGRC_Pnr1n7R0ub3vZWnKxyLWILJ54o,3270
|
|
2
2
|
ai_pipeline_core/exceptions.py,sha256=csAl7vq6xjSFBF8-UM9WZODCbhsOdOG5zH6IbA8iteM,1280
|
|
3
3
|
ai_pipeline_core/prompt_manager.py,sha256=3wFkL5rrjtUT1cLInkgyhS8hKnO4MeD1cdXAEuLhgoE,9459
|
|
4
4
|
ai_pipeline_core/py.typed,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
@@ -7,10 +7,10 @@ ai_pipeline_core/testing.py,sha256=jIRrLxNvTwdamucfJoHET2qMeRhhMZV9uEJXO5vAfis,2
|
|
|
7
7
|
ai_pipeline_core/deployment/__init__.py,sha256=wTkVK6gcEQvqBajFMTAuodRONpN25yHbR1jtcumf0WQ,900
|
|
8
8
|
ai_pipeline_core/deployment/base.py,sha256=bGSnDdrw6cLM_TItAiwptnwApbw5wkoIGY9pnwDvOTQ,37485
|
|
9
9
|
ai_pipeline_core/deployment/contract.py,sha256=a1qbHhneTGB27oSOUy79CUIhOIzOoq37M63XoIMzA4Y,1952
|
|
10
|
-
ai_pipeline_core/deployment/deploy.py,sha256=
|
|
10
|
+
ai_pipeline_core/deployment/deploy.py,sha256=3Pojw_HonW46RbjWf6AGNtv-1F46Ed4y71pgQL0teAk,24576
|
|
11
11
|
ai_pipeline_core/deployment/helpers.py,sha256=yVtGFUs4AFXkpLkiQ_ale0nXXt5btfWSb5PAbikQHNs,3312
|
|
12
12
|
ai_pipeline_core/deployment/progress.py,sha256=rO2g8VIh7EpzxzGGAroXEpveWoWZkk66jkDW22BY4j8,4827
|
|
13
|
-
ai_pipeline_core/deployment/remote.py,sha256=
|
|
13
|
+
ai_pipeline_core/deployment/remote.py,sha256=pOle4Dw_U4j9mLbk8NQdmKUys4uaGJyOKMZXhRvnw3E,4679
|
|
14
14
|
ai_pipeline_core/docs_generator/__init__.py,sha256=JbWbk-Lw5GgWrCMRuw8zvKNTZY2jXv7XqoMiBYudvRI,1255
|
|
15
15
|
ai_pipeline_core/docs_generator/__main__.py,sha256=CH4agiM2suFJ63MhTg5m0GuXdc40z-6o4ojR72JQWVA,145
|
|
16
16
|
ai_pipeline_core/docs_generator/cli.py,sha256=8OjdMtzQraPxWN3uPapSNJnKyPLPtnygKL0rF5JL2GY,7172
|
|
@@ -70,7 +70,7 @@ ai_pipeline_core/observability/_tracking/_writer.py,sha256=xZjwYyIxDzzzPxqkKjYAY
|
|
|
70
70
|
ai_pipeline_core/pipeline/__init__.py,sha256=uMv1jwSyq8Ym8Hbn5097twBJLdwN1iMeqnVM4EWyrhA,282
|
|
71
71
|
ai_pipeline_core/pipeline/decorators.py,sha256=CDJAeOjGLt5Ewc0Jc9zEuwLZwKyutOv89LSRS9dcXmI,37456
|
|
72
72
|
ai_pipeline_core/pipeline/options.py,sha256=KF4FcT085-IwX8r649v0a9ua5xnApM0qG2wJHWbq39A,438
|
|
73
|
-
ai_pipeline_core-0.4.
|
|
74
|
-
ai_pipeline_core-0.4.
|
|
75
|
-
ai_pipeline_core-0.4.
|
|
76
|
-
ai_pipeline_core-0.4.
|
|
73
|
+
ai_pipeline_core-0.4.5.dist-info/METADATA,sha256=U-sw_nFzaA55Z_YzxVvvh9Mb8N3L50nU7ME6YkQ9tO4,29947
|
|
74
|
+
ai_pipeline_core-0.4.5.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
75
|
+
ai_pipeline_core-0.4.5.dist-info/licenses/LICENSE,sha256=kKj8mfbdWwkyG3U6n7ztB3bAZlEwShTkAsvaY657i3I,1074
|
|
76
|
+
ai_pipeline_core-0.4.5.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|