Skip to content

Latest commit

 

History

214 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

<!DOCTYPE html>

<html data-content_root="./" lang="en">
<head>
<meta charset="utf-8"/>
<meta content="width=device-width, initial-scale=1.0" name="viewport"/><meta content="width=device-width, initial-scale=1" name="viewport"/>
<title>Contributing — TorchUncertainty Docs</title>
<script data-cfasync="false">
    document.documentElement.dataset.mode = localStorage.getItem("mode") || "";
    document.documentElement.dataset.theme = localStorage.getItem("theme") || "";
  </script>
<!--
    this give us a css class that will be invisible only if js is disabled
  -->
<noscript>
<style>
      .pst-js-only { display: none !important; }

    </style>
</noscript>
<!-- Loaded before other Sphinx assets -->
<link href="_static/styles/theme.css?digest=55c26ed414f5f8a31ebb" rel="stylesheet"/>
<link href="_static/styles/pydata-sphinx-theme.css?digest=55c26ed414f5f8a31ebb" rel="stylesheet"/>
<link href="_static/pygments.css?v=8f2a1f02" rel="stylesheet" type="text/css"/>
<link href="_static/copybutton.css?v=76b2166b" rel="stylesheet" type="text/css"/>
<link href="_static/sphinx-codeautolink.css?v=b2176991" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery.css?v=fd6457a4" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-binder.css?v=f4aeca0c" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-dataframe.css?v=2082cf3c" rel="stylesheet" type="text/css"/>
<link href="_static/sg_gallery-rendered-html.css?v=1277b6f3" rel="stylesheet" type="text/css"/>
<link href="_static/sphinx-design.min.css?v=95c83b7e" rel="stylesheet" type="text/css"/>
<!-- So that users can add custom icons -->
<script defer="" src="_static/scripts/fontawesome.js?digest=55c26ed414f5f8a31ebb"></script>
<!-- Pre-loaded scripts that we'll load fully later -->
<link as="script" href="_static/scripts/bootstrap.js?digest=55c26ed414f5f8a31ebb" rel="preload"/>
<link as="script" href="_static/scripts/pydata-sphinx-theme.js?digest=55c26ed414f5f8a31ebb" rel="preload"/>
<script src="_static/documentation_options.js?v=1019fba8"></script>
<script src="_static/doctools.js?v=9a2dae69"></script>
<script src="_static/sphinx_highlight.js?v=dc90522c"></script>
<script src="_static/clipboard.min.js?v=a7894cd8"></script>
<script src="_static/copybutton.js?v=f281be69"></script>
<script src="_static/sg-tags.js?v=d80f6fa4"></script>
<script src="_static/design-tabs.js?v=f930bc37"></script>
<script>DOCUMENTATION_OPTIONS.pagename = 'contributing';</script>
<script>DOCUMENTATION_OPTIONS.search_as_you_type = false;</script>
<link href="_static/favicon.ico" rel="icon"/>
<link href="genindex.html" rel="index" title="Index"/>
<link href="search.html" rel="search" title="Search"/>
<link href="references.html" rel="next" title="References"/>
<link href="generated/torch_uncertainty.callbacks.TUSegCheckpoint.html" rel="prev" title="TUSegCheckpoint"/>
<meta content="width=device-width, initial-scale=1" name="viewport"/>
<meta content="en" name="docsearch:language"/>
<meta content="" name="docsearch:version"/>
<script src="_static/searchtools.js"></script>
<script src="_static/language_data.js"></script>
<script src="searchindex.js"></script>
</head>
<body data-default-mode="">
<div class="skip-link d-print-none" id="pst-skip-link"><a href="#main-content">Skip to main content</a></div>
<div id="pst-scroll-pixel-helper"></div>
<button class="btn rounded-pill" id="pst-back-to-top" type="button">
<i class="fa-solid fa-arrow-up"></i>Back to top</button>
<dialog id="pst-search-dialog">
<form action="search.html" class="bd-search d-flex align-items-center" method="get">
<i class="fa-solid fa-magnifying-glass"></i>
<input aria-label="Search the docs ..." autocapitalize="off" autocomplete="off" autocorrect="off" class="form-control" name="q" placeholder="Search the docs ..." spellcheck="false" type="search"/>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd>K</kbd></span>
</form>
</dialog>
<div class="pst-async-banner-revealer d-none">
<aside aria-label="Version warning" class="d-none d-print-none" id="bd-header-version-warning"></aside>
</div>
<header class="bd-header navbar navbar-expand-lg bd-navbar d-print-none" id="pst-header">
<div class="bd-header__inner bd-page-width">
<button aria-label="Site navigation" class="pst-navbar-icon sidebar-toggle primary-toggle">
<span class="fa-solid fa-bars"></span>
</button>
<div class="col-lg-3 navbar-header-items__start">
<div class="navbar-item">
<a class="navbar-brand logo" href="index.html">
<img alt="TorchUncertainty Logo" class="logo__image only-light" src="_static/logo.png"/>
<img alt="TorchUncertainty Logo" class="logo__image only-dark pst-js-only" src="_static/logo_dark.png"/>
</a></div>
</div>
<div class="col-lg-9 navbar-header-items">
<div class="me-auto navbar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item">
<a class="nav-link nav-internal" href="installation.html">
    Installation
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="quickstart.html">
    Quickstart
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="auto_tutorials/index.html">
    Tutorials
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="evaluation.html">
    Evaluating Models
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="cli_guide.html">
    CLI Guide
  </a>
</li>
<li class="nav-item dropdown">
<button aria-controls="pst-nav-more-links" aria-expanded="false" class="btn dropdown-toggle nav-item" data-bs-toggle="dropdown" type="button">
                    More
                </button>
<ul class="dropdown-menu" id="pst-nav-more-links">
<li class="">
<a class="nav-link dropdown-item nav-internal" href="mlflow_guide.html">
    MLflow Guide
  </a>
</li>
<li class="">
<a class="nav-link dropdown-item nav-internal" href="api.html">
    API Reference
  </a>
</li>
<li class="current active">
<a class="nav-link dropdown-item nav-internal" href="#">
    Contributing
  </a>
</li>
<li class="">
<a class="nav-link dropdown-item nav-internal" href="references.html">
    References
  </a>
</li>
</ul>
</li>
</ul>
</nav></div>
</div>
<div class="navbar-header-items__end">
<div class="navbar-item navbar-persistent--container">
<button aria-label="Search" class="btn search-button-field search-button__button pst-js-only" data-bs-placement="bottom" data-bs-toggle="tooltip" title="Search">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
</div>
<div class="navbar-item">
<button aria-label="Color mode" class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" data-bs-placement="bottom" data-bs-title="Color mode" data-bs-toggle="tooltip">
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
</button></div>
<div class="navbar-item"><ul aria-label="Icon Links" class="navbar-icon-links">
<li class="nav-item">
<a class="nav-link pst-navbar-icon" data-bs-placement="bottom" data-bs-toggle="tooltip" href="https://github.com/torch-uncertainty/torch-uncertainty" rel="noopener" target="_blank" title="GitHub"><i aria-hidden="true" class="fa-brands fa-square-github fa-lg"></i>
<span class="sr-only">GitHub</span></a>
</li>
</ul></div>
</div>
</div>
<div class="navbar-persistent--mobile">
<button aria-label="Search" class="btn search-button-field search-button__button pst-js-only" data-bs-placement="bottom" data-bs-toggle="tooltip" title="Search">
<i class="fa-solid fa-magnifying-glass"></i>
<span class="search-button__default-text">Search</span>
<span class="search-button__kbd-shortcut"><kbd class="kbd-shortcut__modifier">Ctrl</kbd>+<kbd class="kbd-shortcut__modifier">K</kbd></span>
</button>
</div>
<button aria-label="On this page" class="pst-navbar-icon sidebar-toggle secondary-toggle">
<span class="fa-solid fa-outdent"></span>
</button>
</div>
</header>
<div class="bd-container">
<div class="bd-container__inner bd-page-width">
<dialog id="pst-primary-sidebar-modal"></dialog>
<div class="bd-sidebar-primary bd-sidebar hide-on-wide" id="pst-primary-sidebar">
<div class="sidebar-header-items sidebar-primary__section">
<div class="sidebar-header-items__center">
<div class="navbar-item">
<nav>
<ul class="bd-navbar-elements navbar-nav">
<li class="nav-item">
<a class="nav-link nav-internal" href="installation.html">
    Installation
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="quickstart.html">
    Quickstart
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="auto_tutorials/index.html">
    Tutorials
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="evaluation.html">
    Evaluating Models
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="cli_guide.html">
    CLI Guide
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="mlflow_guide.html">
    MLflow Guide
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="api.html">
    API Reference
  </a>
</li>
<li class="nav-item current active">
<a class="nav-link nav-internal" href="#">
    Contributing
  </a>
</li>
<li class="nav-item">
<a class="nav-link nav-internal" href="references.html">
    References
  </a>
</li>
</ul>
</nav></div>
</div>
<div class="sidebar-header-items__end">
<div class="navbar-item">
<button aria-label="Color mode" class="btn btn-sm nav-link pst-navbar-icon theme-switch-button pst-js-only" data-bs-placement="bottom" data-bs-title="Color mode" data-bs-toggle="tooltip">
<i class="theme-switch fa-solid fa-sun fa-lg" data-mode="light" title="Light"></i>
<i class="theme-switch fa-solid fa-moon fa-lg" data-mode="dark" title="Dark"></i>
<i class="theme-switch fa-solid fa-circle-half-stroke fa-lg" data-mode="auto" title="System Settings"></i>
</button></div>
<div class="navbar-item"><ul aria-label="Icon Links" class="navbar-icon-links">
<li class="nav-item">
<a class="nav-link pst-navbar-icon" data-bs-placement="bottom" data-bs-toggle="tooltip" href="https://github.com/torch-uncertainty/torch-uncertainty" rel="noopener" target="_blank" title="GitHub"><i aria-hidden="true" class="fa-brands fa-square-github fa-lg"></i>
<span class="sr-only">GitHub</span></a>
</li>
</ul></div>
</div>
</div>
<div class="sidebar-primary-items__end sidebar-primary__section">
<div class="sidebar-primary-item">
<div class="flat" data-ea-manual="true" data-ea-publisher="readthedocs" data-ea-type="readthedocs-sidebar" id="ethical-ad-placement">
</div></div>
</div>
</div>
<main class="bd-main" id="main-content" role="main">
<div class="bd-content">
<div class="bd-article-container">
<div class="bd-header-article d-print-none">
<div class="header-article-items header-article__inner">
<div class="header-article-items__start">
<div class="header-article-item">
<nav aria-label="Breadcrumb" class="d-print-none">
<ul class="bd-breadcrumbs">
<li class="breadcrumb-item breadcrumb-home">
<a aria-label="Home" class="nav-link" href="index.html">
<i class="fa-solid fa-home"></i>
</a>
</li>
<li aria-current="page" class="breadcrumb-item active"><span class="ellipsis">Contributing</span></li>
</ul>
</nav>
</div>
</div>
</div>
</div>
<div id="searchbox"></div>
<article class="bd-article">
<section id="contributing">
<h1>Contributing<a class="headerlink" href="#contributing" title="Link to this heading">#</a></h1>
<p>TorchUncertainty is in an early development stage. We are looking for
contributors to help us build a comprehensive library for uncertainty
quantification in PyTorch.</p>
<p>We are particularly open to any comment you may have on this project, and we are open to
revising these guidelines as the project evolves.</p>
<section id="the-scope-of-torchuncertainty">
<h2>The scope of TorchUncertainty<a class="headerlink" href="#the-scope-of-torchuncertainty" title="Link to this heading">#</a></h2>
<p>TorchUncertainty can host any method — ideally linked to a paper — that fits in one of the
following fields:</p>
<ul class="simple">
<li><p>uncertainty quantification in general, including Bayesian deep learning, Monte Carlo dropout, ensemble methods, etc.;</p></li>
<li><p>out-of-distribution detection methods;</p></li>
<li><p>applications (e.g., object detection, segmentation, depth estimation, etc.).</p></li>
</ul>
</section>
<section id="common-guidelines">
<h2>Common guidelines<a class="headerlink" href="#common-guidelines" title="Link to this heading">#</a></h2>
<section id="clean-development-install-of-torchuncertainty">
<h3>Clean development install of TorchUncertainty<a class="headerlink" href="#clean-development-install-of-torchuncertainty" title="Link to this heading">#</a></h3>
<p>If you are interested in contributing to TorchUncertainty, we recommend the
following steps to set up a clean development environment and ensure that the
continuous integration does not break.</p>
<ol class="arabic simple">
<li><p>Install <code class="docutils literal notranslate"><span class="pre">uv</span></code> following the steps <a class="reference external" href="https://docs.astral.sh/uv/getting-started/installation/">here</a></p></li>
<li><p>Clone the repository</p></li>
<li><p>Install torch-uncertainty with the dev packages:
<code class="code highlight cmd bash docutils literal highlight-bash">uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>gpu</code> for GPU-based systems or
<code class="code highlight cmd bash docutils literal highlight-bash">uv<span class="w"> </span>sync<span class="w"> </span>--extra<span class="w"> </span>cpu</code> if no GPUs are available</p></li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>Failure to include the extra flag will result in the GPU version of PyTorch without CUDA and might cause issues.</p>
</div>
<ol class="arabic simple" start="4">
<li><p>Install pre-commit hooks with <code class="code highlight cmd bash docutils literal highlight-bash">uv<span class="w"> </span>run<span class="w"> </span>pre-commit<span class="w"> </span>install</code></p></li>
</ol>
</section>
<section id="build-the-documentation-locally">
<h3>Build the documentation locally<a class="headerlink" href="#build-the-documentation-locally" title="Link to this heading">#</a></h3>
<p>To build the documentation on Linux, navigate to <code class="docutils literal notranslate"><span class="pre">./docs</span></code> and build the documentation with:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">make</span> <span class="n">html</span>
</pre></div>
</div>
<p>Optionally, specify <code class="docutils literal notranslate"><span class="pre">html-noplot</span></code> instead of <code class="docutils literal notranslate"><span class="pre">html</span></code> to avoid running the tutorials.
This option is necessary if you only have a CPU on your machine.</p>
</section>
<section id="guidelines">
<h3>Guidelines<a class="headerlink" href="#guidelines" title="Link to this heading">#</a></h3>
<p><strong>Code quality</strong></p>
<p>We use ruff for code formatting, linting, and import sorting (as a drop-in
replacement for black, isort, and flake8). The pre-commit hooks will ensure
that your code is properly formatted and linted before committing.</p>
<p>To check that your code complies with the standards, run the following and address any warnings:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">uv</span> <span class="n">run</span> <span class="n">ruff</span> <span class="n">check</span> <span class="o">--</span><span class="n">fix</span>
</pre></div>
</div>
<p>And then:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">uv</span> <span class="n">run</span> <span class="n">ruff</span> <span class="nb">format</span>
</pre></div>
</div>
<p>Please ensure that the tests pass on your machine before pushing a PR. This avoids
adding featureless commits just to chase CI. To run the tests, from the root of the
repository:</p>
<div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">uv</span> <span class="n">run</span> <span class="n">pytest</span> <span class="n">tests</span>
</pre></div>
</div>
<p><strong>Commit message convention</strong></p>
<p>We follow a structured commit message format inspired by
<a class="reference external" href="https://gitmoji.dev/">gitmoji</a> and the
<a class="reference external" href="https://www.conventionalcommits.org/">Conventional Commits</a> specification:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>:emoji:(scope): description
</pre></div>
</div>
<ul class="simple">
<li><p><strong>Emoji</strong>: pick the most appropriate emoji from <a class="reference external" href="https://gitmoji.dev/">gitmoji</a>
to categorize the change at a glance.</p></li>
<li><p><strong>Scope</strong>: a short identifier in parentheses describing the area of the codebase
affected (e.g. <code class="docutils literal notranslate"><span class="pre">packed</span></code>, <code class="docutils literal notranslate"><span class="pre">metrics</span></code>, <code class="docutils literal notranslate"><span class="pre">docs</span></code>, <code class="docutils literal notranslate"><span class="pre">CI</span></code>, <code class="docutils literal notranslate"><span class="pre">all</span></code>).</p></li>
<li><p><strong>Description</strong>: a concise summary of the change after the <code class="docutils literal notranslate"><span class="pre">:</span></code> separator.</p></li>
<li><p><strong>Breaking changes</strong>: use <code class="docutils literal notranslate"><span class="pre">!</span></code> before <code class="docutils literal notranslate"><span class="pre">:</span></code> to signal a breaking change.</p></li>
</ul>
<p>Here are some examples from the project:</p>
<div class="pst-scrollable-table-container"><table class="table">
<colgroup>
<col style="width: 60.0%"/>
<col style="width: 40.0%"/>
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Commit message</p></th>
<th class="head"><p>Meaning</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">:bug:(cli):</span> <span class="pre">fix</span> <span class="pre">self.model</span> <span class="pre">not</span> <span class="pre">being</span> <span class="pre">a</span> <span class="pre">property</span></code></p></td>
<td><p>Bug fix in the CLI module</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">:sparkles:(losses):</span> <span class="pre">add</span> <span class="pre">the</span> <span class="pre">DER</span> <span class="pre">loss</span></code></p></td>
<td><p>New feature in losses</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">:recycle:(segformer):</span> <span class="pre">remove</span> <span class="pre">init</span> <span class="pre">redundancies</span></code></p></td>
<td><p>Refactoring of segformer</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">:rotating_light:(all):</span> <span class="pre">ruff</span> <span class="pre">format</span></code></p></td>
<td><p>Fixing linter warnings across the codebase</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">:memo:(tabular):</span> <span class="pre">add</span> <span class="pre">some</span> <span class="pre">documentation</span></code></p></td>
<td><p>Documentation for the tabular module</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">:white_check_mark:(coverage):</span> <span class="pre">fix</span> <span class="pre">coverage</span> <span class="pre">misses</span></code></p></td>
<td><p>Test improvements</p></td>
</tr>
<tr class="row-even"><td><p><code class="docutils literal notranslate"><span class="pre">:wrench:(uv):</span> <span class="pre">update</span> <span class="pre">uv</span> <span class="pre">&amp;</span> <span class="pre">workflows</span></code></p></td>
<td><p>Configuration/tooling changes</p></td>
</tr>
<tr class="row-odd"><td><p><code class="docutils literal notranslate"><span class="pre">:boom:(routines)!:</span> <span class="pre">rename</span> <span class="pre">eval</span> <span class="pre">to</span> <span class="pre">test</span></code></p></td>
<td><p>Breaking change in routines</p></td>
</tr>
</tbody>
</table>
</div>
<p>Some of the most commonly used gitmoji in this project:</p>
<div class="pst-scrollable-table-container"><table class="table">
<colgroup>
<col style="width: 10.0%"/>
<col style="width: 25.0%"/>
<col style="width: 65.0%"/>
</colgroup>
<thead>
<tr class="row-odd"><th class="head"><p>Emoji</p></th>
<th class="head"><p>Code</p></th>
<th class="head"><p>Use</p></th>
</tr>
</thead>
<tbody>
<tr class="row-even"><td><p>✨</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:sparkles:</span></code></p></td>
<td><p>New feature</p></td>
</tr>
<tr class="row-odd"><td><p>🐛</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:bug:</span></code></p></td>
<td><p>Bug fix</p></td>
</tr>
<tr class="row-even"><td><p>♻️</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:recycle:</span></code></p></td>
<td><p>Refactor code</p></td>
</tr>
<tr class="row-odd"><td><p>📝</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:memo:</span></code></p></td>
<td><p>Documentation</p></td>
</tr>
<tr class="row-even"><td><p>🚨</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:rotating_light:</span></code></p></td>
<td><p>Fix linter warnings</p></td>
</tr>
<tr class="row-odd"><td><p>✅</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:white_check_mark:</span></code></p></td>
<td><p>Add/fix tests</p></td>
</tr>
<tr class="row-even"><td><p>🔧</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:wrench:</span></code></p></td>
<td><p>Configuration files</p></td>
</tr>
<tr class="row-odd"><td><p>🔥</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:fire:</span></code></p></td>
<td><p>Remove code or files</p></td>
</tr>
<tr class="row-even"><td><p>⬆️</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:arrow_up:</span></code></p></td>
<td><p>Upgrade dependencies</p></td>
</tr>
<tr class="row-odd"><td><p>💚</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:green_heart:</span></code></p></td>
<td><p>Fix CI build</p></td>
</tr>
<tr class="row-even"><td><p>👷</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:construction_worker:</span></code></p></td>
<td><p>CI system changes</p></td>
</tr>
<tr class="row-odd"><td><p>🎨</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:art:</span></code></p></td>
<td><p>Improve code structure/format</p></td>
</tr>
<tr class="row-even"><td><p>💥</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:boom:</span></code></p></td>
<td><p>Breaking changes</p></td>
</tr>
<tr class="row-odd"><td><p>👌</p></td>
<td><p><code class="docutils literal notranslate"><span class="pre">:ok_hand:</span></code></p></td>
<td><p>Code review changes</p></td>
</tr>
</tbody>
</table>
</div>
<p>For the full list of available emojis, visit <a class="reference external" href="https://gitmoji.dev/">gitmoji.dev</a>.</p>
<p>You don’t need to follow this convention.</p>
<p><strong>Pull requests</strong></p>
<p>To make your changes, create a branch on a personal fork and create a PR when your contribution
is mostly finished or if you need help.</p>
<p><em>PR naming convention</em></p>
<p>Pull requests should follow the same naming convention as commits:</p>
<div class="highlight-text notranslate"><div class="highlight"><pre><span></span>:emoji:(scope): description
</pre></div>
</div>
<p>For instance: <code class="docutils literal notranslate"><span class="pre">:sparkles:(datamodules):</span> <span class="pre">add</span> <span class="pre">support</span> <span class="pre">for</span> <span class="pre">CIFAR-100-C</span></code>.</p>
<p><em>PR labels</em></p>
<p>Please flag your PRs with the appropriate labels to help maintainers triage and
track changes. Common labels include:</p>
<ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">enhancement</span></code> — new feature or improvement</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">bug</span></code> — bug fix</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">documentation</span></code> — documentation changes</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">refactor</span></code> — code restructuring without behavior change</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">tests</span></code> — test additions or fixes</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">dependencies</span></code> — dependency updates</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">breaking-change</span></code> — introduces a breaking change</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">need-help</span></code> — you need assistance from a maintainer</p></li>
</ul>
<p><em>PR checklist</em></p>
<p>Check that your PR complies with the following conditions:</p>
<ul class="simple">
<li><p>The name of your branch is not <code class="docutils literal notranslate"><span class="pre">main</span></code> nor <code class="docutils literal notranslate"><span class="pre">dev</span></code> (see issue #58)</p></li>
<li><p>Your PR does not reduce the code coverage</p></li>
<li><p>Your code is documented: the function signatures are typed, and the main functions have clear docstrings</p></li>
<li><p>Your code is mostly original, and the parts coming from licensed sources are explicitly stated as such</p></li>
<li><p>If you implement a method, please add a reference to the corresponding paper in the
<a class="reference external" href="https://torch-uncertainty.github.io/references.html">references page</a>.</p></li>
<li><p>If you implement a metric that you add to one of the routines, add a reference in the
<a class="reference external" href="https://torch-uncertainty.github.io/evaluation.html">evaluation page</a>.</p></li>
</ul>
<p>If you need help to implement a method, increase the coverage, or solve ruff-raised errors,
create the PR with the <code class="docutils literal notranslate"><span class="pre">need-help</span></code> flag and explain your problems in the comments. A maintainer
will do their best to help you.</p>
</section>
<section id="datasets-datamodules">
<h3>Datasets &amp; Datamodules<a class="headerlink" href="#datasets-datamodules" title="Link to this heading">#</a></h3>
<p>We intend to include datamodules for the most popular datasets only.</p>
</section>
<section id="post-processing-methods">
<h3>Post-processing methods<a class="headerlink" href="#post-processing-methods" title="Link to this heading">#</a></h3>
<p>For now, we intend to follow scikit-learn style API for post-processing
methods (except that we use a validation dataset instead of a numpy array).
You may get inspiration from the already implemented
<a class="reference external" href="https://github.com/torch-uncertainty/torch-uncertainty/blob/dev/torch_uncertainty/post_processing/calibration/temperature_scaler.py">temperature-scaling</a>.</p>
</section>
</section>
<section id="license">
<h2>License<a class="headerlink" href="#license" title="Link to this heading">#</a></h2>
<p>If you feel that the current license is an obstacle to your contribution, let
us know, and we may reconsider. However, the models’ weights hosted on Hugging
Face are likely to remain Apache 2.0.</p>
</section>
</section>
</article>
<footer class="prev-next-footer d-print-none">
<div class="prev-next-area">
<a class="left-prev" href="generated/torch_uncertainty.callbacks.TUSegCheckpoint.html" title="previous page">
<i class="fa-solid fa-angle-left"></i>
<div class="prev-next-info">
<p class="prev-next-subtitle">previous</p>
<p class="prev-next-title">TUSegCheckpoint</p>
</div>
</a>
<a class="right-next" href="references.html" title="next page">
<div class="prev-next-info">
<p class="prev-next-subtitle">next</p>
<p class="prev-next-title">References</p>
</div>
<i class="fa-solid fa-angle-right"></i>
</a>
</div>
</footer>
</div>
<dialog id="pst-secondary-sidebar-modal"></dialog>
<div class="bd-sidebar-secondary bd-toc" id="pst-secondary-sidebar"><div class="sidebar-secondary-items sidebar-secondary__inner">
<div class="sidebar-secondary-item">
<div class="page-toc tocsection onthispage" id="pst-page-navigation-heading-2">
<i class="fa-solid fa-list"></i> On this page
  </div>
<nav aria-labelledby="pst-page-navigation-heading-2" class="page-toc" id="pst-page-toc-nav">
<ul class="pst-show_toc_level nav section-nav flex-column">
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#the-scope-of-torchuncertainty">The scope of TorchUncertainty</a></li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#common-guidelines">Common guidelines</a><ul class="nav section-nav flex-column">
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#clean-development-install-of-torchuncertainty">Clean development install of TorchUncertainty</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#build-the-documentation-locally">Build the documentation locally</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#guidelines">Guidelines</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#datasets-datamodules">Datasets &amp; Datamodules</a></li>
<li class="toc-h3 nav-item toc-entry"><a class="reference internal nav-link" href="#post-processing-methods">Post-processing methods</a></li>
</ul>
</li>
<li class="toc-h2 nav-item toc-entry"><a class="reference internal nav-link" href="#license">License</a></li>
</ul>
</nav></div>
<div class="sidebar-secondary-item">
<div class="tocsection sourcelink">
<a href="_sources/contributing.rst.txt">
<i class="fa-solid fa-file-lines"></i> Show Source
    </a>
</div>
</div>
</div></div>
</div>
<footer class="bd-footer-content">
</footer>
</main>
</div>
</div>
<!-- Scripts loaded after <body> so the DOM is not blocked -->
<script defer="" src="_static/scripts/bootstrap.js?digest=55c26ed414f5f8a31ebb"></script>
<script defer="" src="_static/scripts/pydata-sphinx-theme.js?digest=55c26ed414f5f8a31ebb"></script>
<footer class="bd-footer">
<div class="bd-footer__inner bd-page-width">
<div class="footer-items__center">
<div class="footer-item">
<p class="copyright">
    
      © Copyright 2026, Adrien Lafage and Olivier Laurent.
      <br/>
</p>
</div>
</div>
</div>
</footer>
</body>
</html>

About

Documentation of the TorchUncertainty library.

Topics

Contributing

Stars

2 stars

Watchers

1 watching

Forks

Contributors

Languages