From 40515058c6b5dc290ba462b7d8afdfcb8cb28ceb Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Wed, 9 Sep 2026 22:56:54 -0400 Subject: [PATCH 1/2] docs: close chapter one with scientific workflow guide --- AGENTS.md | 6 +- README.md | 5 +- config/build/markdown_examples.yaml | 2 + llms-full.txt | 1 + markdown/README.md | 1 + markdown/chapter_1_introduction/start_here.md | 16 ++++-- .../tutorial_6_scientific_workflow.md | 28 ++++++++++ notebooks/README.md | 5 +- notebooks/chapter_1_introduction/README.md | 2 + .../chapter_1_introduction/start_here.ipynb | 10 ++-- .../tutorial_6_scientific_workflow.ipynb | 56 +++++++++++++++++++ .../chapter_2_scientific_workflow/README.md | 10 ---- scripts/README.md | 5 +- scripts/chapter_1_introduction/README.md | 2 + scripts/chapter_1_introduction/start_here.py | 10 ++-- .../tutorial_6_scientific_workflow.py | 26 +++++++++ .../chapter_2_scientific_workflow/README.md | 10 ---- .../chapter_2_scientific_workflow/__init__.py | 0 start_here.ipynb | 7 +-- start_here.py | 7 +-- workspace_index.json | 13 ++++- 21 files changed, 165 insertions(+), 57 deletions(-) create mode 100644 markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md create mode 100644 notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb delete mode 100644 notebooks/chapter_2_scientific_workflow/README.md create mode 100644 scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py delete mode 100644 scripts/chapter_2_scientific_workflow/README.md delete mode 100644 scripts/chapter_2_scientific_workflow/__init__.py diff --git a/AGENTS.md b/AGENTS.md index 59fcde4..7e393ff 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -8,8 +8,7 @@ interpret probabilistic models from first principles. It is the teaching compani ## Repository Structure - `scripts/` — Runnable Python tutorial scripts: - - `chapter_1_introduction/` — Models, fitting data, non-linear searches, results and samples - - `chapter_2_scientific_workflow/` — Reserved stub for future material (empty except README) + - `chapter_1_introduction/` — Models, fitting data, non-linear searches, results and samples, and a prose-only scientific workflow closing tutorial - `chapter_3_graphical_models/` — Individual / graphical / hierarchical models, Expectation Propagation - `simulators/` — Simulator scripts that generate the tutorial 1D datasets at runtime - `notebooks/` — Jupyter versions, generated from `scripts/` (do not edit directly) @@ -65,6 +64,9 @@ The navigator catalogue — `llms-full.txt` + `workspace_index.json` — is what gates; it is rebuilt by the same PyAutoHands generate/merge flow that builds the notebooks. Commit regenerated notebooks and catalogue alongside the script changes. +`tutorial_6_scientific_workflow.py` is prose-only by design: its generated notebook must contain no +code cells, including Colab setup. Verify this after regeneration. + ## Bulk-edit safety When editing the same region across many scripts in one pass, only rewrite the targeted region. diff --git a/README.md b/README.md index 6372bec..feac30f 100644 --- a/README.md +++ b/README.md @@ -22,10 +22,7 @@ they are concise, API-focused, and assume the concepts taught in **HowToFit** as ## Chapters - `chapter_1_introduction` — Models, likelihoods, non-linear searches, why modeling is hard, and how to - interpret the results of a fit. -- `chapter_2_scientific_workflow` — Reserved for future material on building a full scientific - model-fitting workflow. Currently a stub; the corresponding overview lives in - `autofit_workspace/scripts/overview/overview_2_scientific_workflow.py`. + interpret the results of a fit, ending with a short guide to building a scientific workflow. - `chapter_3_graphical_models` — Fitting many datasets simultaneously with graphical models, hierarchical models, and Expectation Propagation. diff --git a/config/build/markdown_examples.yaml b/config/build/markdown_examples.yaml index 43c75ef..ce46b26 100644 --- a/config/build/markdown_examples.yaml +++ b/config/build/markdown_examples.yaml @@ -14,3 +14,5 @@ max_minutes: 120 - script: scripts/chapter_1_introduction/tutorial_5_results_and_samples.py max_minutes: 90 +- script: scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py + max_minutes: 1 diff --git a/llms-full.txt b/llms-full.txt index 53a12d4..530a5f4 100644 --- a/llms-full.txt +++ b/llms-full.txt @@ -20,6 +20,7 @@ AUTO-GENERATED by PyAutoHands — do not edit by hand; regenerate with generate. - Contents: Data, Model, Analysis, Alternative Syntax, Collection, Search, Model Fit, Result, Why Modeling is Hard, Prior Tuning, Reducing Complexity, Search More Thoroughly, Summary, Run Times, Model Mismatch, Astronomy Example, Wrap Up - [Tutorial 5: Results And Samples](scripts/chapter_1_introduction/tutorial_5_results_and_samples.py): In this tutorial, we'll cover all of the output that comes from a non-linear search's `Result` object. - Contents: Data, Reused Functions, Model Fit, Result, Samples, Parameters, Figures of Merit, Instances, Vectors, Labels, Posterior / PDF, Plot, Errors, PDF, Other Results, Sample Instance, Bayesian Evidence, Derived Errors (PDF from samples), Samples Filtering, Latex +- [Tutorial 6: Scientific Workflow](scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py): You can now compose a model, fit it to data and interpret its results. A scientific study often repeats these steps for many datasets, competing models and different non-linear searches. The next challenge is keeping those fits organized so that you can understand and compare them. ## chapter_3_graphical_models diff --git a/markdown/README.md b/markdown/README.md index 14dadaa..1036f21 100644 --- a/markdown/README.md +++ b/markdown/README.md @@ -8,5 +8,6 @@ Every page below is the corresponding example script **fully executed**, rendere - [Tutorial 3: Non Linear Search](chapter_1_introduction/tutorial_3_non_linear_search.md) — from `scripts/chapter_1_introduction/tutorial_3_non_linear_search.py` - [Tutorial 4: Why Modeling Is Hard](chapter_1_introduction/tutorial_4_why_modeling_is_hard.md) — from `scripts/chapter_1_introduction/tutorial_4_why_modeling_is_hard.py` - [Tutorial 5: Results And Samples](chapter_1_introduction/tutorial_5_results_and_samples.md) — from `scripts/chapter_1_introduction/tutorial_5_results_and_samples.py` +- [Tutorial 6: Scientific Workflow](chapter_1_introduction/tutorial_6_scientific_workflow.md) — from `scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py` These pages are regenerated manually by PyAutoHands's `generate_markdown.py` when a curated script changes. diff --git a/markdown/chapter_1_introduction/start_here.md b/markdown/chapter_1_introduction/start_here.md index 6a532fa..991f377 100644 --- a/markdown/chapter_1_introduction/start_here.md +++ b/markdown/chapter_1_introduction/start_here.md @@ -22,13 +22,10 @@ data analysis. The lectures use the probabilistic programming language PyAutoFit, an open-source library for model-fitting, scientific analysis, and big data analysis (https://github.com/PyAutoLabs/PyAutoFit). -The HowToFit lectures are composed of 3 chapters: +The HowToFit lectures cover an introductory chapter and an advanced chapter: **Chapter 1: Introduction**: How to fit a model to data, perform statistical inference, and interpret the results -for scientific analysis. - -**Chapter 2: Scientific Workflow**: Scaling model-fitting to big datasets while ensuring detailed scientific analysis -of the results. +for scientific analysis, ending with an introduction to scientific workflows. **Chapter 3: Graphical Models**: Simultaneous model fitting of large datasets, scaling up to models with tens of thousands of parameters. @@ -51,12 +48,19 @@ interpretation. The chapter includes: `tutorial_5_results_and_samples.py`: Interpreting model-fit results and using the samples for scientific analysis. +`tutorial_6_scientific_workflow.py`: A short, prose-only introduction to organizing and comparing many model fits, +with links to the scientific workflow guide and workspace example. + An applied astronomy-focused example (previously tutorial 8) now lives in `autofit_workspace_developer/scripts/howtofit/chapter_1_introduction/tutorial_8_astronomy_example.py`, -alongside the larger `projects/cosmology/` example. These depend on astronomy-specific datasets +alongside the larger `autofit_workspace_developer/projects/cosmology/` example. These depend on astronomy-specific datasets that only live in the developer workspace. ```python +from autofit import setup_notebook; setup_notebook() + ``` + + Working Directory has been set to `HowToFit` diff --git a/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md b/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md new file mode 100644 index 0000000..ad75aff --- /dev/null +++ b/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md @@ -0,0 +1,28 @@ +> ✏️ **This page is auto-generated from [`scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py`](../../scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py) — do not edit it directly.** +> It shows the example fully executed, with its real output images. +> Run it yourself via the [Python script](../../scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py) or the [Jupyter notebook](../../notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb). + +Tutorial 6: Scientific Workflow +============================== + +You can now compose a model, fit it to data and interpret its results. A scientific study often repeats +these steps for many datasets, competing models and different non-linear searches. The next challenge is +keeping those fits organized so that you can understand and compare them. + +PyAutoFit saves each fit's model, search settings, samples and summaries alongside its visualizations. +These outputs let you revisit a fit without rerunning inference, record quantities specific to your +science, and trace a comparison back to its original results. Live progress and model-fit plots also +help you develop intuition for how inference is progressing while a search runs. + +Imagine five datasets, each fitted with several models and searches. A scientific workflow makes that +collection navigable: you can inspect the folders yourself or ask an assistant to compare parameter +constraints, fit quality and runtime, and identify results that need closer attention. Model composition +provides the competing models; the workflow makes their results feasible to interpret together. + +Continue with the [Scientific Workflow guide](https://pyautofit.readthedocs.io/en/latest/overview/scientific_workflow.html) +for natural language prompts that build this workflow with an assistant. + +For the corresponding Python implementation, follow the +[workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py). + +Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models. diff --git a/notebooks/README.md b/notebooks/README.md index b5e3ca9..e8ed038 100644 --- a/notebooks/README.md +++ b/notebooks/README.md @@ -2,8 +2,7 @@ The `scripts` folder contains **HowToFit** lectures, which teach a new user how # Folders -- `chapter_1_introduction`: Introduction lectures describing how to compose and fit models in **PyAutoFit**. -- `chapter_2_scientific_workflow`: Reserved stub for future material on building a full scientific model-fitting workflow. The equivalent overview currently lives in `autofit_workspace/scripts/overview/overview_2_scientific_workflow.py`. +- `chapter_1_introduction`: Introduction lectures describing how to compose and fit models in **PyAutoFit**, ending with a prose-only introduction to scientific workflows. - `chapter_3_graphical_models`: How to compose and fit graphical models which fit many datasets simultaneously, including hierarchical models and Expectation Propagation. - `simulators`: Simulator scripts that generate the tutorial 1D datasets at runtime. @@ -34,7 +33,7 @@ is auto-formatted with `black` — see . # How to Approach HowToFit -**HowToFit** currently consists of three chapters (chapter 2 is a stub). Chapter 1 will take a couple of +**HowToFit** consists of the introductory chapter 1 and advanced chapter 3. Chapter 1 will take a couple of hours to work through. The concepts in chapter 3 are challenging, and familiarity with **PyAutoFit** and model fitting is desirable before tackling them. diff --git a/notebooks/chapter_1_introduction/README.md b/notebooks/chapter_1_introduction/README.md index 9933c16..fa87227 100644 --- a/notebooks/chapter_1_introduction/README.md +++ b/notebooks/chapter_1_introduction/README.md @@ -16,3 +16,5 @@ The chapter contains the following tutorials: - [Tutorial 4: Why Modeling Is Hard](https://colab.research.google.com/github/PyAutoLabs/HowToFit/blob/2026.9.8.1/notebooks/chapter_1_introduction/tutorial_4_why_modeling_is_hard.ipynb) — Why fitting complex models is challenging and how a good scientific approach overcomes common problems. - [Tutorial 5: Results and Samples](https://colab.research.google.com/github/PyAutoLabs/HowToFit/blob/2026.9.8.1/notebooks/chapter_1_introduction/tutorial_5_results_and_samples.ipynb) — Interpreting model-fit results and using the samples for scientific analysis. + +- [Tutorial 6: Scientific Workflow](../../notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb) — A prose-only introduction to organizing and comparing many fits, with links to the full guide and workspace example. diff --git a/notebooks/chapter_1_introduction/start_here.ipynb b/notebooks/chapter_1_introduction/start_here.ipynb index 917fb44..41e3467 100644 --- a/notebooks/chapter_1_introduction/start_here.ipynb +++ b/notebooks/chapter_1_introduction/start_here.ipynb @@ -24,13 +24,10 @@ "The lectures use the probabilistic programming language PyAutoFit, an open-source library for model-fitting,\n", "scientific analysis, and big data analysis (https://github.com/PyAutoLabs/PyAutoFit).\n", "\n", - "The HowToFit lectures are composed of 3 chapters:\n", + "The HowToFit lectures cover an introductory chapter and an advanced chapter:\n", "\n", "**Chapter 1: Introduction**: How to fit a model to data, perform statistical inference, and interpret the results\n", - "for scientific analysis.\n", - "\n", - "**Chapter 2: Scientific Workflow**: Scaling model-fitting to big datasets while ensuring detailed scientific analysis\n", - "of the results.\n", + "for scientific analysis, ending with an introduction to scientific workflows.\n", "\n", "**Chapter 3: Graphical Models**: Simultaneous model fitting of large datasets, scaling up to models with tens of\n", "thousands of parameters.\n", @@ -53,6 +50,9 @@ "\n", "`tutorial_5_results_and_samples.py`: Interpreting model-fit results and using the samples for scientific analysis.\n", "\n", + "`tutorial_6_scientific_workflow.py`: A short, prose-only introduction to organizing and comparing many model fits,\n", + "with links to the scientific workflow guide and workspace example.\n", + "\n", "An applied astronomy-focused example (previously tutorial 8) now lives in\n", "`autofit_workspace_developer/scripts/howtofit/chapter_1_introduction/tutorial_8_astronomy_example.py`,\n", "alongside the larger `autofit_workspace_developer/projects/cosmology/` example. These depend on astronomy-specific datasets\n", diff --git a/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb b/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb new file mode 100644 index 0000000..5156a07 --- /dev/null +++ b/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb @@ -0,0 +1,56 @@ +{ + "cells": [ + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "Tutorial 6: Scientific Workflow\n", + "==============================\n", + "\n", + "You can now compose a model, fit it to data and interpret its results. A scientific study often repeats\n", + "these steps for many datasets, competing models and different non-linear searches. The next challenge is\n", + "keeping those fits organized so that you can understand and compare them.\n", + "\n", + "PyAutoFit saves each fit's model, search settings, samples and summaries alongside its visualizations.\n", + "These outputs let you revisit a fit without rerunning inference, record quantities specific to your\n", + "science, and trace a comparison back to its original results. Live progress and model-fit plots also\n", + "help you develop intuition for how inference is progressing while a search runs.\n", + "\n", + "Imagine five datasets, each fitted with several models and searches. A scientific workflow makes that\n", + "collection navigable: you can inspect the folders yourself or ask an assistant to compare parameter\n", + "constraints, fit quality and runtime, and identify results that need closer attention. Model composition\n", + "provides the competing models; the workflow makes their results feasible to interpret together.\n", + "\n", + "Continue with the [Scientific Workflow guide](https://pyautofit.readthedocs.io/en/latest/overview/scientific_workflow.html)\n", + "for natural language prompts that build this workflow with an assistant.\n", + "\n", + "For the corresponding Python implementation, follow the\n", + "[workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py).\n", + "\n", + "Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models." + ] + } + ], + "metadata": { + "anaconda-cloud": {}, + "kernelspec": { + "display_name": "Python 3", + "language": "python", + "name": "python3" + }, + "language_info": { + "codemirror_mode": { + "name": "ipython", + "version": 3 + }, + "file_extension": ".py", + "mimetype": "text/x-python", + "name": "python", + "nbconvert_exporter": "python", + "pygments_lexer": "ipython3", + "version": "3.6.1" + } + }, + "nbformat": 4, + "nbformat_minor": 4 +} \ No newline at end of file diff --git a/notebooks/chapter_2_scientific_workflow/README.md b/notebooks/chapter_2_scientific_workflow/README.md deleted file mode 100644 index a8c2d78..0000000 --- a/notebooks/chapter_2_scientific_workflow/README.md +++ /dev/null @@ -1,10 +0,0 @@ -This folder will contain chapter 2 of the **HowToFit** lectures, which will explain -how to build a scientific workflow. However, the chapter is not written yet. - -The functionality required to develop a scientific workflow is fully supported in autofit and described in the -following overview example: - -`autofit_workspace/*/overview/overview_2_scientific_workflow.py` - -If you are a confident model-fitting practitioner, you should be able to follow this example to perform the tasks -required to build a scientific workflow. diff --git a/scripts/README.md b/scripts/README.md index b5e3ca9..e8ed038 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -2,8 +2,7 @@ The `scripts` folder contains **HowToFit** lectures, which teach a new user how # Folders -- `chapter_1_introduction`: Introduction lectures describing how to compose and fit models in **PyAutoFit**. -- `chapter_2_scientific_workflow`: Reserved stub for future material on building a full scientific model-fitting workflow. The equivalent overview currently lives in `autofit_workspace/scripts/overview/overview_2_scientific_workflow.py`. +- `chapter_1_introduction`: Introduction lectures describing how to compose and fit models in **PyAutoFit**, ending with a prose-only introduction to scientific workflows. - `chapter_3_graphical_models`: How to compose and fit graphical models which fit many datasets simultaneously, including hierarchical models and Expectation Propagation. - `simulators`: Simulator scripts that generate the tutorial 1D datasets at runtime. @@ -34,7 +33,7 @@ is auto-formatted with `black` — see . # How to Approach HowToFit -**HowToFit** currently consists of three chapters (chapter 2 is a stub). Chapter 1 will take a couple of +**HowToFit** consists of the introductory chapter 1 and advanced chapter 3. Chapter 1 will take a couple of hours to work through. The concepts in chapter 3 are challenging, and familiarity with **PyAutoFit** and model fitting is desirable before tackling them. diff --git a/scripts/chapter_1_introduction/README.md b/scripts/chapter_1_introduction/README.md index 9933c16..fa87227 100644 --- a/scripts/chapter_1_introduction/README.md +++ b/scripts/chapter_1_introduction/README.md @@ -16,3 +16,5 @@ The chapter contains the following tutorials: - [Tutorial 4: Why Modeling Is Hard](https://colab.research.google.com/github/PyAutoLabs/HowToFit/blob/2026.9.8.1/notebooks/chapter_1_introduction/tutorial_4_why_modeling_is_hard.ipynb) — Why fitting complex models is challenging and how a good scientific approach overcomes common problems. - [Tutorial 5: Results and Samples](https://colab.research.google.com/github/PyAutoLabs/HowToFit/blob/2026.9.8.1/notebooks/chapter_1_introduction/tutorial_5_results_and_samples.ipynb) — Interpreting model-fit results and using the samples for scientific analysis. + +- [Tutorial 6: Scientific Workflow](../../notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb) — A prose-only introduction to organizing and comparing many fits, with links to the full guide and workspace example. diff --git a/scripts/chapter_1_introduction/start_here.py b/scripts/chapter_1_introduction/start_here.py index 7b68652..7e4fda7 100644 --- a/scripts/chapter_1_introduction/start_here.py +++ b/scripts/chapter_1_introduction/start_here.py @@ -19,13 +19,10 @@ The lectures use the probabilistic programming language PyAutoFit, an open-source library for model-fitting, scientific analysis, and big data analysis (https://github.com/PyAutoLabs/PyAutoFit). -The HowToFit lectures are composed of 3 chapters: +The HowToFit lectures cover an introductory chapter and an advanced chapter: **Chapter 1: Introduction**: How to fit a model to data, perform statistical inference, and interpret the results -for scientific analysis. - -**Chapter 2: Scientific Workflow**: Scaling model-fitting to big datasets while ensuring detailed scientific analysis -of the results. +for scientific analysis, ending with an introduction to scientific workflows. **Chapter 3: Graphical Models**: Simultaneous model fitting of large datasets, scaling up to models with tens of thousands of parameters. @@ -48,6 +45,9 @@ `tutorial_5_results_and_samples.py`: Interpreting model-fit results and using the samples for scientific analysis. +`tutorial_6_scientific_workflow.py`: A short, prose-only introduction to organizing and comparing many model fits, +with links to the scientific workflow guide and workspace example. + An applied astronomy-focused example (previously tutorial 8) now lives in `autofit_workspace_developer/scripts/howtofit/chapter_1_introduction/tutorial_8_astronomy_example.py`, alongside the larger `autofit_workspace_developer/projects/cosmology/` example. These depend on astronomy-specific datasets diff --git a/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py b/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py new file mode 100644 index 0000000..b2a1779 --- /dev/null +++ b/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py @@ -0,0 +1,26 @@ +""" +Tutorial 6: Scientific Workflow +============================== + +You can now compose a model, fit it to data and interpret its results. A scientific study often repeats +these steps for many datasets, competing models and different non-linear searches. The next challenge is +keeping those fits organized so that you can understand and compare them. + +PyAutoFit saves each fit's model, search settings, samples and summaries alongside its visualizations. +These outputs let you revisit a fit without rerunning inference, record quantities specific to your +science, and trace a comparison back to its original results. Live progress and model-fit plots also +help you develop intuition for how inference is progressing while a search runs. + +Imagine five datasets, each fitted with several models and searches. A scientific workflow makes that +collection navigable: you can inspect the folders yourself or ask an assistant to compare parameter +constraints, fit quality and runtime, and identify results that need closer attention. Model composition +provides the competing models; the workflow makes their results feasible to interpret together. + +Continue with the [Scientific Workflow guide](https://pyautofit.readthedocs.io/en/latest/overview/scientific_workflow.html) +for natural language prompts that build this workflow with an assistant. + +For the corresponding Python implementation, follow the +[workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py). + +Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models. +""" diff --git a/scripts/chapter_2_scientific_workflow/README.md b/scripts/chapter_2_scientific_workflow/README.md deleted file mode 100644 index a8c2d78..0000000 --- a/scripts/chapter_2_scientific_workflow/README.md +++ /dev/null @@ -1,10 +0,0 @@ -This folder will contain chapter 2 of the **HowToFit** lectures, which will explain -how to build a scientific workflow. However, the chapter is not written yet. - -The functionality required to develop a scientific workflow is fully supported in autofit and described in the -following overview example: - -`autofit_workspace/*/overview/overview_2_scientific_workflow.py` - -If you are a confident model-fitting practitioner, you should be able to follow this example to perform the tasks -required to build a scientific workflow. diff --git a/scripts/chapter_2_scientific_workflow/__init__.py b/scripts/chapter_2_scientific_workflow/__init__.py deleted file mode 100644 index e69de29..0000000 diff --git a/start_here.ipynb b/start_here.ipynb index a445285..803921d 100644 --- a/start_here.ipynb +++ b/start_here.ipynb @@ -14,14 +14,13 @@ "\n", "__HowToFit__\n", "\n", - "**HowToFit** is a three-chapter guide which takes you from knowing nothing about model fitting\n", + "**HowToFit** is a guide which takes you from knowing nothing about model fitting\n", "to being able to compose, fit, and interpret complex graphical and hierarchical models with\n", "**PyAutoFit** for scientific research.\n", "\n", "- Chapter 1: Introduction \u2014 what a model is, how we fit data, how non-linear searches work,\n", - " why model fitting is hard, and how to inspect the results.\n", - "- Chapter 2: Scientific workflow \u2014 placeholder for future material. For now, the equivalent\n", - " overview lives in ``autofit_workspace/scripts/overview/overview_2_science_workflow.py``.\n", + " why model fitting is hard, and how to inspect the results. The final tutorial introduces\n", + " scientific workflows and links to the full guide and workspace example.\n", "- Chapter 3: Graphical models \u2014 fitting many datasets simultaneously with graphical models,\n", " hierarchical models, and Expectation Propagation.\n", "\n", diff --git a/start_here.py b/start_here.py index 3619637..6a1594e 100644 --- a/start_here.py +++ b/start_here.py @@ -9,14 +9,13 @@ __HowToFit__ -**HowToFit** is a three-chapter guide which takes you from knowing nothing about model fitting +**HowToFit** is a guide which takes you from knowing nothing about model fitting to being able to compose, fit, and interpret complex graphical and hierarchical models with **PyAutoFit** for scientific research. - Chapter 1: Introduction — what a model is, how we fit data, how non-linear searches work, - why model fitting is hard, and how to inspect the results. -- Chapter 2: Scientific workflow — placeholder for future material. For now, the equivalent - overview lives in ``autofit_workspace/scripts/overview/overview_2_science_workflow.py``. + why model fitting is hard, and how to inspect the results. The final tutorial introduces + scientific workflows and links to the full guide and workspace example. - Chapter 3: Graphical models — fitting many datasets simultaneously with graphical models, hierarchical models, and Expectation Propagation. diff --git a/workspace_index.json b/workspace_index.json index 157c883..fc3c726 100644 --- a/workspace_index.json +++ b/workspace_index.json @@ -7,7 +7,8 @@ "tutorial_2_fitting_data.py", "tutorial_3_non_linear_search.py", "tutorial_4_why_modeling_is_hard.py", - "tutorial_5_results_and_samples.py" + "tutorial_5_results_and_samples.py", + "tutorial_6_scientific_workflow.py" ], "notebook": "notebooks/chapter_1_introduction/start_here.ipynb", "path": "scripts/chapter_1_introduction/start_here.py", @@ -138,6 +139,16 @@ "summary": "In this tutorial, we'll cover all of the output that comes from a non-linear search's `Result` object.", "title": "Tutorial 5: Results And Samples" }, + { + "contents": [], + "cross_refs": [ + "//github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py" + ], + "notebook": "notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb", + "path": "scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py", + "summary": "You can now compose a model, fit it to data and interpret its results. A scientific study often repeats these steps for many datasets, competing models and different non-linear searches. The next challenge is keeping those fits organized so that you can understand and compare them.", + "title": "Tutorial 6: Scientific Workflow" + }, { "contents": [ "Real World Example", From 8883fcc155f28b09493ad04bc4569ad57e5b1c96 Mon Sep 17 00:00:00 2001 From: Jammy2211 Date: Thu, 10 Sep 2026 09:15:57 -0400 Subject: [PATCH 2/2] docs: mark scientific workflow tutorial complete --- .../chapter_1_introduction/tutorial_6_scientific_workflow.md | 2 ++ .../chapter_1_introduction/tutorial_6_scientific_workflow.ipynb | 2 ++ .../chapter_1_introduction/tutorial_6_scientific_workflow.py | 2 ++ 3 files changed, 6 insertions(+) diff --git a/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md b/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md index ad75aff..9a4a088 100644 --- a/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md +++ b/markdown/chapter_1_introduction/tutorial_6_scientific_workflow.md @@ -25,4 +25,6 @@ for natural language prompts that build this workflow with an assistant. For the corresponding Python implementation, follow the [workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py). +__Wrap Up__ + Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models. diff --git a/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb b/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb index 5156a07..d916ec4 100644 --- a/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb +++ b/notebooks/chapter_1_introduction/tutorial_6_scientific_workflow.ipynb @@ -27,6 +27,8 @@ "For the corresponding Python implementation, follow the\n", "[workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py).\n", "\n", + "__Wrap Up__\n", + "\n", "Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models." ] } diff --git a/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py b/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py index b2a1779..4621e5c 100644 --- a/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py +++ b/scripts/chapter_1_introduction/tutorial_6_scientific_workflow.py @@ -22,5 +22,7 @@ For the corresponding Python implementation, follow the [workspace scientific workflow example](https://github.com/PyAutoLabs/autofit_workspace/blob/main/scripts/overview/overview_2_scientific_workflow.py). +__Wrap Up__ + Apply the workflow to your own data before returning to chapter 3 for graphical and hierarchical models. """