buildai-cli 0.3.32__tar.gz → 0.3.34__tar.gz
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.
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/.gitignore +1 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/PKG-INFO +1 -1
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/database.py +24 -5
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/projection.py +20 -15
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/pyproject.toml +1 -1
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/AGENTS.md +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/CLAUDE.md +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/__init__.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/_has_core.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/__init__.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/api_proxy.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/assets_cli.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/auth_lite.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/clips.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/dev.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/embed.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/external.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/inference.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/jobs.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/keys.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/medoid.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/operations.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/partners.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/permissions.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/query.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/query_api.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/reports.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/schema.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/search.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/stats.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/sync/ddl.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/sync/models.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/commands/sync/queries.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/config.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/console.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/context.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/dev_context.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/guard.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/main.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/nl_query/__init__.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/nl_query/dataset_tools.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/ops_init.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/output.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/pagination.py +0 -0
- {buildai_cli-0.3.32 → buildai_cli-0.3.34}/cli/sdk_client.py +0 -0
|
@@ -55,7 +55,12 @@ from cli.commands.sync.queries import (
|
|
|
55
55
|
fetch_triggers,
|
|
56
56
|
)
|
|
57
57
|
from cli.console import console, dim, error, info, success, warning
|
|
58
|
-
from cli.context import
|
|
58
|
+
from cli.context import (
|
|
59
|
+
get_admin_connection,
|
|
60
|
+
get_connection,
|
|
61
|
+
open_admin_database,
|
|
62
|
+
resolve_admin_connection_config,
|
|
63
|
+
)
|
|
59
64
|
from cli.guard import require_write
|
|
60
65
|
|
|
61
66
|
# =============================================================================
|
|
@@ -112,6 +117,13 @@ async def _get_migrations_connection(settings: Settings):
|
|
|
112
117
|
return db
|
|
113
118
|
|
|
114
119
|
|
|
120
|
+
def _status_connection(settings: Settings):
|
|
121
|
+
"""Prefer the canonical admin connection for read-only DB health introspection."""
|
|
122
|
+
if resolve_admin_connection_config(settings) is not None:
|
|
123
|
+
return get_admin_connection(settings)
|
|
124
|
+
return get_connection(settings)
|
|
125
|
+
|
|
126
|
+
|
|
115
127
|
async def _set_owner_role(conn) -> bool:
|
|
116
128
|
"""
|
|
117
129
|
Set role to buildai_owner for DDL operations.
|
|
@@ -446,7 +458,7 @@ def status(ctx: typer.Context) -> None:
|
|
|
446
458
|
)
|
|
447
459
|
|
|
448
460
|
try:
|
|
449
|
-
async with
|
|
461
|
+
async with _status_connection(settings) as conn:
|
|
450
462
|
status_obj.connected = True
|
|
451
463
|
|
|
452
464
|
# Get migration status
|
|
@@ -480,9 +492,16 @@ def status(ctx: typer.Context) -> None:
|
|
|
480
492
|
conn, "core.clips", "deleted_at IS NULL"
|
|
481
493
|
)
|
|
482
494
|
status_obj.frames_count = await _get_table_row_count(conn, "core.frames")
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
495
|
+
try:
|
|
496
|
+
status_obj.embeddings_count = await _get_table_row_count(
|
|
497
|
+
conn, "observations.emb_siglip2_ego100k_frame_default"
|
|
498
|
+
)
|
|
499
|
+
except asyncpg.UndefinedTableError:
|
|
500
|
+
warning(
|
|
501
|
+
"Embedding table observations.emb_siglip2_ego100k_frame_default "
|
|
502
|
+
"is absent; reporting embeddings as 0."
|
|
503
|
+
)
|
|
504
|
+
status_obj.embeddings_count = 0
|
|
486
505
|
|
|
487
506
|
except Exception as e:
|
|
488
507
|
error(f"Connection failed: {e}")
|
|
@@ -138,21 +138,26 @@ async def _status(
|
|
|
138
138
|
console.print(table)
|
|
139
139
|
|
|
140
140
|
if show_jobs:
|
|
141
|
-
#
|
|
141
|
+
# Pull projection manifests with batch-level progress from the
|
|
142
|
+
# canonical manifest/batch plane. The legacy chunks_* counters on
|
|
143
|
+
# processing.manifests were dropped in migration 365; progress
|
|
144
|
+
# now comes from processing.batches aggregated per manifest.
|
|
142
145
|
manifests_query = """
|
|
143
146
|
SELECT
|
|
144
|
-
id,
|
|
145
|
-
status,
|
|
146
|
-
batch_job_name,
|
|
147
|
-
config,
|
|
148
|
-
error_message,
|
|
149
|
-
chunk_count,
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
created_at
|
|
153
|
-
FROM processing.manifests
|
|
154
|
-
|
|
155
|
-
|
|
147
|
+
m.id,
|
|
148
|
+
m.status,
|
|
149
|
+
m.batch_job_name,
|
|
150
|
+
m.config,
|
|
151
|
+
m.error_message,
|
|
152
|
+
m.chunk_count,
|
|
153
|
+
COUNT(*) FILTER (WHERE b.status = 'completed') AS batches_completed,
|
|
154
|
+
COUNT(*) FILTER (WHERE b.status = 'failed') AS batches_failed,
|
|
155
|
+
m.created_at
|
|
156
|
+
FROM processing.manifests m
|
|
157
|
+
LEFT JOIN processing.batches b ON b.manifest_id = m.id
|
|
158
|
+
WHERE m.job_type = 'umap_projection'
|
|
159
|
+
GROUP BY m.id
|
|
160
|
+
ORDER BY m.created_at DESC
|
|
156
161
|
LIMIT 20
|
|
157
162
|
"""
|
|
158
163
|
manifests_rows = await conn.fetch(manifests_query)
|
|
@@ -184,8 +189,8 @@ async def _status(
|
|
|
184
189
|
|
|
185
190
|
space_id = config.get("embedding_space_id", "-")
|
|
186
191
|
chunk_count = manifest["chunk_count"] or 0
|
|
187
|
-
succeeded = manifest["
|
|
188
|
-
failed = manifest["
|
|
192
|
+
succeeded = manifest["batches_completed"] or 0
|
|
193
|
+
failed = manifest["batches_failed"] or 0
|
|
189
194
|
progress = f"{succeeded}/{chunk_count}" if chunk_count else "-"
|
|
190
195
|
if failed > 0:
|
|
191
196
|
progress += f" ({failed} failed)"
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|