Skip to content

Commit

Permalink
build(deps): bump the production group across 1 directory with 5 upda…
Browse files Browse the repository at this point in the history
…tes (#976)

Bumps the production group with 5 updates in the / directory:

| Package | From | To |
| --- | --- | --- |
| [numpy](https://github.com/numpy/numpy) | `2.1.2` | `2.2.1` |
| [pillow](https://github.com/python-pillow/Pillow) | `11.0.0` |
`11.1.0` |
| [polars](https://github.com/pola-rs/polars) | `1.8.2` | `1.19.0` |
| [scikit-learn](https://github.com/scikit-learn/scikit-learn) | `1.5.2`
| `1.6.0` |
| [transformers](https://github.com/huggingface/transformers) | `4.46.1`
| `4.47.1` |


Updates `numpy` from 2.1.2 to 2.2.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/numpy/numpy/releases">numpy's
releases</a>.</em></p>
<blockquote>
<h2>2.2.1 (DEC 21, 2024)</h2>
<h1>NumPy 2.2.1 Release Notes</h1>
<p>NumPy 2.2.1 is a patch release following 2.2.0. It fixes bugs found
after the 2.2.0 release and has several maintenance pins to work around
upstream changes.</p>
<p>There was some breakage in downstream projects following the 2.2.0
release due to updates to NumPy typing. Because of problems due to MyPy
defects, we recommend using basedpyright for type checking, it can be
installed from PyPI. The Pylance extension for Visual Studio Code is
also based on Pyright. Problems that persist when using basedpyright
should be reported as issues on the NumPy github site.</p>
<p>This release supports Python 3.10-3.13.</p>
<h2>Contributors</h2>
<p>A total of 9 people contributed to this release. People with a
&quot;+&quot; by
their names contributed a patch for the first time.</p>
<ul>
<li>Charles Harris</li>
<li>Joren Hammudoglu</li>
<li>Matti Picus</li>
<li>Nathan Goldbaum</li>
<li>Peter Hawkins</li>
<li>Simon Altrogge</li>
<li>Thomas A Caswell</li>
<li>Warren Weckesser</li>
<li>Yang Wang +</li>
</ul>
<h2>Pull requests merged</h2>
<p>A total of 12 pull requests were merged for this release.</p>
<ul>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27935">#27935</a>:
MAINT: Prepare 2.2.x for further development</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27950">#27950</a>:
TEST: cleanups</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27958">#27958</a>:
BUG: fix use-after-free error in npy_hashtable.cpp (<a
href="https://redirect.github.com/numpy/numpy/issues/27955">#27955</a>)</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27959">#27959</a>:
BLD: add missing include</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27982">#27982</a>:
BUG:fix compile error libatomic link test to meson.build</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27990">#27990</a>:
TYP: Fix falsely rejected value types in
<code>ndarray.__setitem__</code></li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27991">#27991</a>:
MAINT: Don't wrap <code>#include &lt;Python.h&gt;</code> with
<code>extern &quot;C&quot;</code></li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/27993">#27993</a>:
BUG: Fix segfault in stringdtype lexsort</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/28006">#28006</a>:
MAINT: random: Tweak module code in mtrand.pyx to fix a Cython...</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/28007">#28007</a>:
BUG: Cython API was missing NPY_UINTP.</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/28021">#28021</a>:
CI: pin scipy-doctest to 1.5.1</li>
<li><a
href="https://redirect.github.com/numpy/numpy/pull/28044">#28044</a>:
TYP: allow <code>None</code> in operand sequence of nditer</li>
</ul>
<h2>Checksums</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/numpy/numpy/commit/7469245786b57405b7ae264b386400061b3b25d3"><code>7469245</code></a>
Merge pull request <a
href="https://redirect.github.com/numpy/numpy/issues/28047">#28047</a>
from charris/prepare-2.2.1</li>
<li><a
href="https://github.com/numpy/numpy/commit/acb051e2a3fc90c687079dbe8a8b56c2af507eb3"><code>acb051e</code></a>
REL: Prepare for the NumPy 2.2.1 release [wheel build]</li>
<li><a
href="https://github.com/numpy/numpy/commit/28a091a4efde3488b20355d6b6ad7100d2c64076"><code>28a091a</code></a>
Merge pull request <a
href="https://redirect.github.com/numpy/numpy/issues/28044">#28044</a>
from charris/backport-28039</li>
<li><a
href="https://github.com/numpy/numpy/commit/723605bcaf472514fbb34947e5b61daa135c0769"><code>723605b</code></a>
TST: Add test for allowing <code>None</code> in operand sequence passed
to <code>nditer</code></li>
<li><a
href="https://github.com/numpy/numpy/commit/554739ee490013cf2757c1ef1420d120d607836b"><code>554739e</code></a>
TYP: allow <code>None</code> in operand sequence of nditer</li>
<li><a
href="https://github.com/numpy/numpy/commit/31bc4c8b8ec732582e2a0513afd105b594d15d95"><code>31bc4c8</code></a>
Merge pull request <a
href="https://redirect.github.com/numpy/numpy/issues/28021">#28021</a>
from charris/backport-28020</li>
<li><a
href="https://github.com/numpy/numpy/commit/32f52a37bc0f7ba3ab0321e57ba8719c15848772"><code>32f52a3</code></a>
CI: pin scipy-doctest to 1.5.1 (<a
href="https://redirect.github.com/numpy/numpy/issues/28020">#28020</a>)</li>
<li><a
href="https://github.com/numpy/numpy/commit/6219aeb6f6d1d8be54339401c3634b9d7a6c063e"><code>6219aeb</code></a>
Merge pull request <a
href="https://redirect.github.com/numpy/numpy/issues/28007">#28007</a>
from charris/backport-28005</li>
<li><a
href="https://github.com/numpy/numpy/commit/eb7071ca103cf8cfbd5a61ce2ef2bb21fb9638a0"><code>eb7071c</code></a>
Merge pull request <a
href="https://redirect.github.com/numpy/numpy/issues/28006">#28006</a>
from charris/backport-28003</li>
<li><a
href="https://github.com/numpy/numpy/commit/4f82c3262f8a0a0229d0483b53e47694118b32a5"><code>4f82c32</code></a>
BUG: Cython API was missing NPY_UINTP.</li>
<li>Additional commits viewable in <a
href="https://github.com/numpy/numpy/compare/v2.1.2...v2.2.1">compare
view</a></li>
</ul>
</details>
<br />

Updates `pillow` from 11.0.0 to 11.1.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/python-pillow/Pillow/releases">pillow's
releases</a>.</em></p>
<blockquote>
<h2>11.1.0</h2>
<p><a
href="https://pillow.readthedocs.io/en/stable/releasenotes/11.1.0.html">https://pillow.readthedocs.io/en/stable/releasenotes/11.1.0.html</a></p>
<h2>Documentation</h2>
<ul>
<li>Added release notes for writing XMP bytes to JPEG and MPO <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8627">#8627</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Added release notes for using zlib-ng instead of zlib <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8599">#8599</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Replace python-pillow.org with python-pillow.github.io <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8586">#8586</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>ImageFile tile is never None <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8582">#8582</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Only use start year in copyright, remove end years <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8577">#8577</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Python 3.12 is tested on MinGW <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8575">#8575</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Use brew formula to install libraqm <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8574">#8574</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Added link to GitHub releases in CHANGES <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8571">#8571</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Release drafter: move removals, deprecations, documentation up, and
uncategorised changes last <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8570">#8570</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Updated macOS tested Pillow versions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8538">#8538</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Use test image filename <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8534">#8534</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update Windows 11 Arm64 tested versions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8523">#8523</a>
[<a href="https://github.com/nulano"><code>@​nulano</code></a>]</li>
<li>Move MPO into &quot;Fully supported formats&quot; <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8504">#8504</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update license to MIT-CMU <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8490">#8490</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
</ul>
<h2>Dependencies</h2>
<ul>
<li>Update dependency mypy to v1.14.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8643">#8643</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Update dependency mypy to v1.14.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8613">#8613</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Updated libwebp to 1.5.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8612">#8612</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated libXau to 1.0.12 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8598">#8598</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated libjpeg-turbo to 3.1.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8595">#8595</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated harfbuzz to 10.1.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8533">#8533</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Updated openjpeg to 2.5.3 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8591">#8591</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Update dependency cibuildwheel to v2.22.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8580">#8580</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Update codecov/codecov-action action to v5 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8557">#8557</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Migrate renovate config <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8527">#8527</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Update dependency mypy to v1.13.0 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8491">#8491</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
<li>Update dependency mypy to v1.12.1 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8487">#8487</a>
[<a href="https://github.com/renovate"><code>@​renovate</code></a>]</li>
</ul>
<h2>Testing</h2>
<ul>
<li>Added CentOS Stream 10 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8646">#8646</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Use monkeypatch <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8628">#8628</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Pass file handle to ContainerIO <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8625">#8625</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Use register_handler <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8499">#8499</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Use monkeypatch <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8626">#8626</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Test libjpeg-turbo on macOS <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8596">#8596</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Test 3.13t (free-threaded) from Quansight-Labs/setup-python on Linux
and macOS <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8565">#8565</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Run gcc problem matcher on Python 3.13 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8541">#8541</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Add trove-classifiers&gt;=2024.10.12 to 'tests' extra and use for
Windows CI <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8514">#8514</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Apply security fixes to GitHub Actions <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8526">#8526</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Remove unused <code>gcov: true</code> for codecov-action@v4 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8521">#8521</a>
[<a href="https://github.com/hugovk"><code>@​hugovk</code></a>]</li>
<li>Added Fedora 41 <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8520">#8520</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
<li>Do not repeatedly save to the same path <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8512">#8512</a>
[<a
href="https://github.com/radarhere"><code>@​radarhere</code></a>]</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/python-pillow/Pillow/blob/main/CHANGES.rst">pillow's
changelog</a>.</em></p>
<blockquote>
<h2>11.1.0 and newer</h2>
<p>See GitHub Releases:</p>
<ul>
<li><a
href="https://github.com/python-pillow/Pillow/releases">https://github.com/python-pillow/Pillow/releases</a></li>
</ul>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/python-pillow/Pillow/commit/4c1aed801e43c6b307e7135279ca1dbc02bbf052"><code>4c1aed8</code></a>
11.1.0 version bump</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/dfb368a7e904a7ed92012cf89a4e4804d7f410c8"><code>dfb368a</code></a>
Merge pull request <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8651">#8651</a>
from radarhere/blp</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/5d998d3fedb06666ae680e3ebe3f3547a9059727"><code>5d998d3</code></a>
Improved coverage</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/6b75e0687513fcdca8683699b5ce880a935ad8ce"><code>6b75e06</code></a>
Do not reread start of header in decoder</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/b89cc09944b4add584967bf1fa21208e92442def"><code>b89cc09</code></a>
Corrected BLP1 alpha depth handling</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/aa0f4127b8040b82822808fa2037fea1a162d3c5"><code>aa0f412</code></a>
Merge pull request <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8646">#8646</a>
from radarhere/centos</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/e34427167ddbaeece43490c4054c1e17fa21d77b"><code>e344271</code></a>
Added CentOS Stream 10</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/17f09f39936ddc60bb8348e74359b5c5b3de25b9"><code>17f09f3</code></a>
Merge pull request <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8644">#8644</a>
from radarhere/c99</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/d42f22baafca30050f4fc8b6bafcc39ef624d685"><code>d42f22b</code></a>
Added release notes</li>
<li><a
href="https://github.com/python-pillow/Pillow/commit/c7026d9bc84dc80e2fb3bbde901f77a40ef372b9"><code>c7026d9</code></a>
Merge pull request <a
href="https://redirect.github.com/python-pillow/Pillow/issues/8642">#8642</a>
from radarhere/bigtiff</li>
<li>Additional commits viewable in <a
href="https://github.com/python-pillow/Pillow/compare/11.0.0...11.1.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `polars` from 1.8.2 to 1.19.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/pola-rs/polars/releases">polars's
releases</a>.</em></p>
<blockquote>
<h2>Python Polars 1.19.0</h2>
<h2>🚀 Performance improvements</h2>
<ul>
<li>Collapse expanded filters in eager (<a
href="https://redirect.github.com/pola-rs/polars/issues/20493">#20493</a>)</li>
<li>Remove predicate from <code>IR::DataFrame</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20492">#20492</a>)</li>
<li>Use different binview dedup strategy depending on chunks ratio (<a
href="https://redirect.github.com/pola-rs/polars/issues/20451">#20451</a>)</li>
<li>Generalize the <code>arg_sort</code> fast path onto
<code>Column</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20437">#20437</a>)</li>
<li>Dedup binviews up front (<a
href="https://redirect.github.com/pola-rs/polars/issues/20449">#20449</a>)</li>
<li>Re-enable common subplan elim for new-streaming engine (<a
href="https://redirect.github.com/pola-rs/polars/issues/20443">#20443</a>)</li>
<li>Don't collect all LHS arrays in gather (<a
href="https://redirect.github.com/pola-rs/polars/issues/20441">#20441</a>)</li>
<li>Remove prepare_series for gather kernels (<a
href="https://redirect.github.com/pola-rs/polars/issues/20439">#20439</a>)</li>
<li>Don't always take all data buffers when gathering views (<a
href="https://redirect.github.com/pola-rs/polars/issues/20435">#20435</a>)</li>
</ul>
<h2>✨ Enhancements</h2>
<ul>
<li>Add <code>Int128</code> IO support for csv &amp; ipc (<a
href="https://redirect.github.com/pola-rs/polars/issues/20535">#20535</a>)</li>
<li>Support arbitrary expressions in 'join_where' (<a
href="https://redirect.github.com/pola-rs/polars/issues/20525">#20525</a>)</li>
<li>Allow use of Python types in <code>cs.by_dtype</code> and
<code>col</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20491">#20491</a>)</li>
<li>Add an &quot;include_file_paths&quot; parameter to
<code>read_excel</code> and <code>read_ods</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20476">#20476</a>)</li>
<li>Allow more join lossless casting (<a
href="https://redirect.github.com/pola-rs/polars/issues/20474">#20474</a>)</li>
<li>Accept more generic <code>Iterable[bool]</code> in Series.filter (<a
href="https://redirect.github.com/pola-rs/polars/issues/20431">#20431</a>)</li>
<li>Allow loading data from multiple Excel/ODS workbooks and worksheets
(<a
href="https://redirect.github.com/pola-rs/polars/issues/20465">#20465</a>)</li>
</ul>
<h2>🐞 Bug fixes</h2>
<ul>
<li>Output index type instead of u32 for <code>sum_horizontal</code>
with boolean inputs (<a
href="https://redirect.github.com/pola-rs/polars/issues/20531">#20531</a>)</li>
<li>Fix more global categorical issues (<a
href="https://redirect.github.com/pola-rs/polars/issues/20547">#20547</a>)</li>
<li>Update eager join doctest on multiple columns (<a
href="https://redirect.github.com/pola-rs/polars/issues/20542">#20542</a>)</li>
<li>Revert categorical unique code (<a
href="https://redirect.github.com/pola-rs/polars/issues/20540">#20540</a>)</li>
<li>Add <code>unique</code> fast path for empty categoricals (<a
href="https://redirect.github.com/pola-rs/polars/issues/20536">#20536</a>)</li>
<li>Fix various <code>Int128</code> operations (<a
href="https://redirect.github.com/pola-rs/polars/issues/20515">#20515</a>)</li>
<li>Fix global cat unique (<a
href="https://redirect.github.com/pola-rs/polars/issues/20524">#20524</a>)</li>
<li>Fix union (<a
href="https://redirect.github.com/pola-rs/polars/issues/20523">#20523</a>)</li>
<li>Fix rolling aggregations for various integer types (<a
href="https://redirect.github.com/pola-rs/polars/issues/20512">#20512</a>)</li>
<li>Ensure <code>ignore_nulls</code> is respected in horizontal sum/mean
(<a
href="https://redirect.github.com/pola-rs/polars/issues/20469">#20469</a>)</li>
<li>Fix incorrectly added sorted flag after append for lexically ordered
categorical series (<a
href="https://redirect.github.com/pola-rs/polars/issues/20414">#20414</a>)</li>
<li>More <code>Int128</code> testing and related fixes (<a
href="https://redirect.github.com/pola-rs/polars/issues/20494">#20494</a>)</li>
<li>Validate column names in <code>unique()</code> for empty DataFrames
(<a
href="https://redirect.github.com/pola-rs/polars/issues/20411">#20411</a>)</li>
<li>Implement <code>list.min</code> and <code>list.max</code> for
<code>list[i128]</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20488">#20488</a>)</li>
<li>Decimal from physical in horizontal min/max and shift (<a
href="https://redirect.github.com/pola-rs/polars/issues/20487">#20487</a>)</li>
<li>Don't remove sort if first/last strategy is set in unique (<a
href="https://redirect.github.com/pola-rs/polars/issues/20481">#20481</a>)</li>
<li>Fix join literal behavior (<a
href="https://redirect.github.com/pola-rs/polars/issues/20477">#20477</a>)</li>
<li>Validate asof join by args in IR resolving phase (<a
href="https://redirect.github.com/pola-rs/polars/issues/20473">#20473</a>)</li>
<li>Fix <code>align_frames</code> with single row panicking (<a
href="https://redirect.github.com/pola-rs/polars/issues/20466">#20466</a>)</li>
<li>Allow multiple column sort for Decimal (<a
href="https://redirect.github.com/pola-rs/polars/issues/20452">#20452</a>)</li>
<li>Fix mode panicking for String dtype (<a
href="https://redirect.github.com/pola-rs/polars/issues/20458">#20458</a>)</li>
<li>Return correct schema for <code>sum_horizontal</code> with boolean
dtype (<a
href="https://redirect.github.com/pola-rs/polars/issues/20459">#20459</a>)</li>
<li>Fix return type for <code>add_business_days</code>,
<code>millennium</code>, <code>century</code> and <code>combine</code>
methods in <code>Series.dt</code> namespace (<a
href="https://redirect.github.com/pola-rs/polars/issues/20436">#20436</a>)</li>
</ul>
<h2>📖 Documentation</h2>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/pola-rs/polars/commit/841c387d99d7024037556c4ef79d96bf2caac397"><code>841c387</code></a>
Python Polars 1.19.0 (<a
href="https://redirect.github.com/pola-rs/polars/issues/20552">#20552</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/da0b58936ee544c92859ea77df39c6a21370dbe9"><code>da0b589</code></a>
fix: Output index type instead of u32 for <code>sum_horizontal</code>
with boolean input...</li>
<li><a
href="https://github.com/pola-rs/polars/commit/409f09158bf95bbda78dfaa2624d59adcdcd3412"><code>409f091</code></a>
chore: Increase categorical test coverage (<a
href="https://redirect.github.com/pola-rs/polars/issues/20514">#20514</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/15175999972720195b41205a5c30e42d824055ff"><code>1517599</code></a>
fix: Fix more global categorical issues (<a
href="https://redirect.github.com/pola-rs/polars/issues/20547">#20547</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/7c64640ab4ce2b669b3af15fb20793b910f91c1a"><code>7c64640</code></a>
fix: Update eager join doctest on multiple columns (<a
href="https://redirect.github.com/pola-rs/polars/issues/20542">#20542</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/9ce1c070dfae7ecef9664f902fce3697712f4186"><code>9ce1c07</code></a>
ci: Report wheel sizes (<a
href="https://redirect.github.com/pola-rs/polars/issues/20541">#20541</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/ca36b66110e4c73b116c91d0f7d74c9fd0377ed4"><code>ca36b66</code></a>
fix: Revert categorical unique code (<a
href="https://redirect.github.com/pola-rs/polars/issues/20540">#20540</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/58c17455390da12615e5a13f68ebc69d0d554eba"><code>58c1745</code></a>
docs(python): Fix typo in <code>DataFrame.cast</code> (<a
href="https://redirect.github.com/pola-rs/polars/issues/20532">#20532</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/5f4499773678fe3104daa44646794686d82f273e"><code>5f44997</code></a>
feat: Add <code>Int128</code> IO support for csv &amp; ipc (<a
href="https://redirect.github.com/pola-rs/polars/issues/20535">#20535</a>)</li>
<li><a
href="https://github.com/pola-rs/polars/commit/5c9bb7189f220d9064034b4c03175cf841c06d77"><code>5c9bb71</code></a>
fix: Add <code>unique</code> fast path for empty categoricals (<a
href="https://redirect.github.com/pola-rs/polars/issues/20536">#20536</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/pola-rs/polars/compare/py-1.8.2...py-1.19.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `scikit-learn` from 1.5.2 to 1.6.0
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/scikit-learn/scikit-learn/releases">scikit-learn's
releases</a>.</em></p>
<blockquote>
<h2>Scikit-learn 1.6.0</h2>
<p>We're happy to announce the 1.6.0 release.</p>
<p>You can read the release highlights under <a
href="https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_1_6_0.html">https://scikit-learn.org/stable/auto_examples/release_highlights/plot_release_highlights_1_6_0.html</a>
and the long version of the change log under <a
href="https://scikit-learn.org/stable/whats_new/v1.6.html">https://scikit-learn.org/stable/whats_new/v1.6.html</a></p>
<p>This version supports Python versions 3.9 to 3.13 and features an
experimental support of free-threaded CPython.</p>
<p>You can upgrade with pip as usual:</p>
<pre><code>pip install -U scikit-learn
</code></pre>
<p>The conda-forge builds can be installed using:</p>
<pre><code>conda install -c conda-forge scikit-learn
</code></pre>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/1fecc100315d2849df114b101d4ea6d5c0977eb5"><code>1fecc10</code></a>
trigger wheel builder [cd build]</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/dcce20044f6cb3d68a547df861bfa4485707e790"><code>dcce200</code></a>
link release highlights from the changelog</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/7015ee60dc5e5c9447bb31c7263a7c97f63a36c7"><code>7015ee6</code></a>
DOC Release Highlights for version 1.6 (<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30392">#30392</a>)</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/09c5c00eb3567c21683629d59d5fec2328dbd5fd"><code>09c5c00</code></a>
DOC Update <code>DummyRegressor.fit</code> docstring to be more precise
(<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30410">#30410</a>)</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/4142775215ae927060762ad11fcfdc284cdac4b8"><code>4142775</code></a>
DOC Fix example comment being rendered as text (<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30412">#30412</a>)</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/034b0d190dc8b07785b4d14046ccbf7ab2c3a16c"><code>034b0d1</code></a>
DOC Fix broken ref (<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30407">#30407</a>)</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/384aeba121c00538436431e54ffae9608386c860"><code>384aeba</code></a>
generate changelog</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/ea2510c880c4fef33c040c0f8d6ad3031dfc8b4f"><code>ea2510c</code></a>
bump version</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/ba83d1620dd666aab17453eed9a926a863087809"><code>ba83d16</code></a>
FIX KNeighbor classes correctly set positive_only tag (<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30372">#30372</a>)</li>
<li><a
href="https://github.com/scikit-learn/scikit-learn/commit/03d90f3278c96c3769fa8d6a66f38e23fe7c5c3b"><code>03d90f3</code></a>
FIX test_csr_polynomial_expansion_index_overflow on [scipy-dev] (<a
href="https://redirect.github.com/scikit-learn/scikit-learn/issues/30393">#30393</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/scikit-learn/scikit-learn/compare/1.5.2...1.6.0">compare
view</a></li>
</ul>
</details>
<br />

Updates `transformers` from 4.46.1 to 4.47.1
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/huggingface/transformers/releases">transformers's
releases</a>.</em></p>
<blockquote>
<h2>v4.47.1</h2>
<h1>Patch release v4.47.1</h1>
<p>We waited a little bit to make sure it was stable, thanks <a
href="https://github.com/winglian"><code>@​winglian</code></a> for
double checking and everyone for the fixes!</p>
<ul>
<li>
<p>Fix GA loss bugs and add unit test (<a
href="https://github.com/your-repo/pull/35121">#35121</a>)
Contributed by <a
href="https://github.com/techkang"><code>@​techkang</code></a> and <a
href="https://github.com/ArthurZucker"><code>@​ArthurZucker</code></a>.</p>
</li>
<li>
<p>Fix num_items_in_batch not being an integer (<a
href="https://github.com/your-repo/pull/35115">#35115</a>)
Contributed by <a
href="https://github.com/xspirus"><code>@​xspirus</code></a>.</p>
</li>
<li>
<p>Fix FSDP no longer working (<a
href="https://github.com/your-repo/pull/35212">#35212</a>)
Contributed by <a
href="https://github.com/muellerzr"><code>@​muellerzr</code></a>.</p>
</li>
<li>
<p>Don't use no_sync when DeepSpeed doesn't support it for certain ZeRO
configurations (<a
href="https://github.com/your-repo/pull/35212">#35212</a>)
Contributed by <a
href="https://github.com/winglian"><code>@​winglian</code></a>.</p>
</li>
<li>
<p>Only import torch.distributed if it is available (<a
href="https://github.com/your-repo/pull/35133">#35133</a>)
Contributed by <a
href="https://github.com/GaetanLepage"><code>@​GaetanLepage</code></a>.</p>
</li>
<li>
<p>[Whisper] Patch float type on MPS (<a
href="https://github.com/your-repo/pull/35295">#35295</a>)
Contributed by <a
href="https://github.com/eustlb"><code>@​eustlb</code></a>. 🔜 we should
probably have MPS CIs to avoid repeating this!</p>
</li>
</ul>
<h2>v4.47.0: PaliGemma-2, I-JEPA, OLMo-2, LayerSkip, Tensor
Parallel</h2>
<h2>New models</h2>
<h3>PaliGemma-2</h3>
<p>PaliGemma 2 and PaliGemma are lightweight open vision-language models
(VLM) inspired by <a href="https://arxiv.org/abs/2310.09199">PaLI-3</a>,
and based on open components like the <a
href="https://arxiv.org/abs/2303.15343">SigLIP vision model</a> and the
<a href="https://arxiv.org/abs/2403.08295">Gemma language model</a>.
PaliGemma takes both images and text as inputs and can answer questions
about images with detail and context, meaning that PaliGemma can perform
deeper analysis of images and provide useful insights, such as
captioning for images and short videos, object detection, and reading
text embedded within images.</p>
<p>PaliGemma 2 is available in 3B, 10B, and 28B parameter sizes, which
are based on Gemma 2 2B, 9B, and 27B models, respectively. The original
PaliGemma models are available in the 3B size. For more information on
Gemma model variants, see the <a
href="https://ai.google.dev/gemma/docs/get_started#models-list">Gemma
models list</a>. PaliGemma model variants support different pixel
resolutions for image inputs, including 224 x 224, 448 x 448, and 896 x
896 pixels.</p>
<!-- raw HTML omitted -->
<h3>I-JEPA</h3>
<p>The I-JEPA model was proposed in <a
href="https://arxiv.org/pdf/2301.08243.pdf">Image-based Joint-Embedding
Predictive Architecture</a> by Mahmoud Assran, Quentin Duval, Ishan
Misra, Piotr Bojanowski, Pascal Vincent, Michael Rabbat, Yann LeCun,
Nicolas Ballas. I-JEPA is a self-supervised learning method that
predicts the representations of one part of an image based on other
parts of the same image. This approach focuses on learning semantic
features without relying on pre-defined invariances from hand-crafted
data transformations, which can bias specific tasks, or on filling in
pixel-level details, which often leads to less meaningful
representations.</p>
<!-- raw HTML omitted -->
<ul>
<li>Add I-JEPA by <a
href="https://github.com/jmtzt"><code>@​jmtzt</code></a> in <a
href="https://redirect.github.com/huggingface/transformers/issues/33125">#33125</a></li>
</ul>
<h3>OLMo 2</h3>
<!-- raw HTML omitted -->
<p>The OLMo2 model is the successor of the OLMo model, which was
proposed in <a href="https://arxiv.org/abs/2402.00838">OLMo:
Accelerating the Science of Language Models</a>.</p>
<p>The architectural changes from the original OLMo model to this model
are:</p>
<ul>
<li>RMSNorm is used instead of standard layer norm.</li>
<li>Norm is applied to attention queries and keys.</li>
<li>Norm is applied after attention/feedforward layers rather than
before.</li>
</ul>
<!-- raw HTML omitted -->
</blockquote>
<p>... (truncated)</p>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/huggingface/transformers/commit/241c04d36867259cdf11dbb4e9d9a60f9cb65ebc"><code>241c04d</code></a>
[Whisper] patch float type on mps (<a
href="https://redirect.github.com/huggingface/transformers/issues/35295">#35295</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/1b6cb1eefc140ea2dbd74e23389050ebcb7f417d"><code>1b6cb1e</code></a>
don't use no_sync when deepspeed doesn't support it for certain zero
stages (...</li>
<li><a
href="https://github.com/huggingface/transformers/commit/b1d5d6dd65220b50e7ae2c086a4580e8a97d91ad"><code>b1d5d6d</code></a>
Fix FSDP no longer working (<a
href="https://redirect.github.com/huggingface/transformers/issues/35212">#35212</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/bf5d7c3fa37b6fa530642887a4d8f8548fd2db2c"><code>bf5d7c3</code></a>
Only import torch.distributed if it is available (<a
href="https://redirect.github.com/huggingface/transformers/issues/35133">#35133</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/49952300bba277173893d3c79afa0ac070b1b620"><code>4995230</code></a>
v4.47.1</li>
<li><a
href="https://github.com/huggingface/transformers/commit/d5ccfcc39ace7264a57f8a8c89bb95852e64a2d3"><code>d5ccfcc</code></a>
Fix <code>num_items_in_batch</code> not being an integer (<a
href="https://redirect.github.com/huggingface/transformers/issues/35115">#35115</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/0485b6e881774c6f3cc992dc50319452c76b9f1f"><code>0485b6e</code></a>
Fix GA loss bugs and add unit test (<a
href="https://redirect.github.com/huggingface/transformers/issues/35121">#35121</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/5d7739f15a6e50de416977fe2cc9cb516d67edda"><code>5d7739f</code></a>
Release: v4.47.0</li>
<li><a
href="https://github.com/huggingface/transformers/commit/a5bb52847139bf6ad7489ac62a5fb6d0fa3d2ec6"><code>a5bb528</code></a>
Fix signatures for processing kwargs (<a
href="https://redirect.github.com/huggingface/transformers/issues/35105">#35105</a>)</li>
<li><a
href="https://github.com/huggingface/transformers/commit/e27465c8011998c051403b22b7ccceca15de37db"><code>e27465c</code></a>
Adaptive dynamic number of speculative tokens (<a
href="https://redirect.github.com/huggingface/transformers/issues/34156">#34156</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/huggingface/transformers/compare/v4.46.1...v4.47.1">compare
view</a></li>
</ul>
</details>
<br />


Dependabot will resolve any conflicts with this PR as long as you don't
alter it yourself. You can also trigger a rebase manually by commenting
`@dependabot rebase`.

[//]: # (dependabot-automerge-start)
[//]: # (dependabot-automerge-end)

---

<details>
<summary>Dependabot commands and options</summary>
<br />

You can trigger Dependabot actions by commenting on this PR:
- `@dependabot rebase` will rebase this PR
- `@dependabot recreate` will recreate this PR, overwriting any edits
that have been made to it
- `@dependabot merge` will merge this PR after your CI passes on it
- `@dependabot squash and merge` will squash and merge this PR after
your CI passes on it
- `@dependabot cancel merge` will cancel a previously requested merge
and block automerging
- `@dependabot reopen` will reopen this PR if it is closed
- `@dependabot close` will close this PR and stop Dependabot recreating
it. You can achieve the same result by closing it manually
- `@dependabot show <dependency name> ignore conditions` will show all
of the ignore conditions of the specified dependency
- `@dependabot ignore <dependency name> major version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's major version (unless you unignore this specific
dependency's major version or upgrade to it yourself)
- `@dependabot ignore <dependency name> minor version` will close this
group update PR and stop Dependabot creating any more for the specific
dependency's minor version (unless you unignore this specific
dependency's minor version or upgrade to it yourself)
- `@dependabot ignore <dependency name>` will close this group update PR
and stop Dependabot creating any more for the specific dependency
(unless you unignore this specific dependency or upgrade to it yourself)
- `@dependabot unignore <dependency name>` will remove all of the ignore
conditions of the specified dependency
- `@dependabot unignore <dependency name> <ignore condition>` will
remove the ignore condition of the specified dependency and ignore
conditions


</details>

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: Lars Reimann <mail@larsreimann.com>
Co-authored-by: megalinter-bot <129584137+megalinter-bot@users.noreply.github.com>
  • Loading branch information
3 people authored Jan 6, 2025
1 parent 66818aa commit 7a7fa77
Show file tree
Hide file tree
Showing 416 changed files with 1,811 additions and 1,537 deletions.
3,269 changes: 1,753 additions & 1,516 deletions poetry.lock

Large diffs are not rendered by default.

14 changes: 7 additions & 7 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,8 @@ pillow = ">=9.5,<12.0"
polars = {extras = ["numpy", "pyarrow"], version = "^1.7.1"}
scikit-learn = "^1.2.0"
statsmodels = "^0.14.1"
torch = "^2.4.1"
torchvision = "^0.19.1"
torch = "^2.5.1"
torchvision = "^0.20.1"
transformers = "^4.40.2"
xxhash = "^3.4.1"

Expand All @@ -33,14 +33,14 @@ syrupy = "^4.6.0"
torch = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^2.4.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^2.4.1", markers="sys_platform != 'win32'", source = "pypi" },
{ version = "^2.5.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^2.5.1", markers="sys_platform != 'win32'", source = "pypi" },
]
torchvision = [
# Install the CUDA version on Windows. Projects that depend on us always get their dependencies from PyPI, so
# there's no point moving this to the main dependencies section.
{ version = "^0.19.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^0.19.1", markers="sys_platform != 'win32'", source = "pypi" },
{ version = "^0.20.1", markers="sys_platform == 'win32'", source = "torch_cuda" },
{ version = "^0.20.1", markers="sys_platform != 'win32'", source = "pypi" },
]

[tool.poetry.group.docs.dependencies]
Expand Down Expand Up @@ -78,7 +78,7 @@ omit = [
]

[tool.pytest.ini_options]
addopts = "--snapshot-warn-unused --tb=short"
addopts = "--snapshot-warn-unused --tb=short --snapshot-patch-pycharm-diff"
filterwarnings = [
"ignore:Deprecated call to `pkg_resources.declare_namespace",
"ignore:Jupyter is migrating its paths to use standard platformdirs"
Expand Down
6 changes: 3 additions & 3 deletions src/safeds/data/tabular/plotting/_table_plotter.py
Original file line number Diff line number Diff line change
Expand Up @@ -354,7 +354,7 @@ def histograms(self, *, max_bin_count: int = 10, theme: Literal["dark", "light"]
]

bars = [f"{round((bins[i] + bins[i + 1]) / 2, 2)}" for i in range(len(bins) - 1)]
hist = column._series.hist(bins=bins).slice(1, length=max_bin_count).get_column("count").to_numpy()
hist = column._series.hist(bins=bins).get_column("count").to_numpy()

ax.bar(bars, hist, edgecolor="black")
ax.set_xticks(range(len(hist)), bars, rotation=45, horizontalalignment="right")
Expand Down Expand Up @@ -445,7 +445,7 @@ def line_plot(
agg_list.append(pl.col(name).mean().alias(f"{name}_mean"))
agg_list.append(pl.count(name).alias(f"{name}_count"))
agg_list.append(pl.std(name, ddof=0).alias(f"{name}_std"))
grouped = self._table._lazy_frame.sort(x_name).group_by(x_name).agg(agg_list).collect()
grouped = self._table._lazy_frame.sort(x_name).group_by(x_name, maintain_order=True).agg(agg_list).collect()

x = grouped.get_column(x_name)
y_s = []
Expand Down Expand Up @@ -641,7 +641,7 @@ def moving_average_plot(

# Calculate the moving average
mean_col = pl.col(y_name).mean().alias(y_name)
grouped = self._table._lazy_frame.sort(x_name).group_by(x_name).agg(mean_col).collect()
grouped = self._table._lazy_frame.sort(x_name).group_by(x_name, maintain_order=True).agg(mean_col).collect()
data = grouped
moving_average = data.select([pl.col(y_name).rolling_mean(window_size).alias("moving_average")])
# set up the arrays for plotting
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def plot(self) -> Image:
import matplotlib.pyplot as plt
from sklearn.tree import plot_tree

plt.figure()
plot_tree(self._wrapped_model)

# save plot fig bytes in buffer
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@ def plot(self) -> Image:
import matplotlib.pyplot as plt
from sklearn.tree import plot_tree

plt.figure()
plot_tree(self._wrapped_model)

# save plot fig bytes in buffer
Expand Down
40 changes: 35 additions & 5 deletions tests/conftest.py
Original file line number Diff line number Diff line change
@@ -1,11 +1,14 @@
import io
from typing import Any

import matplotlib as mpl
import pytest
from safeds.data.image.containers import Image, ImageList
from PIL.Image import open as open_image
from syrupy import SnapshotAssertion
from syrupy.extensions.single_file import SingleFileSnapshotExtension
from syrupy.types import SerializedData
from syrupy.types import SerializableData, SerializedData

from safeds.data.image.containers import Image, ImageList

# Fix for failures when running pytest in a terminal (https://github.com/Safe-DS/Library/issues/482)
mpl.use("agg")
Expand All @@ -18,7 +21,7 @@ def serialize(self, data: Image, **_kwargs: Any) -> SerializedData:
return data._repr_jpeg_()


@pytest.fixture()
@pytest.fixture
def snapshot_jpeg_image(snapshot: SnapshotAssertion) -> SnapshotAssertion:
return snapshot.use_extension(JPEGImageExtension)

Expand All @@ -29,8 +32,22 @@ class PNGImageSnapshotExtension(SingleFileSnapshotExtension):
def serialize(self, data: Image, **_kwargs: Any) -> SerializedData:
return data._repr_png_()

def matches(
self,
*,
serialized_data: SerializableData,
snapshot_data: SerializableData,
) -> bool:

# We decode the byte arrays, since torchvision seems to use different compression methods on different operating
# systems, thus leading to different byte arrays for the same image.
actual = open_image(io.BytesIO(serialized_data))
expected = open_image(io.BytesIO(snapshot_data))

@pytest.fixture()
return actual == expected


@pytest.fixture
def snapshot_png_image(snapshot: SnapshotAssertion) -> SnapshotAssertion:
return snapshot.use_extension(PNGImageSnapshotExtension)

Expand All @@ -41,7 +58,20 @@ class PNGImageListSnapshotExtension(SingleFileSnapshotExtension):
def serialize(self, data: ImageList, **_kwargs: Any) -> SerializedData:
return data._repr_png_()

def matches(
self,
*,
serialized_data: SerializableData,
snapshot_data: SerializableData,
) -> bool:
# We decode the byte arrays, since torchvision seems to use different compression methods on different operating
# systems, thus leading to different byte arrays for the same image.
actual = open_image(io.BytesIO(serialized_data))
expected = open_image(io.BytesIO(snapshot_data))

return actual == expected


@pytest.fixture()
@pytest.fixture
def snapshot_png_image_list(snapshot: SnapshotAssertion) -> SnapshotAssertion:
return snapshot.use_extension(PNGImageListSnapshotExtension)
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading

0 comments on commit 7a7fa77

Please sign in to comment.