:py:mod:`mipcandy.frontend.notion_fe`
=====================================

.. py:module:: mipcandy.frontend.notion_fe

.. autodoc2-docstring:: mipcandy.frontend.notion_fe
   :allowtitles:

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

Classes
~~~~~~~

.. list-table::
   :class: autosummary longtable
   :align: left

   * - :py:obj:`NotionFrontend <mipcandy.frontend.notion_fe.NotionFrontend>`
     - .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend
          :summary:

API
~~~

.. py:class:: NotionFrontend(secrets: mipcandy.types.Settings)
   :canonical: mipcandy.frontend.notion_fe.NotionFrontend

   Bases: :py:obj:`mipcandy.frontend.prototype.Frontend`

   .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend

   .. rubric:: Initialization

   .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.__init__

   .. py:method:: retrieve_database() -> requests.Response
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.retrieve_database

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.retrieve_database

   .. py:method:: query_database(*, experiment_id: str | None = None) -> requests.Response
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.query_database

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.query_database

   .. py:method:: select_experiment(experiment_id: str) -> str
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.select_experiment

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.select_experiment

   .. py:method:: new_experiment(experiment_id: str, trainer: str, model: str, note: str, num_macs: float, num_params: float) -> requests.Response
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.new_experiment

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.new_experiment

   .. py:method:: update_experiment(experiment_id: str, status: typing.Literal[In Progress, Completed, Interrupted], *, epoch: int | None = None, score: float | None = None, early_stop_tolerance: int | None = None, observation: str | None = None) -> requests.Response
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.update_experiment

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.update_experiment

   .. py:method:: on_experiment_created(experiment_id: str, trainer: str, model: str, note: str, num_macs: float, num_params: float, num_epochs: int, early_stop_tolerance: int) -> None
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_created

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_created

   .. py:method:: on_experiment_updated(experiment_id: str, epoch: int, metrics: dict[str, list[float]], early_stop_tolerance: int) -> None
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_updated

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_updated

   .. py:method:: on_experiment_completed(experiment_id: str) -> None
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_completed

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_completed

   .. py:method:: on_experiment_interrupted(experiment_id: str, error: Exception) -> None
      :canonical: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_interrupted

      .. autodoc2-docstring:: mipcandy.frontend.notion_fe.NotionFrontend.on_experiment_interrupted
