Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 33 additions & 0 deletions .github/workflows/notebooks.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: Reproduce notebooks

on:
push:
branches: [main]
pull_request:

permissions:
contents: read

jobs:
execute:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.11"
cache: pip
- name: Install dependencies
run: python -m pip install -r requirements.txt
- name: Execute every study from a clean kernel
env:
MPLBACKEND: Agg
run: |
mkdir -p /tmp/executed-notebooks
for notebook in notebooks/*.ipynb; do
jupyter nbconvert \
--to notebook \
--execute "$notebook" \
--output-dir /tmp/executed-notebooks \
--ExecutePreprocessor.timeout=300
done
6 changes: 6 additions & 0 deletions READMe.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Surrogate Model Learning

[![Reproduce notebooks](https://github.com/triasha72/Surrogate-model-learning/actions/workflows/notebooks.yml/badge.svg)](https://github.com/triasha72/Surrogate-model-learning/actions/workflows/notebooks.yml)

Learning surrogate modeling from scratch — starting with
the basics and working toward real engineering applications.

Expand Down Expand Up @@ -114,6 +116,10 @@ pip install -r requirements.txt
jupyter notebook
```

Every notebook is also executed from a clean kernel in GitHub Actions. This
checks that the committed studies can be reproduced with the pinned dependency
versions instead of relying on variables left in an interactive session.

## Notebooks

| Notebook | Topic | Key Result |
Expand Down
19 changes: 0 additions & 19 deletions Requirements.txt

This file was deleted.

7 changes: 7 additions & 0 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
numpy==1.26.4
scipy==1.11.4
matplotlib==3.8.2
scikit-learn==1.4.0
pyDOE2==1.3.0
jupyter==1.0.0
ipython==8.22.1
Loading