Skip to content

Commit

Permalink
[pre-commit.ci] auto fixes from pre-commit.com hooks
Browse files Browse the repository at this point in the history
for more information, see https://pre-commit.ci
  • Loading branch information
pre-commit-ci[bot] committed Dec 9, 2024
1 parent 19886bf commit 7be5838
Show file tree
Hide file tree
Showing 11 changed files with 53 additions and 24 deletions.
9 changes: 5 additions & 4 deletions docs/source/_examples/OptionalDVC.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import Node, dvc, zn, config, ZnTrackProject\n",
"from pathlib import Path\n",
"import tempfile\n",
"from pathlib import Path\n",
"\n",
"from zntrack import Node, ZnTrackProject, config, dvc, zn\n",
"\n",
"config.nb_name = \"OptionalDVC.ipynb\""
]
Expand Down Expand Up @@ -229,10 +230,10 @@
"id": "52554c16-d793-461c-824b-86d6adbf0968",
"metadata": {
"nbsphinx": "hidden",
"tags": [],
"pycharm": {
"is_executing": true
}
},
"tags": []
},
"outputs": [],
"source": [
Expand Down
9 changes: 6 additions & 3 deletions examples/dataclasses_for_parameters.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,8 @@
"outputs": [],
"source": [
"# We work in a temporary directory to avoid cluttering the current directory\n",
"import tempfile, os\n",
"import os\n",
"import tempfile\n",
"\n",
"temp_dir = tempfile.TemporaryDirectory()\n",
"os.chdir(temp_dir.name)"
Expand Down Expand Up @@ -72,9 +73,11 @@
"metadata": {},
"outputs": [],
"source": [
"import pathlib\n",
"\n",
"from compute_random_number import ComputeRandomNumber, Parameter\n",
"import zntrack\n",
"import pathlib"
"\n",
"import zntrack"
]
},
{
Expand Down
3 changes: 2 additions & 1 deletion examples/docs/01_Intro.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -132,9 +132,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import Node, zn, Project\n",
"from random import randrange\n",
"\n",
"from zntrack import Node, Project, zn\n",
"\n",
"\n",
"class RandomNumber(Node):\n",
" number = zn.outs()\n",
Expand Down
13 changes: 11 additions & 2 deletions examples/docs/03_dependencies.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,10 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from pathlib import Path\n",
"from random import randrange\n",
"from pathlib import Path"
"\n",
"import zntrack"
]
},
{
Expand Down Expand Up @@ -327,6 +328,7 @@
},
{
"cell_type": "markdown",
"id": "7fb27b941602401d91542211134fc71a",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -590,6 +592,7 @@
{
"cell_type": "code",
"execution_count": 19,
"id": "acae54e37e7d407bbb7b55eff062a284",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -665,6 +668,7 @@
},
{
"cell_type": "markdown",
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
"metadata": {
"collapsed": false
},
Expand All @@ -680,6 +684,7 @@
{
"cell_type": "code",
"execution_count": 21,
"id": "8dd0d8092fe74a7c96281538738b07e2",
"metadata": {
"collapsed": false
},
Expand All @@ -698,6 +703,7 @@
{
"cell_type": "code",
"execution_count": 22,
"id": "72eea5119410473aa328ad9291626812",
"metadata": {
"collapsed": false
},
Expand Down Expand Up @@ -805,6 +811,7 @@
},
{
"cell_type": "markdown",
"id": "8edb47106e1a46a883d545849b8ab81b",
"metadata": {
"collapsed": false
},
Expand All @@ -816,6 +823,7 @@
{
"cell_type": "code",
"execution_count": 23,
"id": "10185d26023b46108eb7d9f57d49d2b3",
"metadata": {
"collapsed": false
},
Expand All @@ -827,6 +835,7 @@
{
"cell_type": "code",
"execution_count": 24,
"id": "8763a12b2bbd4a93a75aff182afb95dc",
"metadata": {
"collapsed": false
},
Expand Down
8 changes: 5 additions & 3 deletions examples/docs/04_metrics_and_plots.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -22,11 +22,13 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from pathlib import Path\n",
"import json\n",
"from pathlib import Path\n",
"\n",
"import numpy as np\n",
"import pandas as pd\n",
"import numpy as np"
"\n",
"import zntrack"
]
},
{
Expand Down
7 changes: 6 additions & 1 deletion examples/docs/05_metadata.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,10 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from time import sleep\n",
"\n",
"import zntrack\n",
"\n",
"zntrack.config.nb_name = \"05_metadata.ipynb\""
]
},
Expand Down Expand Up @@ -216,6 +217,7 @@
{
"cell_type": "code",
"execution_count": 7,
"id": "7fb27b941602401d91542211134fc71a",
"metadata": {
"collapsed": false,
"pycharm": {
Expand All @@ -240,6 +242,7 @@
{
"cell_type": "code",
"execution_count": 8,
"id": "acae54e37e7d407bbb7b55eff062a284",
"metadata": {
"collapsed": false,
"pycharm": {
Expand Down Expand Up @@ -323,6 +326,7 @@
{
"cell_type": "code",
"execution_count": 9,
"id": "9a63283cbaf04dbcab1f6479b197f3a8",
"metadata": {
"collapsed": false,
"pycharm": {
Expand All @@ -346,6 +350,7 @@
},
{
"cell_type": "markdown",
"id": "8dd0d8092fe74a7c96281538738b07e2",
"metadata": {
"collapsed": false,
"pycharm": {
Expand Down
3 changes: 2 additions & 1 deletion examples/docs/07_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -94,9 +94,10 @@
"metadata": {},
"outputs": [],
"source": [
"from zntrack import nodify, NodeConfig\n",
"import pathlib\n",
"\n",
"from zntrack import NodeConfig, nodify\n",
"\n",
"\n",
"@nodify(outs=pathlib.Path(\"outs.txt\"), params={\"text\": \"Lorem Ipsum\"})\n",
"def write_text(cfg: NodeConfig):\n",
Expand Down
5 changes: 3 additions & 2 deletions examples/docs/08_custom_zntrackoptions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -95,10 +95,11 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"import ase.db\n",
"import ase.io\n",
"import tqdm"
"import tqdm\n",
"\n",
"import zntrack"
]
},
{
Expand Down
5 changes: 3 additions & 2 deletions examples/docs/09_lazy.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -98,8 +98,9 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"import random"
"import random\n",
"\n",
"import zntrack"
]
},
{
Expand Down
7 changes: 5 additions & 2 deletions examples/docs/parameter_optimization.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -88,11 +88,14 @@
"metadata": {},
"outputs": [],
"source": [
"import optuna, sklearn, zntrack\n",
"import optuna\n",
"import sklearn\n",
"import sklearn.datasets\n",
"import sklearn.ensemble\n",
"import sklearn.model_selection\n",
"import sklearn.metrics\n",
"import sklearn.model_selection\n",
"\n",
"import zntrack\n",
"\n",
"\n",
"class HousingDataSet(zntrack.Node):\n",
Expand Down
8 changes: 5 additions & 3 deletions examples/estimate_pi_with_mc.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,8 @@
"outputs": [],
"source": [
"# We work in a temporary directory to avoid cluttering the current directory\n",
"import tempfile, os\n",
"import os\n",
"import tempfile\n",
"\n",
"temp_dir = tempfile.TemporaryDirectory()\n",
"os.chdir(temp_dir.name)"
Expand Down Expand Up @@ -195,8 +196,9 @@
"metadata": {},
"outputs": [],
"source": [
"import zntrack\n",
"from mcpipy import MCPi"
"from mcpipy import MCPi\n",
"\n",
"import zntrack"
]
},
{
Expand Down

0 comments on commit 7be5838

Please sign in to comment.