hyrax.verbs.save_to_database
============================

.. py:module:: hyrax.verbs.save_to_database


Attributes
----------

.. autoapisummary::

   hyrax.verbs.save_to_database.logger


Classes
-------

.. autoapisummary::

   hyrax.verbs.save_to_database.SaveToDatabase


Module Contents
---------------

.. py:data:: logger

.. py:class:: SaveToDatabase(config)

   Bases: :py:obj:`hyrax.verbs.verb_registry.Verb`


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

   .. py:method:: __init__

   Overall initialization for all verbs that saves the config


   .. py:attribute:: cli_name
      :value: 'save_to_database'



   .. py:attribute:: add_parser_kwargs


   .. py:method:: setup_parser(parser: argparse.ArgumentParser)
      :staticmethod:


      Stub of parser setup



   .. py:method:: run_cli(args: argparse.Namespace | None = None)

      Stub CLI implementation



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

      Insert inference results into vector database.

      :param input_dir: The directory containing the inference results.
      :type input_dir: str or Path, Optional
      :param output_dir: 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.
      :type output_dir: str or Path, Optional



