Skip to content

Commit 863ffc7

Browse files
Add docstring
1 parent f092dbe commit 863ffc7

File tree

1 file changed

+12
-1
lines changed

1 file changed

+12
-1
lines changed

tim/cli.py

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@
2626
},
2727
{
2828
"name": "Bulk record processing commands",
29-
"commands": ["bulk-update", "reindex-source"],
29+
"commands": ["bulk-update", "bulk-update-embeddings", "reindex-source"],
3030
},
3131
]
3232
}
@@ -355,6 +355,17 @@ def bulk_update_embeddings(
355355
run_id: str,
356356
dataset_path: str,
357357
) -> None:
358+
"""Bulk update existing records with vector embeddings for an index.
359+
360+
Must provide either the name of an existing index in the cluster or a valid source.
361+
If source is provided, it will update existing records for the primary-aliased
362+
index for the source. If the provided index doesn't exist in the cluster, the
363+
method will log an error and abort.
364+
365+
The method will read vector embeddings from a TIMDEXDataset
366+
located at dataset_path using the 'timdex-dataset-api' library. The dataset
367+
is filtered by run date and run ID.
368+
"""
358369
client = ctx.obj["CLIENT"]
359370
index = helpers.validate_bulk_cli_options(index, source, client)
360371

0 commit comments

Comments
 (0)