Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

CONTRIBUTING.html 12 KB

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
  1. <!DOCTYPE html>
  2. <html class="writer-html5" lang="en" >
  3. <head>
  4. <meta charset="utf-8" />
  5. <meta name="viewport" content="width=device-width, initial-scale=1.0" />
  6. <title>Contribution Guidelines &mdash; SuperGradients 3.0.3 documentation</title>
  7. <link rel="stylesheet" href="_static/pygments.css" type="text/css" />
  8. <link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
  9. <link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
  10. <link rel="stylesheet" href="_static/custom.css" type="text/css" />
  11. <!--[if lt IE 9]>
  12. <script src="_static/js/html5shiv.min.js"></script>
  13. <![endif]-->
  14. <script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
  15. <script src="_static/jquery.js"></script>
  16. <script src="_static/underscore.js"></script>
  17. <script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
  18. <script src="_static/doctools.js"></script>
  19. <script src="_static/sphinx_highlight.js"></script>
  20. <script src="_static/js/theme.js"></script>
  21. <link rel="index" title="Index" href="genindex.html" />
  22. <link rel="search" title="Search" href="search.html" />
  23. </head>
  24. <body class="wy-body-for-nav">
  25. <div class="wy-grid-for-nav">
  26. <nav data-toggle="wy-nav-shift" class="wy-nav-side">
  27. <div class="wy-side-scroll">
  28. <div class="wy-side-nav-search" >
  29. <a href="index.html" class="icon icon-home"> SuperGradients
  30. </a>
  31. <div role="search">
  32. <form id="rtd-search-form" class="wy-form" action="search.html" method="get">
  33. <input type="text" name="q" placeholder="Search docs" />
  34. <input type="hidden" name="check_keywords" value="yes" />
  35. <input type="hidden" name="area" value="default" />
  36. </form>
  37. </div>
  38. </div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
  39. <p class="caption" role="heading"><span class="caption-text">Welcome To SuperGradients</span></p>
  40. <ul>
  41. <li class="toctree-l1"><a class="reference internal" href="welcome.html">Version 3 is out! Notebooks have been updated!</a></li>
  42. <li class="toctree-l1"><a class="reference internal" href="welcome.html#build-with-supergradients">Build with SuperGradients</a></li>
  43. <li class="toctree-l1"><a class="reference internal" href="welcome.html#quick-installation">Quick Installation</a></li>
  44. <li class="toctree-l1"><a class="reference internal" href="welcome.html#what-s-new">What’s New</a></li>
  45. <li class="toctree-l1"><a class="reference internal" href="welcome.html#coming-soon">Coming soon</a></li>
  46. <li class="toctree-l1"><a class="reference internal" href="welcome.html#table-of-content">Table of Content</a></li>
  47. <li class="toctree-l1"><a class="reference internal" href="welcome.html#getting-started">Getting Started</a></li>
  48. <li class="toctree-l1"><a class="reference internal" href="welcome.html#advanced-features">Advanced Features</a></li>
  49. <li class="toctree-l1"><a class="reference internal" href="welcome.html#installation-methods">Installation Methods</a></li>
  50. <li class="toctree-l1"><a class="reference internal" href="welcome.html#implemented-model-architectures">Implemented Model Architectures</a></li>
  51. <li class="toctree-l1"><a class="reference internal" href="welcome.html#documentation">Documentation</a></li>
  52. <li class="toctree-l1"><a class="reference internal" href="welcome.html#contributing">Contributing</a></li>
  53. <li class="toctree-l1"><a class="reference internal" href="welcome.html#citation">Citation</a></li>
  54. <li class="toctree-l1"><a class="reference internal" href="welcome.html#community">Community</a></li>
  55. <li class="toctree-l1"><a class="reference internal" href="welcome.html#license">License</a></li>
  56. <li class="toctree-l1"><a class="reference internal" href="welcome.html#deci-platform">Deci Platform</a></li>
  57. </ul>
  58. <p class="caption" role="heading"><span class="caption-text">Technical Documentation</span></p>
  59. <ul>
  60. <li class="toctree-l1"><a class="reference internal" href="super_gradients.common.html">Common package</a></li>
  61. <li class="toctree-l1"><a class="reference internal" href="super_gradients.training.html">Training package</a></li>
  62. </ul>
  63. </div>
  64. </div>
  65. </nav>
  66. <section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
  67. <i data-toggle="wy-nav-top" class="fa fa-bars"></i>
  68. <a href="index.html">SuperGradients</a>
  69. </nav>
  70. <div class="wy-nav-content">
  71. <div class="rst-content">
  72. <div role="navigation" aria-label="Page navigation">
  73. <ul class="wy-breadcrumbs">
  74. <li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
  75. <li>Contribution Guidelines</li>
  76. <li class="wy-breadcrumbs-aside">
  77. <a href="_sources/CONTRIBUTING.md.txt" rel="nofollow"> View page source</a>
  78. </li>
  79. </ul>
  80. <hr/>
  81. </div>
  82. <div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
  83. <div itemprop="articleBody">
  84. <div class="section" id="contribution-guidelines">
  85. <h1>Contribution Guidelines<a class="headerlink" href="#contribution-guidelines" title="Permalink to this heading"></a></h1>
  86. <p>We appreciate all contributions. If you are planning to contribute back bug-fixes, please do so without any further discussion. If you plan to contribute new features, utility functions or extensions, please first open an issue and discuss the feature with us.</p>
  87. <p>Here are a few more things to know:</p>
  88. <ul class="simple">
  89. <li><p><span class="xref myst">How to Contirbute</span></p></li>
  90. <li><p><span class="xref myst">Jupyter Notebooks Contribution</span></p></li>
  91. <li><p><span class="xref myst">Code Style Guidelines</span></p></li>
  92. </ul>
  93. <div class="section" id="how-to-contribute">
  94. <h2>How to Contribute<a class="headerlink" href="#how-to-contribute" title="Permalink to this heading"></a></h2>
  95. <p>Here is a simple guideline to get you started with your first contribution</p>
  96. <ol class="arabic simple">
  97. <li><p>Use <a class="reference external" href="https://github.com/Deci-AI/super-gradients/issues">issues</a> to discuss the suggested changes. Create an issue describing changes if necessary and add labels to ease orientation.</p></li>
  98. <li><p><a class="reference external" href="https://help.github.com/articles/fork-a-repo/">Fork super-gradients</a> so you can make local changes and test them.</p></li>
  99. <li><p>Create a new branch for the issue. The branch naming convention is enforced by the CI/CD so please make sure you are using your_username/your_branch_name convention otherwise it will fail.</p></li>
  100. <li><p>Create relevant tests for the issue, please make sure you are covering unit, integration and e2e tests where required.</p></li>
  101. <li><p>Make code changes.</p></li>
  102. <li><p>Ensure all the tests pass and code formatting is up to standards, and follows <a class="reference external" href="https://www.python.org/dev/peps/pep-0008/">PEP8</a>.</p></li>
  103. </ol>
  104. <!--1. We use [pre-commit](https://pre-commit.com/) package to run our pre-commit hooks. Black formatter and flake8 linter will be ran on each commit. In order to set up pre-commit on your machine, follow the steps here, please note that you only need to run these steps the first time you use pre-commit for this project.)
  105. * Install pre-commit from pypi
  106. ```
  107. $ pip install pre-commit
  108. ```
  109. * Set up pre-commit inside super-gradients repo which will create .git/hooks directory.
  110. ```
  111. $ pre-commit install
  112. ```
  113. ```
  114. $ git commit -m "message"
  115. ```
  116. * Each time you commit, git will run the pre-commit hooks (black and flake8 for now) on any python files that are getting committed and are part of the git index. If black modifies/formats the file, or if flake8 finds any linting errors, the commit will not succeed. You will need to stage the file again if black changed the file, or fix the issues identified by flake8 and and stage it again.
  117. * To run pre-commit on all files just run
  118. ```
  119. $ pre-commit run --all-files
  120. ```
  121. -->
  122. <ol class="arabic simple" start="7">
  123. <li><p>Create a pull request against <b>master</b> branch.</p></li>
  124. </ol>
  125. </div>
  126. <div class="section" id="jupyter-notebooks-contribution">
  127. <h2>Jupyter Notebooks Contribution<a class="headerlink" href="#jupyter-notebooks-contribution" title="Permalink to this heading"></a></h2>
  128. <p>Pulling updates from remote might cause merge conflicts with jupyter notebooks. The tool <a class="reference external" href="https://nbdime.readthedocs.io/en/latest/">nbdime</a> might solve this.</p>
  129. <ul class="simple">
  130. <li><p>Installing nbdime</p></li>
  131. </ul>
  132. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">pip</span> <span class="n">install</span> <span class="n">ndime</span>
  133. </pre></div>
  134. </div>
  135. <ul class="simple">
  136. <li><p>Run a diff between two notebooks</p></li>
  137. </ul>
  138. <div class="highlight-default notranslate"><div class="highlight"><pre><span></span><span class="n">nbdiff</span> <span class="n">notebook_1</span><span class="o">.</span><span class="n">ipynb</span> <span class="n">notebook_2</span><span class="o">.</span><span class="n">ipynb</span>
  139. </pre></div>
  140. </div>
  141. </div>
  142. <div class="section" id="code-style-guidelines">
  143. <h2>Code Style Guidelines<a class="headerlink" href="#code-style-guidelines" title="Permalink to this heading"></a></h2>
  144. <p>We are working hard to make sure all the code in this repository is readable, maintainable and testable.
  145. We follow the Google docstring guidelines outlined on this <a class="reference external" href="https://github.com/google/styleguide/blob/gh-pages/pyguide.md#38-comments-and-docstrings">styleguide</a> page. For example:</p>
  146. <div class="highlight-python notranslate"><div class="highlight"><pre><span></span> <span class="k">def</span> <span class="nf">python_function</span><span class="p">(</span><span class="n">first_argument</span><span class="p">:</span> <span class="nb">int</span><span class="p">,</span> <span class="n">second_argument</span><span class="p">:</span> <span class="nb">int</span><span class="p">)</span> <span class="o">-&gt;</span> <span class="nb">bool</span><span class="p">:</span>
  147. <span class="sd">&quot;&quot;&quot;</span>
  148. <span class="sd"> This function will do something with the two arguments.</span>
  149. <span class="sd"> Args:</span>
  150. <span class="sd"> first_argument (int): the first argument to the function</span>
  151. <span class="sd"> second_argument (int): the second argument to the function</span>
  152. <span class="sd"> Raises:</span>
  153. <span class="sd"> Exception: arguments should be ints not floats</span>
  154. <span class="sd"> Returns:</span>
  155. <span class="sd"> bool: whether or not the calculation was correct</span>
  156. <span class="sd"> &quot;&quot;&quot;</span>
  157. </pre></div>
  158. </div>
  159. </div>
  160. <div class="section" id="documentation">
  161. <h2>Documentation<a class="headerlink" href="#documentation" title="Permalink to this heading"></a></h2>
  162. <p>We use GitHub Pages for technical documentation hosting on https://deci-ai.github.io/super-gradients/welcome.html <br>
  163. To generate the docs based on the current work tree, run: <br>
  164. <code>./scripts/generate_docs.sh</code> <br><br>
  165. And the documentation will automatically update, based on <code>documentation/</code>. <br>
  166. The new documentation HTML will be generated to <code>docs/</code>. <br>
  167. Once <code>docs/</code> is committed and pushed, GitHub Pages will use it.<br>
  168. The step of documentation update is currently manual.</p>
  169. </div>
  170. </div>
  171. </div>
  172. </div>
  173. <footer>
  174. <hr/>
  175. <div role="contentinfo">
  176. <p>&#169; Copyright 2021, SuperGradients team.</p>
  177. </div>
  178. Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
  179. <a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
  180. provided by <a href="https://readthedocs.org">Read the Docs</a>.
  181. </footer>
  182. </div>
  183. </div>
  184. </section>
  185. </div>
  186. <script>
  187. jQuery(function () {
  188. SphinxRtdTheme.Navigation.enable(true);
  189. });
  190. </script>
  191. </body>
  192. </html>
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...