文件历史

提交图

23 次代码提交

作者 SHA1 备注 提交日期
Hui Wen 0cd40abbb2 Remove explicit sklearn dependency from tutorial notebooks (#794) 2023-08-02 14:34:00 -04:00
Ulyana 7f12abf885 Add improved package import check for tutorials (#777)
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-07-27 17:56:47 -04:00
Elías Snorrason 64edc95630 Introduce Datalab (#614)
Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
Co-authored-by: Jesse Cummings <jecummin@mit.edu>
Co-authored-by: Jesse Cummings <jecummin@users.noreply.github.com>
Co-authored-by: Hui Wen <45724323+huiwengoh@users.noreply.github.com>
2023-04-25 09:26:43 -07:00
Jonas Mueller 7dd06d14a0 remove unnecessary TF warning suppression statements in tutorials (#544) 2022-11-26 11:25:58 -08:00
Anish Athalye d8cc2e5056 Fix details disclosure elements in docs (#456)
This patch makes the following fixes:

- Make summary text appear on the same line as the ">" arrow marker;
  prior to this patch, it was being pushed down to the next line because
  there were nested block elements inside the <summary> element
- Style details element to visually delineate collapsible content with
  dashed lines above and below the content
- Add syntax highlighting for code blocks in details disclosure elements
  (some were missing syntax highlighting)
- Hide a cell that was meant to be hidden in the audio tutorial

The summary element looked ugly due to a block element being present
inside the <summary>. This was present in the rendered docs even though
it was not explicitly in the source. Even though our source (in a
Markdown cell in a Jupyter notebook) looked like:

    <summary>Example text</summary>

The rendered docs had:

    <summary><p>Example text</p></summary>

The easy fix was to leave this as-is and fix the styling with CSS,
making all elements inside the summary to be displayed as inline
elements.

Where was the extra <p> tag coming from? Different Markdown parsers
handle mixed Markdown/HTML differently. We are using nbsphinx, which
does something especially weird [1]: converting from Markdown ->
reStructuredText -> HTML.

For example, consider the following Markdown:

    <details><summary>Summary</summary>

    Body.

    </details>

nbsphinx was first converting it to this reST:

    .. raw:: html

       <details>

    .. raw:: html

       <summary>

    Summary

    .. raw:: html

       </summary>

    Body.

    .. raw:: html

       </details>

And then this reST was being converted to HTML. This is where the extra
<p> was coming from.

One workaround for this behavior is to switch to raw HTML cells in the
notebook, rather than Markdown cells, and write pure HTML there. This
has the disadvantage that it's inconvenient when the content inside the
<details> has extra markup: Markdown is very convenient for that (e.g.,
for styling text), and having the contents being parsed as Markdown also
allows us to easily use syntax highlighting inside the body.

Another workaround is to use raw reST cells [2] and write the proper
reST directly (avoiding the bad Markdown -> reST conversion). This
preserves the ability to use convenient formatting (though with reST
instead of Markdown) as well as syntax-highlighted code blocks. For
example:

    .. raw:: html

        <details><summary>Summary</summary>

    .. code-block:: python

        def meaning_of_life():
            return 42

    .. raw:: html

        </details>

The above snippet produces the expected HTML, with syntax-highlighted
code in the body, and without the extra <p> inside the <summary>.

Rather than either of these workarounds, the most convenient one for
developers is to fix the issue using CSS, so that the Markdown cells in
the tutorials can be left as-is and no special care is required when
writing details disclosure elements, which is what this patch does.

[1]: https://github.com/spatialaudio/nbsphinx/blob/fc79fd1ac5ab6df225b256ef4ca203c58c5ad92b/src/nbsphinx.py#L1309
[2]: https://nbsphinx.readthedocs.io/en/0.8.9/raw-cells.html#reST
2022-09-16 12:11:05 -07:00
Jonas Mueller b9ab4ba57b suppress tensorflow warning logs in tutorials if not properly installed (#432)
* remove ineffective TF suppression lines

* suppress tensorflow logs in workflows tutorial

* formatting

* hidden cell comment

* move suppress code to hidden cell

* move suppression code to first hidden cell

* move suppression code to first cell

* supress tf logs in tabular tutorial

* optional code to hidden cells in audio tutorial

* suppress tf logs in multiannotator tutorial

* suppress tf logs in token tutorial

* move cross-val tutorial to appear last

* move cross-val tutorial to be last in main index

* move outlier before multiannotator in API list

* remove newline at end of cell
2022-09-13 00:47:21 -07:00
Jonas Mueller c307e9714f update workflows for post 2.0 (#427)
* update workflows for post 2.0

* formatting

* link for cleanlearning
2022-09-11 00:27:57 -07:00
Hui Wen bf83c553bf make pred_probs naming consistent in tutorials (#345)
* rename cv_pred_probs to pred_probs

* revert python version
2022-08-17 19:52:25 -07:00
Ulyana b481a74d0d Updated tutorials to include quickstart (#323)
* Added runnable package versioning for tutorials
Added quickstart at top of tutorials

* Addressed PR comments
* Fixed quickstart to include cleanlearning
* Set correct requirements.txt
* Updated y to labels

* Fixed y-> labels labeling issues

* Updated quickstart message/removed extra dependencies

* remove keras from package-versions

* more concise

* remove pathlib as explicit requirement

* remove pathlib version

* rewording

* true label -> given label

* remove venv from kernelspec

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-07-26 00:52:13 -07:00
Curtis G. Northcutt 7aa34a33ba Fix bug. get thresholds broken for multi_label 2022-05-20 21:55:32 -04:00
Yulv-git aede5bd7db Fix some typos. (#242) 2022-04-23 12:17:20 -04:00
Anish Athalye 79a7e8af82 Make small fixes (#235) 2022-04-20 14:16:14 -04:00
Wei Jing 7a8104c83f Add tutorial toc page (#230)
* add tutorials index page

* update link to all tutorials

* fix old readme links

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-04-18 13:02:24 -07:00
Curtis G. Northcutt d8ab4e910b fix black formatting compliance (#224)
* fix black formatting compliance

* remove codecov for verbose statements
2022-04-17 21:57:15 -04:00
Jonas Mueller 766c13b646 Make dataset tutorial runnable on website docs, improve pulldown formatting (#220)
* tutorial runnable on website, pulldown formatting

* add note re pulldown for colab users

* darkDF, remove auto-overflow handling

* tell colab users they can ignore bottom checks
2022-04-16 14:56:44 -07:00
Jonas Mueller 57733c704d Formats dataset health tutorial (#216)
* dataset health tutorial pulldown format

* tutorial ordering in sidebar

* pulldown format, bullet format

* reformat pulldown indepth tutorial

* shorten data fetching header

* adjust spacing
2022-04-15 18:15:23 -07:00
Johnson Kuan 1de5853043 Move HTML df display settings 2022-04-15 16:29:58 -07:00
Johnson Kuan 7ea03c6dbe Move HTML df display settings 2022-04-15 16:29:27 -07:00
Johnson Kuan 09432eb7b6 Configure DataFrame style 2022-04-15 15:57:05 -07:00
Johnson Kuan 9879428c6b Configure DataFrame style 2022-04-15 15:47:13 -07:00
Jonas Mueller 72a62edac3 Dark plots (#211)
* white background for plot

* fix quote

* darkplot
2022-04-15 02:18:08 -07:00
Jonas Mueller 9dd8420e67 Tutorial header-levels decreased (#210)
* tutorial header-levels decreased

* reduce plot size to docs output window
2022-04-14 21:35:14 -07:00
Wei Jing d397cdebb6 Add in-depth tutorial [WIP] (#208)
* add in-depth tutorial and remove pandas install in tutorials

Co-authored-by: Jonas Mueller <1390638+jwmueller@users.noreply.github.com>
2022-04-14 17:46:58 -07:00