diff --git a/docs/source/_static/css/custom.css b/docs/source/_static/css/custom.css index 1eb0f46b..46990922 100644 --- a/docs/source/_static/css/custom.css +++ b/docs/source/_static/css/custom.css @@ -92,94 +92,475 @@ text-align: center; } -pre { line-height: 125%; } -td.linenos .normal { color: #6e7681; background-color: #0d1117; padding-left: 5px; padding-right: 5px; } -span.linenos { color: #6e7681; background-color: #0d1117; padding-left: 5px; padding-right: 5px; } -td.linenos .special { color: #e6edf3; background-color: #6e7681; padding-left: 5px; padding-right: 5px; } -span.linenos.special { color: #e6edf3; background-color: #6e7681; padding-left: 5px; padding-right: 5px; } -.highlight .hll { background-color: #6e7681 } -.highlight { background: #0d1117; color: #e6edf3 } -.highlight .c { color: #8b949e; font-style: italic } /* Comment */ -.highlight .err { color: #f85149 } /* Error */ -.highlight .esc { color: #e6edf3 } /* Escape */ -.highlight .g { color: #e6edf3 } /* Generic */ -.highlight .k { color: #ff7b72 } /* Keyword */ -.highlight .l { color: #a5d6ff } /* Literal */ -.highlight .n { color: #e6edf3 } /* Name */ -.highlight .o { color: #ff7b72; font-weight: bold } /* Operator */ -.highlight .x { color: #e6edf3 } /* Other */ -.highlight .p { color: #e6edf3 } /* Punctuation */ -.highlight .ch { color: #8b949e; font-style: italic } /* Comment.Hashbang */ -.highlight .cm { color: #8b949e; font-style: italic } /* Comment.Multiline */ -.highlight .cp { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Preproc */ -.highlight .cpf { color: #8b949e; font-style: italic } /* Comment.PreprocFile */ -.highlight .c1 { color: #8b949e; font-style: italic } /* Comment.Single */ -.highlight .cs { color: #8b949e; font-weight: bold; font-style: italic } /* Comment.Special */ -.highlight .gd { color: #ffa198; background-color: #490202 } /* Generic.Deleted */ -.highlight .ge { color: #e6edf3; font-style: italic } /* Generic.Emph */ -.highlight .ges { color: #e6edf3; font-weight: bold; font-style: italic } /* Generic.EmphStrong */ -.highlight .gr { color: #ffa198 } /* Generic.Error */ -.highlight .gh { color: #79c0ff; font-weight: bold } /* Generic.Heading */ -.highlight .gi { color: #56d364; background-color: #0f5323 } /* Generic.Inserted */ -.highlight .go { color: #8b949e } /* Generic.Output */ -.highlight .gp { color: #8b949e } /* Generic.Prompt */ -.highlight .gs { color: #e6edf3; font-weight: bold } /* Generic.Strong */ -.highlight .gu { color: #79c0ff } /* Generic.Subheading */ -.highlight .gt { color: #ff7b72 } /* Generic.Traceback */ -.highlight .g-Underline { color: #e6edf3; text-decoration: underline } /* Generic.Underline */ -.highlight .kc { color: #79c0ff } /* Keyword.Constant */ -.highlight .kd { color: #ff7b72 } /* Keyword.Declaration */ -.highlight .kn { color: #ff7b72 } /* Keyword.Namespace */ -.highlight .kp { color: #79c0ff } /* Keyword.Pseudo */ -.highlight .kr { color: #ff7b72 } /* Keyword.Reserved */ -.highlight .kt { color: #ff7b72 } /* Keyword.Type */ -.highlight .ld { color: #79c0ff } /* Literal.Date */ -.highlight .m { color: #a5d6ff } /* Literal.Number */ -.highlight .s { color: #a5d6ff } /* Literal.String */ -.highlight .na { color: #e6edf3 } /* Name.Attribute */ -.highlight .nb { color: #e6edf3 } /* Name.Builtin */ -.highlight .nc { color: #f0883e; font-weight: bold } /* Name.Class */ -.highlight .no { color: #79c0ff; font-weight: bold } /* Name.Constant */ -.highlight .nd { color: #d2a8ff; font-weight: bold } /* Name.Decorator */ -.highlight .ni { color: #ffa657 } /* Name.Entity */ -.highlight .ne { color: #f0883e; font-weight: bold } /* Name.Exception */ -.highlight .nf { color: #d2a8ff; font-weight: bold } /* Name.Function */ -.highlight .nl { color: #79c0ff; font-weight: bold } /* Name.Label */ -.highlight .nn { color: #ff7b72 } /* Name.Namespace */ -.highlight .nx { color: #e6edf3 } /* Name.Other */ -.highlight .py { color: #79c0ff } /* Name.Property */ -.highlight .nt { color: #7ee787 } /* Name.Tag */ -.highlight .nv { color: #79c0ff } /* Name.Variable */ -.highlight .ow { color: #ff7b72; font-weight: bold } /* Operator.Word */ -.highlight .pm { color: #e6edf3 } /* Punctuation.Marker */ -.highlight .w { color: #6e7681 } /* Text.Whitespace */ -.highlight .mb { color: #a5d6ff } /* Literal.Number.Bin */ -.highlight .mf { color: #a5d6ff } /* Literal.Number.Float */ -.highlight .mh { color: #a5d6ff } /* Literal.Number.Hex */ -.highlight .mi { color: #a5d6ff } /* Literal.Number.Integer */ -.highlight .mo { color: #a5d6ff } /* Literal.Number.Oct */ -.highlight .sa { color: #79c0ff } /* Literal.String.Affix */ -.highlight .sb { color: #a5d6ff } /* Literal.String.Backtick */ -.highlight .sc { color: #a5d6ff } /* Literal.String.Char */ -.highlight .dl { color: #79c0ff } /* Literal.String.Delimiter */ -.highlight .sd { color: #a5d6ff } /* Literal.String.Doc */ -.highlight .s2 { color: #a5d6ff } /* Literal.String.Double */ -.highlight .se { color: #79c0ff } /* Literal.String.Escape */ -.highlight .sh { color: #79c0ff } /* Literal.String.Heredoc */ -.highlight .si { color: #a5d6ff } /* Literal.String.Interpol */ -.highlight .sx { color: #a5d6ff } /* Literal.String.Other */ -.highlight .sr { color: #79c0ff } /* Literal.String.Regex */ -.highlight .s1 { color: #a5d6ff } /* Literal.String.Single */ -.highlight .ss { color: #a5d6ff } /* Literal.String.Symbol */ -.highlight .bp { color: #e6edf3 } /* Name.Builtin.Pseudo */ -.highlight .fm { color: #d2a8ff; font-weight: bold } /* Name.Function.Magic */ -.highlight .vc { color: #79c0ff } /* Name.Variable.Class */ -.highlight .vg { color: #79c0ff } /* Name.Variable.Global */ -.highlight .vi { color: #79c0ff } /* Name.Variable.Instance */ -.highlight .vm { color: #79c0ff } /* Name.Variable.Magic */ -.highlight .il { color: #a5d6ff } /* Literal.Number.Integer.Long */ - -.highlight-bash pre{ +pre { + line-height: 125%; +} + +td.linenos .normal { + color: #6e7681; + background-color: #0d1117; + padding-left: 5px; + padding-right: 5px; +} + +span.linenos { + color: #6e7681; + background-color: #0d1117; + padding-left: 5px; + padding-right: 5px; +} + +td.linenos .special { + color: #e6edf3; + background-color: #6e7681; + padding-left: 5px; + padding-right: 5px; +} + +span.linenos.special { + color: #e6edf3; + background-color: #6e7681; + padding-left: 5px; + padding-right: 5px; +} + +.highlight .hll { + background-color: #6e7681 +} + +.highlight { + background: #0d1117; + color: #e6edf3 +} + +.highlight .c { + color: #8b949e; + font-style: italic +} + +/* Comment */ +.highlight .err { + color: #f85149 +} + +/* Error */ +.highlight .esc { + color: #e6edf3 +} + +/* Escape */ +.highlight .g { + color: #e6edf3 +} + +/* Generic */ +.highlight .k { + color: #ff7b72 +} + +/* Keyword */ +.highlight .l { + color: #a5d6ff +} + +/* Literal */ +.highlight .n { + color: #e6edf3 +} + +/* Name */ +.highlight .o { + color: #ff7b72; + font-weight: bold +} + +/* Operator */ +.highlight .x { + color: #e6edf3 +} + +/* Other */ +.highlight .p { + color: #e6edf3 +} + +/* Punctuation */ +.highlight .ch { + color: #8b949e; + font-style: italic +} + +/* Comment.Hashbang */ +.highlight .cm { + color: #8b949e; + font-style: italic +} + +/* Comment.Multiline */ +.highlight .cp { + color: #8b949e; + font-weight: bold; + font-style: italic +} + +/* Comment.Preproc */ +.highlight .cpf { + color: #8b949e; + font-style: italic +} + +/* Comment.PreprocFile */ +.highlight .c1 { + color: #8b949e; + font-style: italic +} + +/* Comment.Single */ +.highlight .cs { + color: #8b949e; + font-weight: bold; + font-style: italic +} + +/* Comment.Special */ +.highlight .gd { + color: #ffa198; + background-color: #490202 +} + +/* Generic.Deleted */ +.highlight .ge { + color: #e6edf3; + font-style: italic +} + +/* Generic.Emph */ +.highlight .ges { + color: #e6edf3; + font-weight: bold; + font-style: italic +} + +/* Generic.EmphStrong */ +.highlight .gr { + color: #ffa198 +} + +/* Generic.Error */ +.highlight .gh { + color: #79c0ff; + font-weight: bold +} + +/* Generic.Heading */ +.highlight .gi { + color: #56d364; + background-color: #0f5323 +} + +/* Generic.Inserted */ +.highlight .go { + color: #8b949e +} + +/* Generic.Output */ +.highlight .gp { + color: #8b949e +} + +/* Generic.Prompt */ +.highlight .gs { + color: #e6edf3; + font-weight: bold +} + +/* Generic.Strong */ +.highlight .gu { + color: #79c0ff +} + +/* Generic.Subheading */ +.highlight .gt { + color: #ff7b72 +} + +/* Generic.Traceback */ +.highlight .g-Underline { + color: #e6edf3; + text-decoration: underline +} + +/* Generic.Underline */ +.highlight .kc { + color: #79c0ff +} + +/* Keyword.Constant */ +.highlight .kd { + color: #ff7b72 +} + +/* Keyword.Declaration */ +.highlight .kn { + color: #ff7b72 +} + +/* Keyword.Namespace */ +.highlight .kp { + color: #79c0ff +} + +/* Keyword.Pseudo */ +.highlight .kr { + color: #ff7b72 +} + +/* Keyword.Reserved */ +.highlight .kt { + color: #ff7b72 +} + +/* Keyword.Type */ +.highlight .ld { + color: #79c0ff +} + +/* Literal.Date */ +.highlight .m { + color: #a5d6ff +} + +/* Literal.Number */ +.highlight .s { + color: #a5d6ff +} + +/* Literal.String */ +.highlight .na { + color: #e6edf3 +} + +/* Name.Attribute */ +.highlight .nb { + color: #e6edf3 +} + +/* Name.Builtin */ +.highlight .nc { + color: #f0883e; + font-weight: bold +} + +/* Name.Class */ +.highlight .no { + color: #79c0ff; + font-weight: bold +} + +/* Name.Constant */ +.highlight .nd { + color: #d2a8ff; + font-weight: bold +} + +/* Name.Decorator */ +.highlight .ni { + color: #ffa657 +} + +/* Name.Entity */ +.highlight .ne { + color: #f0883e; + font-weight: bold +} + +/* Name.Exception */ +.highlight .nf { + color: #d2a8ff; + font-weight: bold +} + +/* Name.Function */ +.highlight .nl { + color: #79c0ff; + font-weight: bold +} + +/* Name.Label */ +.highlight .nn { + color: #ff7b72 +} + +/* Name.Namespace */ +.highlight .nx { + color: #e6edf3 +} + +/* Name.Other */ +.highlight .py { + color: #79c0ff +} + +/* Name.Property */ +.highlight .nt { + color: #7ee787 +} + +/* Name.Tag */ +.highlight .nv { + color: #79c0ff +} + +/* Name.Variable */ +.highlight .ow { + color: #ff7b72; + font-weight: bold +} + +/* Operator.Word */ +.highlight .pm { + color: #e6edf3 +} + +/* Punctuation.Marker */ +.highlight .w { + color: #6e7681 +} + +/* Text.Whitespace */ +.highlight .mb { + color: #a5d6ff +} + +/* Literal.Number.Bin */ +.highlight .mf { + color: #a5d6ff +} + +/* Literal.Number.Float */ +.highlight .mh { + color: #a5d6ff +} + +/* Literal.Number.Hex */ +.highlight .mi { + color: #a5d6ff +} + +/* Literal.Number.Integer */ +.highlight .mo { + color: #a5d6ff +} + +/* Literal.Number.Oct */ +.highlight .sa { + color: #79c0ff +} + +/* Literal.String.Affix */ +.highlight .sb { + color: #a5d6ff +} + +/* Literal.String.Backtick */ +.highlight .sc { + color: #a5d6ff +} + +/* Literal.String.Char */ +.highlight .dl { + color: #79c0ff +} + +/* Literal.String.Delimiter */ +.highlight .sd { + color: #a5d6ff +} + +/* Literal.String.Doc */ +.highlight .s2 { + color: #a5d6ff +} + +/* Literal.String.Double */ +.highlight .se { + color: #79c0ff +} + +/* Literal.String.Escape */ +.highlight .sh { + color: #79c0ff +} + +/* Literal.String.Heredoc */ +.highlight .si { + color: #a5d6ff +} + +/* Literal.String.Interpol */ +.highlight .sx { + color: #a5d6ff +} + +/* Literal.String.Other */ +.highlight .sr { + color: #79c0ff +} + +/* Literal.String.Regex */ +.highlight .s1 { + color: #a5d6ff +} + +/* Literal.String.Single */ +.highlight .ss { + color: #a5d6ff +} + +/* Literal.String.Symbol */ +.highlight .bp { + color: #e6edf3 +} + +/* Name.Builtin.Pseudo */ +.highlight .fm { + color: #d2a8ff; + font-weight: bold +} + +/* Name.Function.Magic */ +.highlight .vc { + color: #79c0ff +} + +/* Name.Variable.Class */ +.highlight .vg { + color: #79c0ff +} + +/* Name.Variable.Global */ +.highlight .vi { + color: #79c0ff +} + +/* Name.Variable.Instance */ +.highlight .vm { + color: #79c0ff +} + +/* Name.Variable.Magic */ +.highlight .il { + color: #a5d6ff +} + +/* Literal.Number.Integer.Long */ + +.highlight-bash pre { background: #0d1117; color: #e6edf3; } + +code.highlight.cmd.bash.docutils.literal.highlight-bash { + background: #f3f4f7; + color: #6c6c6d; +} diff --git a/docs/source/contributing.rst b/docs/source/contributing.rst index 466479b6..fc2dc687 100644 --- a/docs/source/contributing.rst +++ b/docs/source/contributing.rst @@ -4,6 +4,9 @@ Contributing .. role:: bash(code) :language: bash +.. role:: cmd(code) + :language: bash + TorchUncertainty is in early development stage. We are looking for contributors to help us build a comprehensive library for uncertainty quantification in PyTorch. @@ -16,8 +19,9 @@ The scope of TorchUncertainty TorchUncertainty can host any method - if possible linked to a paper - and roughly contained in the following fields: -* uncertainty quantification in general, including Bayesian deep learning, -Monte Carlo dropout, ensemble methods, etc. + +* Uncertainty quantification in general, including Bayesian deep learning, + Monte Carlo dropout, ensemble methods, etc. * Out-of-distribution detection methods * Applications (e.g. object detection, segmentation, etc.) @@ -34,8 +38,8 @@ ensuring continuous integration does not break. 1. Check that you have PyTorch already installed on your system 2. Clone the repository 3. Install torch-uncertainty in editable mode with the dev packages: - :bash:`python3 -m pip install -e .[dev]` -4. Install pre-commit hooks with :bash:`pre-commit install` + :cmd:`python3 -m pip install -e .[dev]` +4. Install pre-commit hooks with :cmd:`pre-commit install` Build the documentation locally ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ @@ -47,13 +51,13 @@ group: python3 -m pip install -e .[dev,docs] -Then navigate to :bash:`./docs` and build the documentation with: +Then navigate to ``./docs`` and build the documentation with: .. parsed-literal:: make html -Optionally, specify :bash:`html-noplot` instead of :bash:`html` to avoid running the tutorials. +Optionally, specify ``html-noplot`` instead of ``html`` to avoid running the tutorials. Guidelines ^^^^^^^^^^ @@ -81,19 +85,18 @@ To make your changes, create a branch on a personal fork and create a PR when yo is mostly finished or if you need help. Check that your PR complies with the following conditions: -* The name of your branch is not `main` nor `dev` (see issue #58) + +* The name of your branch is not ``main`` nor ``dev`` (see issue #58) * Your PR does not reduce the code coverage -* Your code is documented: the function signatures are typed, and the main functions have clear -docstrings -* Your code is mostly original, and the parts coming from licensed sources are explicitly -stated as such -* If you implement a method, please add a reference to the corresponding paper in the -`references page `_. +* Your code is documented: the function signatures are typed, and the main functions have clear docstrings +* Your code is mostly original, and the parts coming from licensed sources are explicitly stated as such +* If you implement a method, please add a reference to the corresponding paper in the + `references page `_. * Also, remember to add TorchUncertainty to the list of libraries implementing this reference -on `PapersWithCode `_. + on `PapersWithCode `_. If you need help to implement a method, increase the coverage, or solve ruff-raised errors, -create the PR with the `need-help` flag and explain your problems in the comments. A maintainer +create the PR with the ``need-help`` flag and explain your problems in the comments. A maintainer will do their best to help you. Datasets & Datamodules