Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
38 commits
Select commit Hold shift + click to select a range
e22acaa
Stole templates from documentation repo
validbeck Dec 31, 2024
75f3f7d
Edits to templates
validbeck Dec 31, 2024
bad8488
Updating README
validbeck Dec 31, 2024
e5a68ee
Testing a script
validbeck Dec 31, 2024
b8bc4de
Adding title
validbeck Dec 31, 2024
0509213
Setup the other cells
validbeck Dec 31, 2024
4ddf5fd
Test append
validbeck Dec 31, 2024
cb9fb8b
Test adding IDs to cells
validbeck Dec 31, 2024
e2f9bfe
Add install info
validbeck Jan 1, 2025
ee110fd
Add next steps & upgrade info
validbeck Jan 1, 2025
69b0cdf
Cleanup & testing Makefile
validbeck Jan 1, 2025
53c81f5
Draft for notebook wording
validbeck Jan 1, 2025
455b867
README
validbeck Jan 1, 2025
1d78229
ToC
validbeck Jan 1, 2025
ae96d19
Wording tweaks
validbeck Jan 1, 2025
39ddc2a
Updated main notebooks/ README
validbeck Jan 1, 2025
476a50a
Modifying Makefile
validbeck Jan 1, 2025
09ca0d8
Tweaking the READMEs
validbeck Jan 2, 2025
981201b
Trying somtehing with the cell IDs
validbeck Jan 2, 2025
689a46f
It works, let's try it again
validbeck Jan 2, 2025
cb92bbc
Spiltting the templates into more cells
validbeck Jan 2, 2025
61538a7
Hm
validbeck Jan 2, 2025
00313a7
Asking for template & use-case
validbeck Jan 2, 2025
56bf981
Whoo
validbeck Jan 2, 2025
fec89f7
Typo
validbeck Jan 2, 2025
8bbb373
Tweak
validbeck Jan 2, 2025
5c2d0dd
Almost theeeere
validbeck Jan 2, 2025
5cf43cc
Final? tweak
validbeck Jan 2, 2025
8cf151e
I lied
validbeck Jan 2, 2025
2254714
Wordiiiing
validbeck Jan 2, 2025
8b5902f
Trying something with template IDs
validbeck Jan 2, 2025
26d9be1
Trying something with template IDs - p2
validbeck Jan 2, 2025
a515637
Trying something with template IDs - p3
validbeck Jan 2, 2025
2ff225c
Trying something with template IDs - p4
validbeck Jan 2, 2025
25ca144
Grabbing original IDs
validbeck Jan 2, 2025
17bc771
It workssss
validbeck Jan 2, 2025
dbd5f73
Wording
validbeck Jan 2, 2025
0c5d316
2.7.3
validbeck Jan 3, 2025
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
6 changes: 5 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# https://stackoverflow.com/questions/10858261/how-to-abort-makefile-if-variable-not-set
# https://stackoverflow.com/questions/10858261/how-to-abort-makefile-if-variable-not-set
check_defined = \
$(strip $(foreach 1,$1, \
$(call __check_defined,$1,$(strip $(value 2)))))
Expand Down Expand Up @@ -79,3 +79,7 @@ ensure-clean-notebooks:
check: copyright format lint test verify-copyright verify-exposed-credentials ensure-clean-notebooks

.PHONY: docs

notebook:
@python notebooks/templates/e2e_template.py
git status | grep -v 'notebooks/templates'
6 changes: 4 additions & 2 deletions notebooks/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,6 @@ Sample notebooks are organized into the following folders:
* `notebooks/how_to` — Learn how to use specific ValidMind features, e.g. how to list all test suites
* `notebooks/tutorials` — Get step-by-step instructions and learn about ValidMind concepts in depth
* `notebooks/code_sharing` — Share your own notebooks or document code internally
* `notebooks/archive` — Deprecrated notebooks, that have either been retired or replaced with newer content


## Getting started

Expand All @@ -19,3 +17,7 @@ If this is your first time trying out ValidMind, you can make use of the followi

- [Get started](https://docs.validmind.ai/get-started/get-started.html) — The basics, including key concepts, and how our products work
- [Get started with the ValidMind Library](https://docs.validmind.ai/developer/get-started-validmind-library.html) — The path for developers, more code samples, and our developer reference

## Contributing code samples

Head over to [`notebooks/templates`](templates/) to find templates to help you create your own custom ValidMind code samples.
18 changes: 18 additions & 0 deletions notebooks/templates/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Jupyter Notebook template QuickStart

Want to create some code samples for ValidMind? Our **[End-to-end notebook template generation](e2e-notebook.ipynb) notebook** will generate a new file with all the bits and pieces of a standard ValidMind notebook to get you started.

The same functionality is also accesible [in our root directory Makefile](../../Makefile) as a command:

```bash
make notebook
```

## Mini-templates

The template generation script/notebook draws from the following mini-templates, should you need to revise them or grab the information from them manually:

- [`about-validmind.ipynb`](about-validmind.ipynb): Conceptual overview of ValidMind & prerequisites.
- [`install-initialize-validmind.ipynb`](install-initialize-validmind.ipynb): ValidMind Library installation & initialization instructions.
- [`next-steps.ipynb`](next-steps.ipynb): Directions to review the generated documentation within the ValidMind Platform & additional learning resources.
- [`upgrade-validmind.ipynb`](upgrade-validmind.ipynb): Instructions for comparing & upgrading versions of the ValidMind Library.
82 changes: 82 additions & 0 deletions notebooks/templates/about-validmind.ipynb
Original file line number Diff line number Diff line change
@@ -0,0 +1,82 @@
{
"cells": [
{
"cell_type": "markdown",
"id": "about-intro",
"metadata": {},
"source": [
"## About ValidMind\n",
"\n",
"ValidMind is a suite of tools for managing model risk, including risk associated with AI and statistical models. \n",
"\n",
"You use the ValidMind Library to automate documentation and validation tests, and then use the ValidMind Platform to collaborate on model documentation. Together, these products simplify model risk management, facilitate compliance with regulations and institutional standards, and enhance collaboration between yourself and model validators."
]
},
{
"cell_type": "markdown",
"id": "about-begin",
"metadata": {},
"source": [
"### Before you begin\n",
"\n",
"This notebook assumes you have basic familiarity with Python, including an understanding of how functions work. If you are new to Python, you can still run the notebook but we recommend further familiarizing yourself with the language. \n",
"\n",
"If you encounter errors due to missing modules in your Python environment, install the modules with `pip install`, and then re-run the notebook. For more help, refer to [Installing Python Modules](https://docs.python.org/3/installing/index.html)."
]
},
{
"cell_type": "markdown",
"id": "about-signup",
"metadata": {},
"source": [
"### New to ValidMind?\n",
"\n",
"If you haven't already seen our [Get started with the ValidMind Library](https://docs.validmind.ai/guide/get-started-validmind-library.html), we recommend you explore the available resources for developers at some point. There, you can learn more about documenting models, find code samples, or read our developer reference.\n",
"\n",
"<div class=\"alert alert-block alert-info\" style=\"background-color: #B5B5B510; color: black; border: 1px solid #083E44; border-left-width: 5px; box-shadow: 2px 2px 4px rgba(0, 0, 0, 0.2);border-radius: 5px;\"><span style=\"color: #083E44;\"><b>For access to all features available in this notebook, create a free ValidMind account.</b></span>\n",
"<br></br>\n",
"Signing up is FREE — <a href=\"https://docs.validmind.ai/guide/configuration/register-with-validmind.html\" style=\"color: #DE257E;\"><b>Register with ValidMind</b></a></div>"
]
},
{
"cell_type": "markdown",
"id": "about-concepts",
"metadata": {},
"source": [
"### Key concepts\n",
"\n",
"**Model documentation**: A structured and detailed record pertaining to a model, encompassing key components such as its underlying assumptions, methodologies, data sources, inputs, performance metrics, evaluations, limitations, and intended uses. It serves to ensure transparency, adherence to regulatory requirements, and a clear understanding of potential risks associated with the model’s application.\n",
"\n",
"**Documentation template**: Functions as a test suite and lays out the structure of model documentation, segmented into various sections and sub-sections. Documentation templates define the structure of your model documentation, specifying the tests that should be run, and how the results should be displayed.\n",
"\n",
"**Tests**: A function contained in the ValidMind Library, designed to run a specific quantitative test on the dataset or model. Tests are the building blocks of ValidMind, used to evaluate and document models and datasets, and can be run individually or as part of a suite defined by your model documentation template.\n",
"\n",
"**Metrics**: A subset of tests that do not have thresholds. In the context of this notebook, metrics and tests can be thought of as interchangeable concepts.\n",
"\n",
"**Custom metrics**: Custom metrics are functions that you define to evaluate your model or dataset. These functions can be registered with the ValidMind Library to be used in the ValidMind Platform.\n",
"\n",
"**Inputs**: Objects to be evaluated and documented in the ValidMind Library. They can be any of the following:\n",
"\n",
" - **model**: A single model that has been initialized in ValidMind with [`vm.init_model()`](/validmind/validmind.html#init_model).\n",
" - **dataset**: Single dataset that has been initialized in ValidMind with [`vm.init_dataset()`](/validmind/validmind.html#init_dataset).\n",
" - **models**: A list of ValidMind models - usually this is used when you want to compare multiple models in your custom metric.\n",
" - **datasets**: A list of ValidMind datasets - usually this is used when you want to compare multiple datasets in your custom metric. See this [example](/notebooks/how_to/run_tests_that_require_multiple_datasets.ipynb) for more information.\n",
"\n",
"**Parameters**: Additional arguments that can be passed when running a ValidMind test, used to pass additional information to a metric, customize its behavior, or provide additional context.\n",
"\n",
"**Outputs**: Custom metrics can return elements like tables or plots. Tables may be a list of dictionaries (each representing a row) or a pandas DataFrame. Plots may be matplotlib or plotly figures.\n",
"\n",
"**Test suites**: Collections of tests designed to run together to automate and generate model documentation end-to-end for specific use-cases.\n",
"\n",
"Example: the [`classifier_full_suite`](/validmind/validmind/test_suites/classifier.html#ClassifierFullSuite) test suite runs tests from the [`tabular_dataset`](/validmind/validmind/test_suites/tabular_datasets.html) and [`classifier`](/validmind/validmind/test_suites/classifier.html) test suites to fully document the data and model sections for binary classification model use-cases."
]
}
],
"metadata": {
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 2
}
Loading
Loading