Skip to content

Commit

Permalink
[pre-commit.ci] pre-commit autoupdate (#97)
Browse files Browse the repository at this point in the history
* [pre-commit.ci] pre-commit autoupdate

updates:
- [github.com/pre-commit/pre-commit-hooks: v4.5.0 → v4.6.0](pre-commit/pre-commit-hooks@v4.5.0...v4.6.0)
- [github.com/PyCQA/flake8: 6.1.0 → 7.1.0](PyCQA/flake8@6.1.0...7.1.0)
- [github.com/PyCQA/isort: 5.12.0 → 5.13.2](PyCQA/isort@5.12.0...5.13.2)
- [github.com/psf/black: 23.10.1 → 24.4.2](psf/black@23.10.1...24.4.2)
- [github.com/kynan/nbstripout: 0.6.1 → 0.7.1](kynan/nbstripout@0.6.1...0.7.1)
- [github.com/adamchainz/blacken-docs: 1.16.0 → 1.18.0](adamchainz/blacken-docs@1.16.0...1.18.0)

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update blacken-docs deps

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update black

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Vojtech Micka <vojtech@nnaisense.com>
  • Loading branch information
pre-commit-ci[bot] and Higgcz authored Aug 3, 2024
1 parent 3054005 commit 415c32f
Show file tree
Hide file tree
Showing 19 changed files with 329 additions and 338 deletions.
14 changes: 7 additions & 7 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ exclude: '^docs/conf.py'

repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v4.5.0
rev: v4.6.0
hooks:
- id: check-added-large-files
args: ['--maxkb=2048']
Expand All @@ -23,31 +23,31 @@ repos:
args: ['--fix=no']

- repo: https://github.com/PyCQA/flake8
rev: '6.1.0'
rev: '7.1.0'
hooks:
- id: flake8
additional_dependencies:
- flake8-docstrings==1.6.0

- repo: https://github.com/PyCQA/isort
rev: 5.12.0
rev: 5.13.2
hooks:
- id: isort

- repo: https://github.com/psf/black
rev: 23.10.1
rev: 24.8.0
hooks:
- id: black
args: [--safe]

- repo: https://github.com/kynan/nbstripout
rev: 0.6.1
rev: 0.7.1
hooks:
- id: nbstripout

- repo: https://github.com/adamchainz/blacken-docs
rev: 1.16.0
rev: 1.18.0
hooks:
- id: blacken-docs
additional_dependencies: [black==23.10.1]
additional_dependencies: [black==24.8.0]
args: [--skip-string-normalization, --line-length=88]
3 changes: 1 addition & 2 deletions docs/user_guide/neuroevolution.md
Original file line number Diff line number Diff line change
Expand Up @@ -293,8 +293,7 @@ class CustomNE(NEProblem):
def _network_constants(self):
return {"d": self._d} # Pass self._d as 'd' to networks at instantiation

def _evaluate_network(self, network: torch.nn.Module):
...
def _evaluate_network(self, network: torch.nn.Module): ...
```

which then allows, for example, the use of the variable `d` in the string representation of the network
Expand Down
58 changes: 29 additions & 29 deletions examples/notebooks/Brax_Experiments_Visualization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"cells": [
{
"cell_type": "markdown",
"id": "fc7b28eb-db2b-4a02-87d4-dfc44a9fecc2",
"id": "0",
"metadata": {},
"source": [
"# Visualization of the `brax` Experiment Results\n",
Expand All @@ -13,7 +13,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d5350a77-c84b-4d05-9e1c-4a6e0e2f6d0d",
"id": "1",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -24,7 +24,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e4c4d0df-0480-4c5f-a4ab-d34727286cc1",
"id": "2",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -34,7 +34,7 @@
},
{
"cell_type": "markdown",
"id": "d64f3d04-680a-43c5-a807-dbaf9f917198",
"id": "3",
"metadata": {},
"source": [
"---"
Expand All @@ -43,7 +43,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "7025f8b3-9982-4196-9790-9e8c1491dc06",
"id": "4",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -55,7 +55,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "d5bccb74-a64a-4e55-9ae9-9686f772fa60",
"id": "5",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -66,7 +66,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "0d71c7c3-bb36-47fb-88dc-bd285c54c44a",
"id": "6",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -77,7 +77,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "54c7bee4-bf5c-445c-b009-40484391461c",
"id": "7",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -89,7 +89,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "30eca014-be71-4162-b675-0eaf8b037bce",
"id": "8",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -100,7 +100,7 @@
},
{
"cell_type": "markdown",
"id": "78ce1f2f-cb89-432e-ad98-07f7e1d5d457",
"id": "9",
"metadata": {},
"source": [
"Below, we put the values of the center solution into the policy network as parameters:"
Expand All @@ -109,7 +109,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "545d693d-ccd9-4ea7-b068-06b832f32be5",
"id": "10",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -118,7 +118,7 @@
},
{
"cell_type": "markdown",
"id": "e7c7581d-24ba-4f06-88e2-41bb3274cd37",
"id": "11",
"metadata": {},
"source": [
"---\n",
Expand All @@ -131,7 +131,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8d798a71-003f-4bed-9f12-391dc7b797c0",
"id": "12",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -143,7 +143,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "30080d4b-227c-4bde-8009-7a97c6e177f1",
"id": "13",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -153,7 +153,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c64a6482-0533-40c8-b8f9-1b1ad3ee0019",
"id": "14",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -163,7 +163,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "ee69ba99-bcb7-4d21-9f5c-6c330cb3ed96",
"id": "15",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -183,7 +183,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c99f0ea4-7638-4e8a-a0a2-d9f483c8c096",
"id": "16",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -194,7 +194,7 @@
},
{
"cell_type": "markdown",
"id": "19d38fe1-9d6f-40ec-926d-3c4066a4b66a",
"id": "17",
"metadata": {},
"source": [
"Below, we define a utility function named `use_policy(...)`.\n",
Expand All @@ -214,7 +214,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "e8c6554d-4bdb-49b9-8c2e-956bce6ddb8a",
"id": "18",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -238,7 +238,7 @@
},
{
"cell_type": "markdown",
"id": "28c044fe-4639-411c-be78-ac09cbe5e78f",
"id": "19",
"metadata": {},
"source": [
"We now initialize a new instance of our brax environment, and trigger the jit compilation on its `reset` and `step` methods."
Expand All @@ -247,7 +247,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "c1251e82-1d0f-4e43-a6c5-1ec4c0275dab",
"id": "20",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -258,7 +258,7 @@
},
{
"cell_type": "markdown",
"id": "55229cc2-aad5-4c78-b095-010a538adb40",
"id": "21",
"metadata": {},
"source": [
"Below we run our policy and collect the states of the episodes."
Expand All @@ -267,7 +267,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "220ec837-1d1a-401e-a144-5516bdb3e493",
"id": "22",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -291,7 +291,7 @@
},
{
"cell_type": "markdown",
"id": "c9bbe53a-40f5-4bf5-a063-47f1d88032d6",
"id": "23",
"metadata": {},
"source": [
"Length of the episode and the total reward:"
Expand All @@ -300,7 +300,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "80345e9c-0694-413d-81c2-205dfacdfb5a",
"id": "24",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -310,7 +310,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "8d2e2506-5bb2-4b1f-bb00-004465008fa3",
"id": "25",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -325,7 +325,7 @@
},
{
"cell_type": "markdown",
"id": "8b6ec424-e6cc-453a-93fd-eb07e44c1bd6",
"id": "26",
"metadata": {},
"source": [
"Visualization of the policy:"
Expand All @@ -334,7 +334,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "29b9c3aa-8068-40bc-9ec2-e5ff759ed22c",
"id": "27",
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -349,7 +349,7 @@
{
"cell_type": "code",
"execution_count": null,
"id": "b50e36a7-dd33-4fc3-9f9d-2d7dca93110b",
"id": "28",
"metadata": {},
"outputs": [],
"source": [
Expand Down
Loading

0 comments on commit 415c32f

Please sign in to comment.