buildai-cli 0.3.28__tar.gz → 0.3.30__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.28 → buildai_cli-0.3.30}/.gitignore +7 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/PKG-INFO +1 -1
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/jobs.py +16 -11
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/medoid.py +13 -6
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/query.py +3 -1
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/pyproject.toml +1 -1
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/AGENTS.md +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/CLAUDE.md +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/__init__.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/_has_core.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/__init__.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/api_proxy.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/assets_cli.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/auth_lite.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/clips.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/database.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/dev.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/embed.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/external.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/inference.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/keys.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/operations.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/partners.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/permissions.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/projection.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/query_api.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/reports.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/schema.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/search.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/stats.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/ddl.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/models.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/commands/sync/queries.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/config.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/console.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/context.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/dev_context.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/guard.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/main.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/nl_query/__init__.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/nl_query/dataset_tools.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/ops_init.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/output.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/pagination.py +0 -0
- {buildai_cli-0.3.28 → buildai_cli-0.3.30}/cli/sdk_client.py +0 -0
|
@@ -19,8 +19,10 @@ dist/
|
|
|
19
19
|
build/
|
|
20
20
|
.pytest_cache/
|
|
21
21
|
.mypy_cache/
|
|
22
|
+
.ruff_cache/
|
|
22
23
|
tmp/
|
|
23
24
|
test-results/
|
|
25
|
+
.certificates/
|
|
24
26
|
|
|
25
27
|
# Node
|
|
26
28
|
node_modules/
|
|
@@ -50,10 +52,13 @@ Thumbs.db
|
|
|
50
52
|
# Local tool state
|
|
51
53
|
.entire/
|
|
52
54
|
.codex/config.toml
|
|
55
|
+
.codex-bin/
|
|
53
56
|
.mcp.json
|
|
54
57
|
.hypothesis/
|
|
55
58
|
.dmux/
|
|
56
59
|
.ralph-status
|
|
60
|
+
buildai-workspace/
|
|
61
|
+
apps/buildai-sd-card-reader-android/
|
|
57
62
|
|
|
58
63
|
# Generated artifacts
|
|
59
64
|
outputs/
|
|
@@ -72,6 +77,8 @@ scripts/dead_assets.ids.txt
|
|
|
72
77
|
|
|
73
78
|
# Large binaries
|
|
74
79
|
*.npy
|
|
80
|
+
*.apk
|
|
81
|
+
.tmp-*.yml
|
|
75
82
|
|
|
76
83
|
# TLS certs
|
|
77
84
|
*.ts.net.crt
|
|
@@ -126,7 +126,9 @@ def _watch_job(client: Any, job_id: str, *, interval: float) -> None:
|
|
|
126
126
|
if failures.data:
|
|
127
127
|
for failure in failures.data:
|
|
128
128
|
warning(
|
|
129
|
-
f"{failure.entity_id} |
|
|
129
|
+
f"{failure.entity_id} | "
|
|
130
|
+
f"{failure.error_code or 'error'} | "
|
|
131
|
+
f"{failure.error_message or ''}"
|
|
130
132
|
)
|
|
131
133
|
return
|
|
132
134
|
time.sleep(interval)
|
|
@@ -192,7 +194,8 @@ def jobs_submit(
|
|
|
192
194
|
memory=memory,
|
|
193
195
|
)
|
|
194
196
|
success(
|
|
195
|
-
f"Submitted {job_id} on {result.platform}
|
|
197
|
+
f"Submitted {job_id} on {result.platform} "
|
|
198
|
+
f"as {result.batch_job_name} with {result.task_count} tasks"
|
|
196
199
|
)
|
|
197
200
|
if watch:
|
|
198
201
|
_watch_job(client, job_id, interval=interval)
|
|
@@ -210,23 +213,23 @@ def jobs_watch(
|
|
|
210
213
|
|
|
211
214
|
@app.command("backlog")
|
|
212
215
|
def jobs_backlog(
|
|
213
|
-
job_type: str = typer.Argument(..., help="extract-
|
|
216
|
+
job_type: str = typer.Argument(..., help="extract-frames"),
|
|
214
217
|
factory: str | None = typer.Option(None, "--factory"),
|
|
215
218
|
collection: str | None = typer.Option(None, "--collection", "-c"),
|
|
216
219
|
format: Format | None = format_option(),
|
|
217
220
|
) -> None:
|
|
218
221
|
"""Inspect extractor backlog."""
|
|
219
222
|
client = get_sdk_client()
|
|
220
|
-
if job_type == "extract-
|
|
221
|
-
backlog = client.jobs.
|
|
223
|
+
if job_type == "extract-frames":
|
|
224
|
+
backlog = client.jobs.extract_frames_backlog(factory_id=factory, collection_id=collection)
|
|
222
225
|
else:
|
|
223
226
|
error(f"Unknown backlog type: {job_type}")
|
|
224
227
|
raise typer.Exit(1)
|
|
225
228
|
output(backlog, format=format)
|
|
226
229
|
|
|
227
230
|
|
|
228
|
-
@app.command("extract-
|
|
229
|
-
def
|
|
231
|
+
@app.command("extract-frames")
|
|
232
|
+
def jobs_extract_frames(
|
|
230
233
|
ctx: typer.Context,
|
|
231
234
|
factory: str | None = typer.Option(None, "--factory"),
|
|
232
235
|
collection: str | None = typer.Option(None, "--collection", "-c"),
|
|
@@ -261,13 +264,14 @@ def jobs_extract_iframes(
|
|
|
261
264
|
"""Queue canonical frame extraction, optionally launch immediately."""
|
|
262
265
|
del ctx # API enforces permissions via token scope
|
|
263
266
|
client = get_sdk_client()
|
|
264
|
-
backlog = client.jobs.
|
|
267
|
+
backlog = client.jobs.extract_frames_backlog(factory_id=factory, collection_id=collection)
|
|
265
268
|
info(
|
|
266
|
-
f"Extractor backlog clips={backlog.total_clips}
|
|
269
|
+
f"Extractor backlog clips={backlog.total_clips} "
|
|
270
|
+
f"active_manifest={backlog.active_manifest_id}"
|
|
267
271
|
)
|
|
268
272
|
# Build exists filters from CLI format
|
|
269
273
|
exists_filters = [_parse_exists_filter(e) for e in exists] if exists else None
|
|
270
|
-
job = client.jobs.
|
|
274
|
+
job = client.jobs.submit_extract_frames(
|
|
271
275
|
factory_id=factory,
|
|
272
276
|
collection_id=collection,
|
|
273
277
|
worker_ids=worker_ids,
|
|
@@ -299,7 +303,8 @@ def jobs_extract_iframes(
|
|
|
299
303
|
memory=memory,
|
|
300
304
|
)
|
|
301
305
|
success(
|
|
302
|
-
f"Submitted extractor {job.job_id} on {result.platform}
|
|
306
|
+
f"Submitted extractor {job.job_id} on {result.platform} "
|
|
307
|
+
f"as {result.batch_job_name} with {result.task_count} tasks"
|
|
303
308
|
)
|
|
304
309
|
if watch:
|
|
305
310
|
_watch_job(client, job.job_id, interval=interval)
|
|
@@ -131,11 +131,13 @@ async def _status(ctx: typer.Context, space_id: int | None) -> None:
|
|
|
131
131
|
console.print("[yellow]No medoids found[/yellow]")
|
|
132
132
|
if space_id:
|
|
133
133
|
console.print(
|
|
134
|
-
f"[dim]Run: buildai admin medoid compute
|
|
134
|
+
f"[dim]Run: buildai admin medoid compute "
|
|
135
|
+
f"--space-id {space_id} --group-type worker[/dim]"
|
|
135
136
|
)
|
|
136
137
|
else:
|
|
137
138
|
console.print(
|
|
138
|
-
"[dim]Run: buildai admin medoid compute
|
|
139
|
+
"[dim]Run: buildai admin medoid compute "
|
|
140
|
+
"--space-id <id> --group-type worker[/dim]"
|
|
139
141
|
)
|
|
140
142
|
return
|
|
141
143
|
|
|
@@ -236,7 +238,8 @@ async def _compute(
|
|
|
236
238
|
dry_run: bool,
|
|
237
239
|
) -> None:
|
|
238
240
|
from dal.processing import jobs
|
|
239
|
-
|
|
241
|
+
|
|
242
|
+
from services.load_config import load_service_config, resolve_profile
|
|
240
243
|
|
|
241
244
|
settings = ctx.obj["settings"]
|
|
242
245
|
|
|
@@ -297,7 +300,11 @@ async def _compute(
|
|
|
297
300
|
raise typer.Exit(1)
|
|
298
301
|
|
|
299
302
|
# Get GPU config based on data size for display
|
|
300
|
-
|
|
303
|
+
embedding_config = load_service_config("media_embedding")
|
|
304
|
+
batch_config = resolve_profile(
|
|
305
|
+
embedding_config,
|
|
306
|
+
job_type="compute_medoids",
|
|
307
|
+
)
|
|
301
308
|
data_size_gb = (entity_count * space.dimensions * 4) / (1024**3)
|
|
302
309
|
|
|
303
310
|
# Display plan
|
|
@@ -312,8 +319,8 @@ async def _compute(
|
|
|
312
319
|
f"Groups ({group_type}s): [green]{group_count:,}[/green]\n"
|
|
313
320
|
f"Entities ({entity_type}s): [cyan]{entity_count:,}[/cyan]\n"
|
|
314
321
|
f"Data Size: {data_size_gb:.1f}GB\n\n"
|
|
315
|
-
f"GPU: [green]{batch_config
|
|
316
|
-
f"Memory: {batch_config.memory_mib // 1024}GB RAM\n\n"
|
|
322
|
+
f"GPU: [green]{batch_config['machine_type']}[/green] ({batch_config.get('gpu')})\n"
|
|
323
|
+
f"Memory: {batch_config.get('memory_mib', 0) // 1024}GB RAM\n\n"
|
|
317
324
|
f"Output: [green]{group_count:,}[/green] medoids → observations.medoids",
|
|
318
325
|
title="Plan",
|
|
319
326
|
)
|
|
@@ -204,7 +204,9 @@ def query(
|
|
|
204
204
|
show_sql(sql)
|
|
205
205
|
|
|
206
206
|
admin_config = resolve_admin_connection_config(settings)
|
|
207
|
-
use_admin_connection =
|
|
207
|
+
use_admin_connection = admin_config is not None and (
|
|
208
|
+
_is_select_query(sql) or (is_write and cli_profile == "internal_admin")
|
|
209
|
+
)
|
|
208
210
|
if use_admin_connection and admin_config is not None:
|
|
209
211
|
dim(f"Using admin DB principal: {admin_config.user}")
|
|
210
212
|
|
|
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
|