-
Notifications
You must be signed in to change notification settings - Fork 4
Documented test result metadata in UI #277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
validbeck
merged 16 commits into
main
from
beck/sc-4768/documentation-display-result-metadata-on
Aug 22, 2024
Merged
Changes from all commits
Commits
Show all changes
16 commits
Select commit
Hold shift + click to select a range
c4d26f7
Shuffled around some guides on developer/ to make room for new test m…
validbeck 0b8ad79
Edits to e2e workflow
validbeck 52b52ab
More shiftin'
validbeck 04f9f15
Work with test results draft
validbeck fddc6eb
Added a gif & cleaned up instructions
validbeck 898fa97
Forgor images RIP
validbeck 8b6cfe1
Pulled in latest from main & tweaked a bit more
validbeck 28e369f
Tweaks to landing wording, changed JN to branded capitalization
validbeck b4b7a21
Cleaned up workflow & fiddled with article sequence
validbeck e9907bb
Adjusted title of install & initialize
validbeck 7f242d9
Tweaks to dropdown & prereq
validbeck 6cec113
Final tweaks
validbeck 7cec0d5
Tweaked test-driven block docs based on Steven's suggestion
validbeck 0be1e1c
Update site/developer/model-documentation/generating-model-documentat…
validbeck ccce3cd
Update site/developer/model-documentation/generate-model-documentatio…
validbeck d10cd7e
Edited numbering
validbeck File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
136 changes: 42 additions & 94 deletions
136
site/developer/model-documentation/generate-model-documentation.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,128 +1,76 @@ | ||
| --- | ||
| title: "Generate model documentation" | ||
| title: "Document models" | ||
| date: last-modified | ||
| --- | ||
|
|
||
| ## How do I use the {{< var validmind.developer >}}? | ||
| Generate model documentation starting with your model or model predictions, load your model or predictions into the {{< var vm.developer >}}, then finally view the results and refine your documentation in the {{< var vm.platform >}} to make it ready for approval. | ||
|
|
||
| A typical high-level workflow for model developers consists of four major steps: | ||
| ::: {.prereq} | ||
|
|
||
| ```{mermaid} | ||
| graph LR | ||
| A[Develop<br>model] --> B[Generate model<br>documentation] | ||
| B --> C[Refine model<br>documentation] | ||
| C --> D[Submit for review] | ||
| C --> B | ||
| ``` | ||
| <br> | ||
| ## Prerequisites | ||
|
|
||
| 1. **Develop your model**[^1] — In your existing developer environment, build one or more candidate models that need to be validated. This step includes all the usual activities you already follow as a model developer. | ||
| - [x] {{< var link.login >}} | ||
| - [x] You are the model owner. | ||
| - [x] You are a `Developer` or assigned another role with sufficient permissions to perform the tasks in this guide.[^1] | ||
|
|
||
| 2. **Generate model documentation** — With the {{< var validmind.developer >}}, generate automated model documentation and run validation tests. This step includes making use of the automation and testing functionality provided by the {{< var vm.developer >}} and uploading the output to the {{< var vm.platform >}}. You can iteratively regenerate the documentation as you work though the next step of refining your documentation. | ||
|
|
||
| 3. **Refine model documentation** — In the {{< var validmind.platform >}}, review the generated documentation and test output. Iterate over the documentation and test output to refine your model documentation. Collaborate with other developers and model validators to finalize the model documentation and get it ready for review. | ||
|
|
||
| 4. **Submit for review** — In the {{< var validmind.platform >}}, you submit the model documentation for review which moves the documentation workflow moves to the next phase where a model validator will review it. | ||
|
|
||
| Before you can use the {{< var validmind.developer >}}, you need to verify that the current documentation template contains all the necessary tests for the model you are developing: | ||
|
|
||
| - The template might already be sufficient and you only need to run the template within the {{< var vm.developer >}} to populate documentation. | ||
|
|
||
| - Or, more likely, the template might need additional tests that you can add these tests via the {{< var vm.developer >}}. | ||
|
|
||
| ## How do I generate documentation? | ||
|
|
||
| This process of verifying the suitability of the the current documentation template and adding more tests to the template is an iterative process: | ||
|
|
||
| ```{mermaid} | ||
| graph LR | ||
| A[Verify template] --> B[Build template] | ||
| B --> D[Add tests and<br>content blocks] | ||
| D --> E[Add external<br>test providers] | ||
| E --> C[Run template] | ||
| C --> B | ||
|
|
||
| ``` | ||
| <br> | ||
|
|
||
| Build the template | ||
| : When the documentation template requires more tests to be added, or if the documentation template does not include a specific content or test block you need: | ||
|
|
||
| - For functionality provided by the {{< var validmind.developer >}} — [Add the relevant tests or content blocks](/guide/model-documentation/work-with-content-blocks.qmd) for the model use case. | ||
|
|
||
| - For tests not provided by the {{< var vm.developer >}} — [Add your own external test provider](/notebooks/code_samples/custom_tests/integrate_external_test_providers.ipynb). | ||
|
|
||
|
|
||
| Run the template | ||
| : When you have registered all the required tests as content blocks in the documentation template, populate the necessary model documentation by adding this call to your model: | ||
|
|
||
|
|
||
| ```python | ||
| run_documentation_tests() | ||
| ``` | ||
|
|
||
|
|
||
| ::: {.callout-important title="ValidMind may not support all potential use cases or provide a universally applicable documentation template."} | ||
| Typically, you initiate the process of putting ValidMind into production by constructing a template specific for your own use case and then refine your the documentation project. | ||
| ::: | ||
|
|
||
| ## End-to end workflow | ||
|
|
||
| ### In your modeling environment | ||
|
|
||
| 1. Build your model. | ||
| ## End-to-end workflow | ||
|
|
||
| 2. Export the datasets and model. | ||
| ### 1. In your modeling environment | ||
|
|
||
| Next, go to **With the {{< var validmind.developer >}}, Step 2**. {{< fa arrow-right >}} | ||
| 1. Build your model or your model predictions.[^2] | ||
|
|
||
| ### With the {{< var validmind.developer >}} | ||
| 2. Export the datasets and model or predictions. | ||
|
|
||
| 1. Create a notebook to select and build the relevant tests. | ||
| ### 2. With the {{< var validmind.developer >}} | ||
|
|
||
| 2. {{< fa arrow-right >}} **From your modeling environment**, load the trained datasets and models. | ||
| 1. **From your modeling environment**, load the trained datasets and models or predictions. | ||
|
|
||
| 3. {{< fa arrow-right >}} Use the instructions from **In the {{< var vm.platform >}}, Step 3**, [initialize the {{< var validmind.developer >}}](install-and-initialize-developer-framework.qmd). | ||
| 2. [Install and initialize ValidMind.](install-and-initialize-validmind.qmd) | ||
|
|
||
| 4. Select the relevant tests. | ||
| 3. Select the relevant tests. | ||
|
|
||
| 5. Review if all tests are covered by ValidMind or your external test provider: | ||
| 4. Review if all tests are covered by ValidMind or your external test provider: | ||
|
|
||
| - If all tests are NOT covered — Create and register additional tests. | ||
| - If all tests are covered — | ||
| - **If all tests are NOT covered** — Create and register additional tests. | ||
| - **If all tests are covered** — | ||
| a. Run the selected tests. | ||
| b. Review your test results. | ||
|
|
||
| Next, go to **In the {{< var validmind.platform >}}, Step 5**. {{< fa arrow-right >}} | ||
| ### 3. In the {{< var validmind.platform >}} | ||
|
|
||
| ### In the {{< var validmind.platform >}} | ||
|
|
||
| 1. [Register a new model](/guide/model-inventory/register-models-in-inventory.qmd). | ||
|
|
||
| 2. Review the template structure. | ||
|
|
||
| 3. [Locate the {{< var vm.developer >}} integration instructions](install-and-initialize-developer-framework.qmd#locate-the-framework-integration-instructions). | ||
|
|
||
| 4. Go to **With the {{< var validmind.developer >}}, Step 3**. {{< fa arrow-right >}} | ||
|
|
||
| 5. {{< fa arrow-right >}} After **With the {{< var validmind.developer >}}, Step 6**, [add content blocks](/guide/model-documentation/work-with-content-blocks.qmd) to your model documentation: | ||
| 1. **After installing and initalizing the {{< var validmind.developer >}}**,[^4] add content blocks[^3] to your model documentation: | ||
|
|
||
| Select the block type: | ||
|
|
||
| - For test-driven blocks: Select from available test provider results | ||
| - For text blocks: | ||
| - **For test-driven blocks** — Select from available test provider results[^5] | ||
| - **For text blocks** — | ||
|
|
||
| - For new block: | ||
| - Add new editable text content block | ||
| - Review and collaborate on the content block | ||
| - For existing blocks: Select from available texts from content provider | ||
| a. For new block: | ||
| 1. Add new editable text content block | ||
| 2. Review and collaborate on the content block | ||
| b. For existing blocks: Select from available texts from content provider | ||
|
|
||
| 2. [Submit your model documentation for review](/guide/model-documentation/submit-for-approval.qmd). | ||
|
validbeck marked this conversation as resolved.
|
||
|
|
||
| 6. [Submit your model documentation for review](/guide/model-documentation/submit-for-approval.qmd). | ||
| ## What's next | ||
|
|
||
| - [Store project credentials in `.env` files](store-credentials-in-env-file.qmd) | ||
| - [Work with test results](work-with-test-results.qmd) | ||
|
|
||
|
|
||
| <!-- FOOTNOTES --> | ||
|
|
||
| [^1]: | ||
| [^1]: [Manage permissions](/guide/configuration/manage-permissions.qmd) | ||
|
|
||
| [^2]: | ||
|
|
||
| **No available model?**<br> | ||
| You can still run tests and log documentation with ValidMind as long as you're able to [load the model predictions](/faq/faq-documentation.qmd#can-i-run-tests-and-log-documentation-without-having-a-model-available). | ||
| You can still run tests and log documentation with ValidMind as long as you're able to [load the model predictions](/faq/faq-documentation.qmd#can-i-run-tests-and-log-documentation-without-having-a-model-available). | ||
|
|
||
| [^3]: [Work with content blocks](/guide/model-documentation/work-with-content-blocks.qmd) | ||
|
|
||
| [^4]: [Install and initialize ValidMind](install-and-initialize-validmind.qmd) | ||
|
|
||
| [^5]: [Work with test results](work-with-test-results.qmd) | ||
101 changes: 101 additions & 0 deletions
101
site/developer/model-documentation/generating-model-documentation.qmd
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,101 @@ | ||
| --- | ||
| title: "Documenting models" | ||
| date: last-modified | ||
| listing: | ||
| - id: generate-documentation | ||
| type: grid | ||
| grid-columns: 2 | ||
| max-description-length: 250 | ||
| sort: false | ||
| fields: [title, description] | ||
| contents: | ||
| - generate-model-documentation.qmd | ||
| - install-and-initialize-validmind.qmd | ||
| - work-with-test-results.qmd | ||
| - store-credentials-in-env-file.qmd | ||
| --- | ||
|
|
||
| Use the {{< var vm.developer >}} to generate model documentation, view the results and refine your documentation in the {{< var vm.platform >}}, and collaborate with your team to complete documentation and validation projects within the same interface. | ||
|
|
||
| ## How do I use the {{< var validmind.developer >}}? | ||
|
|
||
| A typical high-level workflow for model developers consists of four major steps: | ||
|
|
||
| ```{mermaid} | ||
| %%| fig-align: center | ||
| graph LR | ||
| A[Develop<br>model] --> B[Generate model<br>documentation] | ||
| B --> C[Refine model<br>documentation] | ||
| C --> D[Submit for review] | ||
| C --> B | ||
| ``` | ||
| <br> | ||
|
|
||
| #### 1. Develop your model[^1] | ||
|
|
||
| In your existing developer environment, build one or more candidate models that need to be validated. This step includes all the usual activities you already follow as a model developer. | ||
|
|
||
| #### 2. Generate model documentation | ||
|
|
||
| With the {{< var validmind.developer >}}, generate automated model documentation and run validation tests. This step includes making use of the automation and testing functionality provided by the {{< var vm.developer >}} and uploading the output to the {{< var vm.platform >}}. You can iteratively regenerate the documentation as you work though the next step of refining your documentation. | ||
|
|
||
| #### 3. Refine model documentation | ||
| In the {{< var validmind.platform >}}, review the generated documentation and test output. Iterate over the documentation and test output to refine your model documentation. Collaborate with other developers and model validators to finalize the model documentation and get it ready for review. | ||
|
|
||
| #### 4. Submit for review | ||
| In the {{< var validmind.platform >}}, you submit the model documentation for review which moves the documentation workflow moves to the next phase where a model validator will review it. | ||
|
|
||
| Before you can use the {{< var validmind.developer >}}, you need to verify that the current documentation template contains all the necessary tests for the model you are developing: | ||
|
|
||
| - The template might already be sufficient and you only need to run the template within the {{< var vm.developer >}} to populate documentation. | ||
| - Or, more likely, the template might need additional tests that you can add these tests via the {{< var vm.developer >}}. | ||
|
|
||
| ## How do I generate documentation? | ||
|
|
||
| This process of verifying the suitability of the the current documentation template and adding more tests to the template is an iterative process: | ||
|
|
||
| ```{mermaid} | ||
| %%| fig-align: center | ||
| graph LR | ||
| A[Verify template] --> B[Build template] | ||
| B --> D[Add tests and<br>content blocks] | ||
| D --> E[Add external<br>test providers] | ||
| E --> C[Run template] | ||
| C --> B | ||
|
|
||
| ``` | ||
| <br> | ||
|
|
||
| #### Build the template | ||
|
|
||
| When the documentation template requires more tests to be added, or if the documentation template does not include a specific content or test block you need: | ||
|
|
||
| - **For functionality provided by the {{< var validmind.developer >}}** — [Add the relevant tests or content blocks](/guide/model-documentation/work-with-content-blocks.qmd) for the model use case. | ||
| - **For tests not provided by the {{< var vm.developer >}}** — [Add your own external test provider](/notebooks/code_samples/custom_tests/integrate_external_test_providers.ipynb). | ||
|
|
||
|
|
||
| #### Run the template | ||
|
|
||
| When you have registered all the required tests as content blocks in the documentation template, populate the necessary model documentation by adding this call to your model: | ||
|
|
||
| ```python | ||
| run_documentation_tests() | ||
| ``` | ||
|
|
||
| ::: {.callout-important title="ValidMind may not support all potential use cases or provide a universally applicable documentation template."} | ||
| Typically, you initiate the process of putting ValidMind into production by constructing a template specific for your own use case and then refine your the documentation project. | ||
| ::: | ||
|
|
||
|
|
||
| ## What's next | ||
|
|
||
| :::{#generate-documentation} | ||
| ::: | ||
|
|
||
|
|
||
| <!-- FOOTNOTES --> | ||
|
|
||
| [^1]: | ||
|
|
||
| **No available model?**<br> | ||
| You can still run tests and log documentation with ValidMind as long as you're able to [load the model predictions](/faq/faq-documentation.qmd#can-i-run-tests-and-log-documentation-without-having-a-model-available). |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.