Skip to content

Commit

Permalink
Fix rst underline length warnings (facebook#3382)
Browse files Browse the repository at this point in the history
Summary:
## These changes

Fixes errors like
```shell
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ [docutils]
/home/runner/work/Ax/Ax/sphinx/source/modelbridge.rst:388: WARNING: Title underline too short.
```

From the [official RST documentation](https://docutils.sourceforge.io/docs/user/rst/quickstart.html#sections):
> The underline/overline must be at least as long as the title text.

## Next steps

We currently ignore warnings and errors in our sphinx build. There's more work needed to fix all the current warnings and errors before we can start blocking deploys on this. We currently build sphinx for testing in the "Build and Test Workflow" https://github.com/facebook/Ax/actions/runs/13395675240/job/37413955185#step:7:207

I took a stab at fixing other errors but the loop of
1. attempt fix
2. rebuild sphinx docs to reveal errors
3. grep logs to see if fix resolved our specific error

is painfully slow. I tried using a [flake8-rst extension](https://github.com/peterjc/flake8-rst-docstrings) to reveal the errors in my editor but they didn't match the output of sphinx.

Creating a backlog task for the remaining work

Pull Request resolved: facebook#3382

Reviewed By: paschai

Differential Revision: D69794692

Pulled By: CristianLara

fbshipit-source-id: d45ad855597ed44ad787c0b357e9c94873284b49
  • Loading branch information
CristianLara authored and facebook-github-bot committed Feb 19, 2025
1 parent 2a0d7a5 commit 9db61c5
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 18 deletions.
4 changes: 2 additions & 2 deletions sphinx/source/core.rst
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ Core Classes


`AuxiliaryExperiment`
~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.core.auxiliary
:members:
Expand Down Expand Up @@ -205,7 +205,7 @@ Core Classes


`TrialStatus`
~~~~~~~~~~~~
~~~~~~~~~~~~~

.. automodule:: ax.core.trial_status
:members:
Expand Down
10 changes: 5 additions & 5 deletions sphinx/source/generation_strategy.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
:class: hidden-section

ax.generation_strategy
==============
======================

.. automodule:: ax.generation_strategy
.. currentmodule:: ax.generation_strategy
Expand All @@ -26,28 +26,28 @@ Generation Node
:show-inheritance:

External Generation Node
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: ax.generation_strategy.external_generation_node
:members:
:undoc-members:
:show-inheritance:

Transition Criterion
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~
.. automodule:: ax.generation_strategy.transition_criterion
:members:
:undoc-members:
:show-inheritance:

Generation Node Input Constructors
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: ax.generation_strategy.generation_node_input_constructors
:members:
:undoc-members:
:show-inheritance:

GeneratorSpec
~~~~~~~~~
~~~~~~~~~~~~~
.. automodule:: ax.generation_strategy.model_spec
:members:
:undoc-members:
Expand Down
10 changes: 5 additions & 5 deletions sphinx/source/modelbridge.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ Generation Node
:show-inheritance:

External Generation Node
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~
.. automodule:: ax.modelbridge.external_generation_node
:members:
:undoc-members:
Expand Down Expand Up @@ -59,7 +59,7 @@ Factory
:show-inheritance:

GeneratorSpec
~~~~~~~~~
~~~~~~~~~~~~~
.. automodule:: ax.modelbridge.model_spec
:members:
:undoc-members:
Expand Down Expand Up @@ -207,7 +207,7 @@ Transforms
:show-inheritance:

`ax.modelbridge.transforms.fill_missing_parameters`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.modelbridge.transforms.fill_missing_parameters
:members:
Expand Down Expand Up @@ -377,15 +377,15 @@ Transforms
:show-inheritance:

`ax.modelbridge.transforms.time\_as\_feature`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.modelbridge.transforms.time_as_feature
:members:
:undoc-members:
:show-inheritance:

`ax.modelbridge.transforms.transform\_to\_new\_sq`
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.modelbridge.transforms.transform_to_new_sq
:members:
Expand Down
10 changes: 5 additions & 5 deletions sphinx/source/models.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ ax.models


Base Generators & Utilities
-----------------------
---------------------------

ax.models.base
~~~~~~~~~~~~~~
Expand Down Expand Up @@ -61,7 +61,7 @@ ax.models.winsorization\_config module


Discrete Generators
---------------
-------------------

ax.models.discrete.eb\_thompson module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down Expand Up @@ -96,7 +96,7 @@ ax.models.discrete.eb\_ashr module
:show-inheritance:

ax.models.discrete.ashr\_utils module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.models.discrete.ashr_utils
:members:
Expand All @@ -105,7 +105,7 @@ ax.models.discrete.ashr\_utils module


Random Generators
-------------
-----------------

ax.models.random.base module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand All @@ -132,7 +132,7 @@ ax.models.random.sobol module
:show-inheritance:

Torch Generators & Utilities
------------------------
----------------------------

ax.models.torch.botorch module
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Expand Down
2 changes: 1 addition & 1 deletion sphinx/source/utils.rst
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ Typeutils
:show-inheritance:

Typeutils Non-Native
~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~

.. automodule:: ax.utils.common.typeutils_nonnative
:members:
Expand Down

0 comments on commit 9db61c5

Please sign in to comment.