ai-pipeline-core 0.4.0__py3-none-any.whl → 0.4.2__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/base.py +2 -2
- ai_pipeline_core/deployment/deploy.py +19 -5
- ai_pipeline_core/pipeline/options.py +1 -1
- {ai_pipeline_core-0.4.0.dist-info → ai_pipeline_core-0.4.2.dist-info}/METADATA +1 -1
- {ai_pipeline_core-0.4.0.dist-info → ai_pipeline_core-0.4.2.dist-info}/RECORD +8 -8
- {ai_pipeline_core-0.4.0.dist-info → ai_pipeline_core-0.4.2.dist-info}/WHEEL +0 -0
- {ai_pipeline_core-0.4.0.dist-info → ai_pipeline_core-0.4.2.dist-info}/licenses/LICENSE +0 -0
ai_pipeline_core/__init__.py
CHANGED
|
@@ -132,7 +132,7 @@ class FlowCallable(Protocol):
|
|
|
132
132
|
output_document_types: list[type[Document]]
|
|
133
133
|
estimated_minutes: int
|
|
134
134
|
|
|
135
|
-
def __call__(self, project_name: str, documents: list[Document], flow_options: FlowOptions) -> Any: # type: ignore[type-arg]
|
|
135
|
+
def __call__(self, project_name: str, documents: list[Document], flow_options: FlowOptions | dict[str, Any]) -> Any: # type: ignore[type-arg]
|
|
136
136
|
"""Execute the flow with standard pipeline signature."""
|
|
137
137
|
...
|
|
138
138
|
|
|
@@ -519,7 +519,7 @@ class PipelineDeployment(Generic[TOptions, TResult]):
|
|
|
519
519
|
current_docs = input_docs
|
|
520
520
|
|
|
521
521
|
try:
|
|
522
|
-
await active_flow(project_name, current_docs, options)
|
|
522
|
+
await active_flow(project_name, current_docs, options.model_dump())
|
|
523
523
|
except Exception as e:
|
|
524
524
|
# Upload partial results on failure
|
|
525
525
|
if context.output_documents_urls and store:
|
|
@@ -348,11 +348,12 @@ class Deployer:
|
|
|
348
348
|
|
|
349
349
|
self._success(f"Agent '{agent_name}' uploaded ({len(build_info['files'])} files)")
|
|
350
350
|
|
|
351
|
-
async def _upload_package(self, tarball: Path):
|
|
352
|
-
"""Upload package tarball to Google Cloud Storage.
|
|
351
|
+
async def _upload_package(self, tarball: Path, vendor_wheels: list[Path] | None = None):
|
|
352
|
+
"""Upload package tarball and vendor wheels to Google Cloud Storage.
|
|
353
353
|
|
|
354
354
|
Args:
|
|
355
355
|
tarball: Path to the tarball to upload
|
|
356
|
+
vendor_wheels: Optional private dependency wheels to upload alongside
|
|
356
357
|
"""
|
|
357
358
|
flow_folder = self.config["folder"]
|
|
358
359
|
bucket = self._create_gcs_bucket(flow_folder)
|
|
@@ -365,6 +366,10 @@ class Deployer:
|
|
|
365
366
|
|
|
366
367
|
self._success(f"Package uploaded to {flow_folder}/{tarball.name}")
|
|
367
368
|
|
|
369
|
+
for wheel in vendor_wheels or []:
|
|
370
|
+
await bucket.write_path(wheel.name, wheel.read_bytes())
|
|
371
|
+
self._success(f"Vendor wheel uploaded: {wheel.name}")
|
|
372
|
+
|
|
368
373
|
async def _deploy_via_api(self, agent_builds: dict[str, dict[str, Any]] | None = None):
|
|
369
374
|
"""Create or update Prefect deployment using RunnerDeployment pattern.
|
|
370
375
|
|
|
@@ -420,7 +425,8 @@ class Deployer:
|
|
|
420
425
|
"stream_output": True,
|
|
421
426
|
"directory": "{{ pull_code.directory }}",
|
|
422
427
|
# Use uv for fast installation (worker has it installed)
|
|
423
|
-
|
|
428
|
+
# --find-links . resolves private dependencies from co-uploaded wheels
|
|
429
|
+
"script": f"uv pip install --system --find-links . ./{self.config['tarball']}",
|
|
424
430
|
}
|
|
425
431
|
},
|
|
426
432
|
]
|
|
@@ -488,8 +494,16 @@ class Deployer:
|
|
|
488
494
|
# Phase 2: Build agent bundles (if configured)
|
|
489
495
|
agent_builds = self._build_agents()
|
|
490
496
|
|
|
491
|
-
# Phase 3: Upload flow package
|
|
492
|
-
|
|
497
|
+
# Phase 3: Upload flow package (include private dependency wheels from agent builds)
|
|
498
|
+
vendor_wheels: list[Path] = []
|
|
499
|
+
if agent_builds:
|
|
500
|
+
seen: set[str] = set()
|
|
501
|
+
for build_info in agent_builds.values():
|
|
502
|
+
for filename, filepath in build_info["files"].items():
|
|
503
|
+
if filename.endswith(".whl") and filename not in seen and "cli_agents" in filename:
|
|
504
|
+
vendor_wheels.append(filepath)
|
|
505
|
+
seen.add(filename)
|
|
506
|
+
await self._upload_package(tarball, vendor_wheels)
|
|
493
507
|
|
|
494
508
|
# Phase 4: Upload agent bundles
|
|
495
509
|
await self._upload_agents(agent_builds)
|
|
@@ -10,7 +10,7 @@ class FlowOptions(BaseSettings):
|
|
|
10
10
|
for environment variable overrides. Immutable after creation.
|
|
11
11
|
"""
|
|
12
12
|
|
|
13
|
-
model_config = SettingsConfigDict(frozen=True, extra="
|
|
13
|
+
model_config = SettingsConfigDict(frozen=True, extra="allow")
|
|
14
14
|
|
|
15
15
|
|
|
16
16
|
__all__ = ["FlowOptions"]
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: ai-pipeline-core
|
|
3
|
-
Version: 0.4.
|
|
3
|
+
Version: 0.4.2
|
|
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,13 +1,13 @@
|
|
|
1
|
-
ai_pipeline_core/__init__.py,sha256=
|
|
1
|
+
ai_pipeline_core/__init__.py,sha256=REZQInD3-LSShbonlXFpbe-IfjEtr90kkEx3JFxgfMA,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
|
|
5
5
|
ai_pipeline_core/settings.py,sha256=BUz8JEFfJQrdE4rNOhQWwxnTrfekLjWkoy-3wDZQ7PY,5142
|
|
6
6
|
ai_pipeline_core/testing.py,sha256=jIRrLxNvTwdamucfJoHET2qMeRhhMZV9uEJXO5vAfis,279
|
|
7
7
|
ai_pipeline_core/deployment/__init__.py,sha256=wTkVK6gcEQvqBajFMTAuodRONpN25yHbR1jtcumf0WQ,900
|
|
8
|
-
ai_pipeline_core/deployment/base.py,sha256=
|
|
8
|
+
ai_pipeline_core/deployment/base.py,sha256=ZdXrO2tt2H5bTRkxV0EA1_v6mvuCxfYMUlmi4bpsq8c,34780
|
|
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=TCF4fH5f-K1ADODZHEyf-x7PJzDbv4qtWxlpoCe_mTs,22909
|
|
11
11
|
ai_pipeline_core/deployment/helpers.py,sha256=yVtGFUs4AFXkpLkiQ_ale0nXXt5btfWSb5PAbikQHNs,3312
|
|
12
12
|
ai_pipeline_core/deployment/progress.py,sha256=5tVD9nW0N-b8Z2BxazcWCWHFpLu6pJ-eqPmRyj68X6Y,3591
|
|
13
13
|
ai_pipeline_core/deployment/remote.py,sha256=tOexisKEeeBoHLGYZWqcjr2H-nqqYc6kvoDL72AW78w,4661
|
|
@@ -69,8 +69,8 @@ ai_pipeline_core/observability/_tracking/_service.py,sha256=diK-0qJg4HU-BHgpN1NT
|
|
|
69
69
|
ai_pipeline_core/observability/_tracking/_writer.py,sha256=xZjwYyIxDzzzPxqkKjYAYOyNP4uvKXZ-r_u-APSV_x8,9246
|
|
70
70
|
ai_pipeline_core/pipeline/__init__.py,sha256=uMv1jwSyq8Ym8Hbn5097twBJLdwN1iMeqnVM4EWyrhA,282
|
|
71
71
|
ai_pipeline_core/pipeline/decorators.py,sha256=CDJAeOjGLt5Ewc0Jc9zEuwLZwKyutOv89LSRS9dcXmI,37456
|
|
72
|
-
ai_pipeline_core/pipeline/options.py,sha256=
|
|
73
|
-
ai_pipeline_core-0.4.
|
|
74
|
-
ai_pipeline_core-0.4.
|
|
75
|
-
ai_pipeline_core-0.4.
|
|
76
|
-
ai_pipeline_core-0.4.
|
|
72
|
+
ai_pipeline_core/pipeline/options.py,sha256=KF4FcT085-IwX8r649v0a9ua5xnApM0qG2wJHWbq39A,438
|
|
73
|
+
ai_pipeline_core-0.4.2.dist-info/METADATA,sha256=9oibNB9_K3sQ2K3rwPeV77tZ-t4kt0Kxrnhlhp6ySjY,29947
|
|
74
|
+
ai_pipeline_core-0.4.2.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
75
|
+
ai_pipeline_core-0.4.2.dist-info/licenses/LICENSE,sha256=kKj8mfbdWwkyG3U6n7ztB3bAZlEwShTkAsvaY657i3I,1074
|
|
76
|
+
ai_pipeline_core-0.4.2.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|