hyrax.verbs.save_to_database

Attributes

logger

Classes

SaveToDatabase

Verb to insert inference results into a vector database index for fast

Module Contents

logger[source]
class SaveToDatabase(config)[source]

Bases: hyrax.verbs.verb_registry.Verb

Verb to insert inference results into a vector database index for fast similarity search.

__init__()[source]

Overall initialization for all verbs that saves the config

cli_name = 'save_to_database'[source]
add_parser_kwargs[source]
static setup_parser(parser: argparse.ArgumentParser)[source]

Stub of parser setup

run_cli(args: argparse.Namespace | None = None)[source]

Stub CLI implementation

run(input_dir: pathlib.Path | str | None = None, output_dir: pathlib.Path | str | None = None)[source]

Insert inference results into vector database.

Parameters:
  • input_dir (str or Path, Optional) – The directory containing the inference results.

  • output_dir (str or Path, Optional) – The directory where the vector database is stored. If None, a new directory will be created. If specified, it can point to either an empty directory or a directory containing an existing vector database. If the latter, the database will be updated with the new vectors.