plugins.panels.similarity_search.run_manager#

Similarity search run manager.

Copyright 2017-2026, Voxel51, Inc.

Classes:

RunManager(ctx)

Manager class for persisting and retrieving similarity search runs.

class plugins.panels.similarity_search.run_manager.RunManager(ctx)#

Bases: object

Manager class for persisting and retrieving similarity search runs.

Methods:

create_run(run_params)

Create a new run entry.

get_run(run_id)

Get a run by ID.

set_run(run_id, run_data)

Write a full run record to the store (atomic upsert).

update_run(run_id, updates)

Update fields on an existing run (read-modify-write).

set_operator_run_id(run_id, operator_run_id)

Link a delegated operation ID to a run and create index key.

find_run_by_operator_id(operator_run_id)

Find a run by its delegated operation ID.

delete_run(run_id)

Delete a run and its index keys.

list_runs()

List all runs sorted by creation time (newest first).

create_run(run_params: Dict[str, Any]) Dict[str, Any]#

Create a new run entry.

Parameters:

run_params – run configuration parameters

Returns:

the full run data dict

get_run(run_id: str) Dict | None#

Get a run by ID.

Parameters:

run_id – the run ID

Returns:

the run data dict, or None

set_run(run_id: str, run_data: Dict[str, Any])#

Write a full run record to the store (atomic upsert).

Parameters:
  • run_id – the run ID

  • run_data – the complete run data dict

update_run(run_id: str, updates: Dict[str, Any])#

Update fields on an existing run (read-modify-write).

For hot paths where the caller already holds the full run dict, prefer mutating locally and calling set_run() directly.

Parameters:
  • run_id – the run ID

  • updates – dict of fields to update

set_operator_run_id(run_id: str, operator_run_id: str)#

Link a delegated operation ID to a run and create index key.

Parameters:
  • run_id – the run ID

  • operator_run_id – the delegated operation document ID

find_run_by_operator_id(operator_run_id: str) Dict | None#

Find a run by its delegated operation ID. O(1) lookup.

Parameters:

operator_run_id – the delegated operation document ID

Returns:

the run data dict, or None

delete_run(run_id: str)#

Delete a run and its index keys.

Parameters:

run_id – the run ID

list_runs() List[Dict]#

List all runs sorted by creation time (newest first).

Returns:

list of run data dicts