hyrax.verbs.save_to_database
Attributes
Classes
Verb to insert inference results into a vector database index for fast |
Module Contents
- class SaveToDatabase(config)[source]
Bases:
hyrax.verbs.verb_registry.VerbVerb to insert inference results into a vector database index for fast similarity search.
Overall initialization for all verbs that saves the config
- 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.