Skip to content
Snippets Groups Projects
user avatar
dependabot[bot] authored
Bumps [ruff](https://github.com/astral-sh/ruff) from 0.0.277 to 0.0.278.
<details>
<summary>Release notes</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/releases">ruff's
releases</a>.</em></p>
<blockquote>
<h2>v0.0.278</h2>
<!-- raw HTML omitted -->
<p>See the <a href="https://astral.sh/blog/ruff-v0.0.278">release blog
post</a> for more, including detailed descriptions of any newly added
rules.</p>
<h2>What's Changed</h2>
<h3>Rules</h3>
<ul>
<li>[<code>pylint</code>] Implement <code>typevar-bivariance</code>
(<code>PLC0131</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5517">astral-sh/ruff#5517</a></li>
<li>[<code>flake8-pyi</code>] Implement
<code>unnecessary-literal-union</code> (<code>PYI030</code>) by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5570">astral-sh/ruff#5570</a></li>
<li>[<code>pylint</code>] Implement
<code>type-name-incorrect-variance</code> (<code>PLC0105</code>) by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5651">astral-sh/ruff#5651</a></li>
<li>[<code>ruff</code>] Implement
<code>unnecessary-list-allocation-for-first-element</code>
(<code>RUF015</code>) by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5549">astral-sh/ruff#5549</a></li>
<li>[<code>flake8-bugbear</code>] Implement
<code>re-sub-positional-args</code> (<code>B034</code>) by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5669">astral-sh/ruff#5669</a></li>
<li>[<code>ruff</code>] Implement <code>invalid-index-type</code>
(<code>RUF016</code>) by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5602">astral-sh/ruff#5602</a></li>
</ul>
<h3>Settings</h3>
<ul>
<li>[<code>isort</code>] Add <code>--case-sensitive</code> flag by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5539">astral-sh/ruff#5539</a></li>
<li>[<code>isort</code>] Support globbing in <code>isort</code> options
by <a href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5473">astral-sh/ruff#5473</a></li>
</ul>
<h3>Bug Fixes</h3>
<ul>
<li>Support autofix for some multiline <code>str.format</code> calls by
<a href="https://github.com/harupy"><code>@​harupy</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5638">astral-sh/ruff#5638</a></li>
<li>Avoid triggering <code>unnecessary-map</code> (<code>C417</code>)
for late-bound lambdas by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5520">astral-sh/ruff#5520</a></li>
<li>Avoid triggering DTZ001-006 when using <code>.astimezone()</code> by
<a href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5524">astral-sh/ruff#5524</a></li>
<li>Enable attribute lookups via semantic model by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5536">astral-sh/ruff#5536</a></li>
<li>Avoid syntax errors when rewriting str(dict) in f-strings by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5538">astral-sh/ruff#5538</a></li>
<li>Differentiate between runtime and typing-time annotations by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5575">astral-sh/ruff#5575</a></li>
<li>Only run pyproject.toml lint rules when enabled by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5578">astral-sh/ruff#5578</a></li>
<li>Refactor isort directive skips to use iterators by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5623">astral-sh/ruff#5623</a></li>
<li>Allow descriptor instantiations in dataclass fields by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5537">astral-sh/ruff#5537</a></li>
<li>Refactor <code>noqa</code> directive parsing away from regex-based
implementation by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5554">astral-sh/ruff#5554</a></li>
<li>Emit warnings for invalid <code># noqa</code> directives by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5571">astral-sh/ruff#5571</a></li>
<li>Support individual codes on <code># flake8: noqa</code> directives
by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5618">astral-sh/ruff#5618</a></li>
<li>Add <code>tkinter</code> import convention by <a
href="https://github.com/tjkuson"><code>@​tjkuson</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5626">astral-sh/ruff#5626</a></li>
<li>Avoid <code>PERF401</code> if conditional depends on list var by <a
href="https://github.com/dhruvmanila"><code>@​dhruvmanila</code></a> in
<a
href="https://redirect.github.com/astral-sh/ruff/pull/5603">astral-sh/ruff#5603</a></li>
<li>Fix typo in complex-if-statement-in-stub message by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5635">astral-sh/ruff#5635</a></li>
<li>Make TRY301 trigger only if a <code>raise</code> throws a caught
exception by <a
href="https://github.com/evanrittenhouse"><code>@​evanrittenhouse</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5455">astral-sh/ruff#5455</a></li>
<li>Skip flake8-future-annotations checks in stub files by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5652">astral-sh/ruff#5652</a></li>
<li>Always allow PEP 585 and PEP 604 rewrites in stub files by <a
href="https://github.com/charliermarsh"><code>@​charliermarsh</code></a>
in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5653">astral-sh/ruff#5653</a></li>
<li>Add support for <code>Union</code> declarations without
<code>|</code> to PYI016 by <a
href="https://github.com/zanieb"><code>@​zanieb</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5598">astral-sh/ruff#5598</a></li>
<li>Ignore <code>_name_</code> and <code>_value_</code> accesses in
<code>flake8-self</code> rules by <a
href="https://github.com/monosans"><code>@​monosans</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5663">astral-sh/ruff#5663</a></li>
<li>Refactor <code>repeated_keys()</code> to use
<code>ComparableExpr</code> by <a
href="https://github.com/qdegraaf"><code>@​qdegraaf</code></a> in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5696">astral-sh/ruff#5696</a></li>
</ul>
<h2>New Contributors</h2>
<ul>
<li><a href="https://github.com/karosis88"><code>@​karosis88</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5560">astral-sh/ruff#5560</a></li>
<li><a
href="https://github.com/petermattia"><code>@​petermattia</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5579">astral-sh/ruff#5579</a></li>
<li><a
href="https://github.com/DimitriPapadopoulos"><code>@​DimitriPapadopoulos</code></a>
made their first contribution in <a
href="https://redirect.github.com/astral-sh/ruff/pull/5607">astral-sh/ruff#5607</a></li>
</ul>
<p><strong>Full Changelog</strong>: <a
href="https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278">https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278</a></p>
</blockquote>
</details>
<details>
<summary>Changelog</summary>
<p><em>Sourced from <a
href="https://github.com/astral-sh/ruff/blob/main/BREAKING_CHANGES.md">ruff's
changelog</a>.</em></p>
<blockquote>
<h1>Breaking Changes</h1>
</blockquote>
</details>
<details>
<summary>Commits</summary>
<ul>
<li><a
href="https://github.com/astral-sh/ruff/commit/0ead9a16ac306bd17ab5951c0e4240c1ed71a208"><code>0ead9a1</code></a>
Bump version to 0.0.278 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5714">#5714</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/653429bef9d212f0d4dc22ca8f7d9eae1d432f81"><code>653429b</code></a>
Handle right parens in join comma builder (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5711">#5711</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f0aa6bd4d36d3b8793bea405541e91d525c0e9fb"><code>f0aa6bd</code></a>
Document ruff_dev and format_dev (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5648">#5648</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5665968b4249784734fda04fdd2a8e9272b8cee9"><code>5665968</code></a>
Bump static Python versions in CI from 3.7 to 3.11 (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5700">#5700</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/33a91773f7a8c60c2f1cdb84127feabad8c6d84f"><code>33a9177</code></a>
Use permalinks in ecosystem diff references (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5704">#5704</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/0666added9902990b6ea22d1a48f6fa1ae5ea605"><code>0666add</code></a>
Add RUF016: Detection of invalid index types (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5602">#5602</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/7566ca8ff7caa28ea44f1053fd1f2963fafcefcb"><code>7566ca8</code></a>
Refactor <code>repeated_keys()</code> to use <code>ComparableExpr</code>
(<a
href="https://redirect.github.com/astral-sh/ruff/issues/5696">#5696</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/5dd9e567481fb4d83214be4998833f8b11945727"><code>5dd9e56</code></a>
Misc. tweaks to bandit documentation (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5701">#5701</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/f8173daf4ce5bdf8811daf57911f371a0f992af9"><code>f8173da</code></a>
Add documentation to the <code>S3XX</code> rules (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5592">#5592</a>)</li>
<li><a
href="https://github.com/astral-sh/ruff/commit/511ec0d7bca34a08c286abf34a7de14e6f3c56eb"><code>511ec0d</code></a>
Refactor shebang parsing to remove regex dependency (<a
href="https://redirect.github.com/astral-sh/ruff/issues/5690">#5690</a>)</li>
<li>Additional commits viewable in <a
href="https://github.com/astral-sh/ruff/compare/v0.0.277...v0.0.278">compare
view</a></li>
</ul>
</details>
<br />


[![Dependabot compatibility
score](https://dependabot-badges.githubapp.com/badges/compatibility_score?dependency-name=ruff&package-manager=pip&previous-version=0.0.277&new-version=0.0.278)](https://docs.github.com/en/github/managing-security-vulnerabilities/about-dependabot-security-updates#about-compatibility-scores

)

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 ignore this major version` will close this PR and stop
Dependabot creating any more for this major version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this minor version` will close this PR and stop
Dependabot creating any more for this minor version (unless you reopen
the PR or upgrade to it yourself)
- `@dependabot ignore this dependency` will close this PR and stop
Dependabot creating any more for this dependency (unless you reopen the
PR or upgrade to it yourself)


</details>

---------

Signed-off-by: default avatardependabot[bot] <support@github.com>
Co-authored-by: default avatardependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: default avatarFilippo Vicentini <filippovicentini@gmail.com>
8dbd9e33
History
logo

NetKet

Release Anaconda-Server Badge Paper (v3) codecov Slack

NetKet is an open-source project delivering cutting-edge methods for the study of many-body quantum systems with artificial neural networks and machine learning techniques. It is a Python library built on JAX.

Installation and Usage

NetKet runs on MacOS and Linux. We recommend to install NetKet using pip, but it can also be installed with conda. It is often necessary to first update pip to a recent release (>=20.3) in order for upper compatibility bounds to be considered and avoid a broken installation. For instructions on how to install the latest stable/beta release of NetKet see the Get Started page of our website or run the following command (Apple M1 users, follow that link for more instructions):

pip install --upgrade pip
pip install --upgrade netket

If you wish to install the current development version of NetKet, which is the master branch of this GitHub repository, together with the additional dependencies, you can run the following command:

pip install --upgrade pip
pip install 'git+https://github.com/netket/netket.git#egg=netket[all]'

To speed-up NetKet-computations, even on a single machine, you can install the MPI-related dependencies by using [mpi] between square brackets.

pip install --upgrade pip
pip install --upgrade "netket[mpi]"

We recommend to install NetKet with all it's extra dependencies, which are documented below. However, if you do not have a working MPI compiler in your PATH this installation will most likely fail because it will attempt to install mpi4py, which enables MPI support in netket.

The latest release of NetKet is always available on PyPi and can be installed with pip. NetKet is also available on conda-forge, however the version available through conda install can be slightly out of date compared to PyPi. To check what is the latest version released on both distributions you can inspect the badges at the top of this readme.

Extra dependencies

When installing netket with pip, you can pass the following extra variants as square brakets. You can install several of them by separating them with a comma.

  • "[dev]": installs development-related dependencies such as black, pytest and testing dependencies
  • "[mpi]": Installs mpi4py to enable multi-process parallelism. Requires a working MPI compiler in your path
  • "[extra]": Installs tensorboardx to enable logging to tensorboard, and openfermion to convert the QubitOperators.
  • "[all]": Installs all extra dependencies

MPI Support

To enable MPI support you must install mpi4jax. Please note that we advise to install mpi4jax with the same tool (conda or pip) with which you install it's dependency mpi4py.

To check whether MPI support is enabled, check the flags

>>> import netket
>>> netket.utils.mpi.available
True

Installation on Windows

WARNING: Windows support is experimental, and you should expect suboptimal performance.

We suggest to use Windows Subsystem for Linux (WSL), on which you can install NetKet following the same instructions as above, and CUDA and MPI work as intended.

However, if you just want to quickly get started with NetKet, it is also possible to install it natively on Windows. First, download an unofficial build of jax from cloudhan/jax-windows-builder:

pip install --upgrade pip
pip install "jax[cpu]===0.3.25" -f https://whls.blob.core.windows.net/unstable/index.html --use-deprecated legacy-resolver

Alternatively, you may specify a version with CUDA support.

Then install NetKet as usual:

pip install --upgrade netket

If you want MPI support, please follow the discussion in mpi4jax.

Getting Started

To get started with NetKet, we recommend you give a look at our tutorials page, by running them on your computer or on Google Colaboratory. There are also many example scripts that you can download, run and edit that showcase some use-cases of NetKet, although they are not commented.

If you want to get in touch with us, feel free to open an issue or a discussion here on GitHub, or to join the MLQuantum slack group where several people involved with NetKet hang out. To join the slack channel just accept this invitation

License

Apache License 2.0