trigger workflow tutorials

This commit is contained in:
Dario Coscia
2025-03-15 21:03:00 +01:00
committed by FilippoOlivo
parent 39ceeb82c1
commit fa402b3565
14 changed files with 25 additions and 28 deletions

View File

@@ -6,9 +6,6 @@ on:
- "**" # Run on push on all branches - "**" # Run on push on all branches
paths: paths:
- 'tutorials/**/*.ipynb' - 'tutorials/**/*.ipynb'
workflow_dispatch:
branches:
- "**" # Run on push on all branches
jobs: jobs:
export_tutorials: export_tutorials:
permissions: write-all permissions: write-all

View File

@@ -80,7 +80,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "2373a925", "id": "2373a925",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@@ -89,7 +89,7 @@
"try:\n", "try:\n",
" import google.colab\n", " import google.colab\n",
"\n", "\n",
" IN_COLAB = True\n", " IN_COLAB = True \n",
"except:\n", "except:\n",
" IN_COLAB = False\n", " IN_COLAB = False\n",
"if IN_COLAB:\n", "if IN_COLAB:\n",

View File

@@ -19,7 +19,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -31,7 +31,7 @@
"except:\n", "except:\n",
" IN_COLAB = False\n", " IN_COLAB = False\n",
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\" \n",
" # get the data\n", " # get the data\n",
" !mkdir \"data\"\n", " !mkdir \"data\"\n",
" !wget \"https://github.com/mathLab/PINA/raw/refs/heads/master/tutorials/tutorial10/data/Data_KS.mat\" -O \"data/Data_KS.mat\"\n", " !wget \"https://github.com/mathLab/PINA/raw/refs/heads/master/tutorials/tutorial10/data/Data_KS.mat\" -O \"data/Data_KS.mat\"\n",

View File

@@ -19,7 +19,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -36,9 +36,9 @@
"import warnings\n", "import warnings\n",
"\n", "\n",
"from pina import Condition, Trainer\n", "from pina import Condition, Trainer\n",
"from pina.solver import PINN\n", "from pina.solver import PINN \n",
"from pina.model import FeedForward\n", "from pina.model import FeedForward\n",
"from pina.problem import SpatialProblem\n", "from pina.problem import SpatialProblem \n",
"from pina.operator import grad\n", "from pina.operator import grad\n",
"from pina.domain import CartesianDomain\n", "from pina.domain import CartesianDomain\n",
"from pina.equation import Equation, FixedValue\n", "from pina.equation import Equation, FixedValue\n",

View File

@@ -19,7 +19,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -38,7 +38,7 @@
"import warnings\n", "import warnings\n",
"\n", "\n",
"from pina import Condition, Trainer\n", "from pina import Condition, Trainer\n",
"from pina.problem import SpatialProblem\n", "from pina.problem import SpatialProblem \n",
"from pina.operator import laplacian\n", "from pina.operator import laplacian\n",
"from pina.solver import PINN, SelfAdaptivePINN as SAPINN\n", "from pina.solver import PINN, SelfAdaptivePINN as SAPINN\n",
"from pina.loss import LpLoss\n", "from pina.loss import LpLoss\n",

View File

@@ -27,7 +27,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -39,7 +39,7 @@
"except:\n", "except:\n",
" IN_COLAB = False\n", " IN_COLAB = False\n",
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\" \n",
"\n", "\n",
"%matplotlib inline\n", "%matplotlib inline\n",
"\n", "\n",

View File

@@ -31,7 +31,7 @@
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",
"import torch\n", "import torch \n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import warnings\n", "import warnings\n",
"\n", "\n",

View File

@@ -16,7 +16,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "d93daba0", "id": "d93daba0",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@@ -28,7 +28,7 @@
" IN_COLAB = True\n", " IN_COLAB = True\n",
"except:\n", "except:\n",
" IN_COLAB = False\n", " IN_COLAB = False\n",
"if IN_COLAB:\n", "if IN_COLAB: \n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",
"import torch\n", "import torch\n",

View File

@@ -43,7 +43,7 @@
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",
"import torch\n", "import torch \n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import torchvision # for MNIST dataset\n", "import torchvision # for MNIST dataset\n",
"import warnings\n", "import warnings\n",

View File

@@ -21,7 +21,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 1, "execution_count": null,
"id": "5f2744dc", "id": "5f2744dc",
"metadata": { "metadata": {
"ExecuteTime": { "ExecuteTime": {
@@ -46,7 +46,7 @@
"\n", "\n",
"import torch\n", "import torch\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt\n",
"import warnings\n", "import warnings \n",
"\n", "\n",
"# !pip install scipy # install scipy\n", "# !pip install scipy # install scipy\n",
"from scipy import io\n", "from scipy import io\n",

View File

@@ -34,7 +34,7 @@
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt \n",
"\n", "\n",
"from pina.domain import (\n", "from pina.domain import (\n",
" EllipsoidDomain,\n", " EllipsoidDomain,\n",

View File

@@ -50,7 +50,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 20, "execution_count": null,
"id": "00d1027d-13f2-4619-9ff7-a740568f13ff", "id": "00d1027d-13f2-4619-9ff7-a740568f13ff",
"metadata": {}, "metadata": {},
"outputs": [ "outputs": [
@@ -75,7 +75,7 @@
"source": [ "source": [
"## routine needed to run the notebook on Google Colab\n", "## routine needed to run the notebook on Google Colab\n",
"try:\n", "try:\n",
" import google.colab\n", " import google.colab \n",
"\n", "\n",
" IN_COLAB = True\n", " IN_COLAB = True\n",
"except:\n", "except:\n",

View File

@@ -31,7 +31,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 82, "execution_count": null,
"id": "00d1027d-13f2-4619-9ff7-a740568f13ff", "id": "00d1027d-13f2-4619-9ff7-a740568f13ff",
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
@@ -42,7 +42,7 @@
"\n", "\n",
" IN_COLAB = True\n", " IN_COLAB = True\n",
"except:\n", "except:\n",
" IN_COLAB = False\n", " IN_COLAB = False \n",
"if IN_COLAB:\n", "if IN_COLAB:\n",
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",

View File

@@ -20,7 +20,7 @@
}, },
{ {
"cell_type": "code", "cell_type": "code",
"execution_count": 14, "execution_count": null,
"metadata": {}, "metadata": {},
"outputs": [], "outputs": [],
"source": [ "source": [
@@ -35,11 +35,11 @@
" !pip install \"pina-mathlab\"\n", " !pip install \"pina-mathlab\"\n",
"\n", "\n",
"import torch\n", "import torch\n",
"import matplotlib.pyplot as plt\n", "import matplotlib.pyplot as plt \n",
"import warnings\n", "import warnings\n",
"\n", "\n",
"from pina import Condition, Trainer\n", "from pina import Condition, Trainer\n",
"from pina.problem import SpatialProblem\n", "from pina.problem import SpatialProblem \n",
"from pina.operator import laplacian\n", "from pina.operator import laplacian\n",
"from pina.model import FeedForward\n", "from pina.model import FeedForward\n",
"from pina.model.block import PeriodicBoundaryEmbedding # The PBC module\n", "from pina.model.block import PeriodicBoundaryEmbedding # The PBC module\n",