Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions docs/architecture_overview.rst
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@ Hyrax is designed to be used in a Jupyter notebook or from the command line with
modification. This supports exploration and development in a familiar notebook environment
and deployment to an HPC or Slurm system for large scale training.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -25,7 +25,7 @@ and deployment to an HPC or Slurm system for large scale training.
h = Hyrax(config_file = 'my_config.toml')
h.train()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
1 change: 0 additions & 1 deletion docs/conf.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,6 @@

extensions.append("autoapi.extension")
extensions.append("nbsphinx")
extensions.append("sphinx_tabs.tabs")
extensions.append("sphinx_design")

# -- sphinx-copybutton configuration ----------------------------------------
Expand Down
12 changes: 6 additions & 6 deletions docs/configuration.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,9 +16,9 @@ will be used. To specify a different configuration file, use the
``-c | --runtime-config`` flag from the CLI
or pass the path to the configuration file when creating a ``Hyrax`` object.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -30,7 +30,7 @@ or pass the path to the configuration file when creating a ``Hyrax`` object.
# Train the model specified in the configuration file
f.train()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down Expand Up @@ -58,9 +58,9 @@ For example, if a file called ``my_config.toml`` had the following contents:
It could be used to override the default ``log_level`` configuration, while leaving
the rest of the configuration unchanged.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -72,7 +72,7 @@ the rest of the configuration unchanged.
# Train the model specified in the configuration file
f.train()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
18 changes: 9 additions & 9 deletions docs/data_set_splits.rst
Original file line number Diff line number Diff line change
Expand Up @@ -18,9 +18,9 @@ The size of these splits can be configured in the ``[data_set]`` section of the
``train_size``, ``validate_size``, and ``test_size`` configuration keys. The value is either a number of data points
or a ratio of the dataset, where 1.0 represents the entire dataset. For example:

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -30,7 +30,7 @@ or a ratio of the dataset, where 1.0 represents the entire dataset. For example:
h.config["data_set"]["validate_size"] = 0.2
h.config["data_set"]["test_size"] = 0.2

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down Expand Up @@ -58,9 +58,9 @@ By default the ``infer`` verb uses the entire dataset for inference; however any
specifying the ``[infer]`` ``split`` config value. Valid values are any of the three splits. For example, to
infer on only the test split:

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -70,7 +70,7 @@ infer on only the test split:

h.infer()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand All @@ -88,17 +88,17 @@ The membership in each split is determined randomly. By default, system entropy

You can specify a random seed with the ``[data_set]`` ``seed`` configuration key as follows:

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

from hyrax import Hyrax
h = Hyrax()
h.config["data_set"]["seed"] = 1

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
6 changes: 3 additions & 3 deletions docs/external_libraries.rst
Original file line number Diff line number Diff line change
Expand Up @@ -16,17 +16,17 @@ The ``name`` configuration under either the ``[model]`` or ``[data_set]`` config
name used to locate the class starting at the top package level. e.g. if your dataset class is called ``MyDataSet`` and
is in a package called ``mydataset``, then you would configure as follows:

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

from hyrax import Hyrax
h = Hyrax()
h.config["data_set"]["name"] = "mydataset.MyDataSet"

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
6 changes: 3 additions & 3 deletions docs/model_comparison.rst
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ i.e. <timestamp>-train-<uid>.

The MLFlow server can be run from within a notebook or from the command line.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -44,7 +44,7 @@ The MLFlow server can be run from within a notebook or from the command line.
# Display the MLFlow UI in an IFrame in the notebook
IFrame(src="http://localhost:8080", width="100%", height=1000)

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
1 change: 0 additions & 1 deletion docs/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -10,5 +10,4 @@ sphinx-copybutton
sphinx-book-theme
sphinx-rtd-theme
sphinx-design
sphinx-tabs
sphinx-togglebutton
24 changes: 12 additions & 12 deletions docs/verbs.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@ When called from a notebook or python, ``train()`` returns a trained pytorch
model which you can :doc:`immediately evaluate, inspect, or export </pre_executed/export_model>`. Batch evaluations of datasets
are enabled using the ``infer`` verb, see below.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -29,7 +29,7 @@ are enabled using the ``infer`` verb, see below.
# Train the model specified in the configuration file
model = h.train()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand All @@ -43,9 +43,9 @@ be specified in the configuration file. If no model is specified, Hyrax will fin
the most recently trained model in the results directory and use that for inference.
The data used for inference is also specified in the configuration file.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -57,7 +57,7 @@ The data used for inference is also specified in the configuration file.
# Pass data through a trained model to produce embeddings or predictions.
h.infer()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand All @@ -75,9 +75,9 @@ recently generated output from the ``infer`` verb.

.. _`Uniform Manifold Approximation and Projection`: https://umap-learn.readthedocs.io

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -89,7 +89,7 @@ recently generated output from the ``infer`` verb.
# Train a UMAP and process the entire dataset.
h.umap()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down Expand Up @@ -139,9 +139,9 @@ write the resulting database to a new timestamped directory under the default
An existing database directory can be specified in order to add more vectors to
an existing index.

.. tabs::
.. tab-set::

.. group-tab:: Notebook
.. tab-item:: Notebook

.. code-block:: python

Expand All @@ -153,7 +153,7 @@ an existing index.
# Build a vector database index from the output of inference
h.index()

.. group-tab:: CLI
.. tab-item:: CLI

.. code-block:: bash

Expand Down
Loading