:py:mod:`gnn_tracking_hpo.tune`
===============================

.. py:module:: gnn_tracking_hpo.tune


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

Classes
~~~~~~~

.. autoapisummary::

   gnn_tracking_hpo.tune.Dispatcher



Functions
~~~~~~~~~

.. autoapisummary::

   gnn_tracking_hpo.tune.add_common_options
   gnn_tracking_hpo.tune.get_timeout_stopper
   gnn_tracking_hpo.tune.simple_run_without_tune
   gnn_tracking_hpo.tune.main



.. py:function:: add_common_options(parser: argparse.ArgumentParser)


.. py:function:: get_timeout_stopper(timeout: str | None = None) -> ray.tune.Stopper | None

   Interpret timeout string as seconds.


.. py:function:: simple_run_without_tune(trainable, suggest_config: Callable) -> None

   Simple run without tuning for testing purposes.


.. py:class:: Dispatcher(*, test=False, cpu=False, restore=None, enqueue: None | list[str] = None, only_enqueued=False, fixed: None | str = None, timeout: None | str = None, tags=None, group=None, note=None, fail_fast=False, dname: str | None = None, metric='trk.double_majority_pt1.5', no_tune=False, num_samples: None | int = None, no_scheduler=False, local=False, grace_period=3, no_improvement_patience=10, additional_stoppers=None)


   For most arguments, see corresponding command line interface.

   :param grace_period: Grace period for ASHA scheduler.
   :param no_improvement_patience: Number of iterations without improvement before
                                   stopping

   .. py:method:: __call__(trainable: type[ray.tune.Trainable], suggest_config: Callable) -> ray.tune.ResultGrid

      :param trainable: The trainable to run.
      :param suggest_config: A function that returns a config dictionary.

      Returns:



   .. py:method:: get_resources() -> dict[str, int]


   .. py:method:: get_tuner(trainable: type[ray.tune.Trainable], suggest_config: Callable) -> ray.tune.Tuner


   .. py:method:: get_no_improvement_stopper() -> rt_stoppers_contrib.NoImprovementTrialStopper | None


   .. py:method:: get_stoppers() -> list[ray.tune.Stopper]


   .. py:method:: get_wandb_callbacks() -> list[ray.tune.Callback]


   .. py:method:: get_callbacks() -> list[ray.tune.Callback]


   .. py:method:: points_to_evaluate() -> list[dict[str, Any]]


   .. py:method:: get_optuna_sampler()


   .. py:method:: get_optuna_search(suggest_config: Callable) -> ray.tune.search.optuna.OptunaSearch


   .. py:method:: get_num_samples() -> int

      Return number of samples/trials to run


   .. py:method:: get_scheduler() -> None | ray.tune.schedulers.ASHAScheduler


   .. py:method:: get_tune_config(suggest_config: Callable) -> ray.tune.TuneConfig


   .. py:method:: get_checkpoint_config() -> ray.air.CheckpointConfig


   .. py:method:: get_run_config() -> ray.air.RunConfig



.. py:function:: main(trainable, suggest_config, *args, **kwargs) -> ray.tune.ResultGrid

   Dispatch with ray tune Arguments see Dispater.__call__.


