Skip to content

docs: 'document' parameter in vm.init() for model document target#1211

Merged
validbeck merged 24 commits intomainfrom
beck/sc-14938/document-document-parameter-in-vm-init-for
Mar 11, 2026
Merged

docs: 'document' parameter in vm.init() for model document target#1211
validbeck merged 24 commits intomainfrom
beck/sc-14938/document-document-parameter-in-vm-init-for

Conversation

@validbeck
Copy link
Collaborator

@validbeck validbeck commented Mar 10, 2026

Pull Request Description

What and why?

sc-14938

It's now required in ValidMind Library versions >=2.12.0 that a document is selected when copying your code snippet in the ValidMind Platform. Documentation updated to reflect this functionality:

Install and initialize the ValidMind Library

  • Added the document parameter to the vm.init() code snippet and arguments table, reflecting a new library feature (>=2.12.0) that requires users select which model document to upload test results to.
  • Prerequisites now references needing a registered model, an applied template, and being a model stakeholder with write access (replacing the old role-based requirement).
  • Restructured the page flow — Sections renamed (e.g. "Install ValidMind" becomes "Installing the ValidMind Library"), a new "Get your code snippet" subsection with a step to select a document, and improved intro copy.
  • Add a "What's next" listing at the bottom linking to the .env credentials guide and the testing overview.

Store model credentials in .env files

  • Reorganized into numbered sections ("1. Store credentials in an .env file" and "2. Use credentials in your Jupyter Notebook") with tabbed panels for sub-steps (get snippet vs. create file) and for with/without monitoring examples.
  • Added the document parameter to the vm.init() examples, consistent with the install and initialization page changes.
  • Updated prerequisites now references being a model stakeholder with write access (replacing the old role-based requirement).
  • Added a "What's next" grid listing linking to the testing overview and feature overview pages.

Enable monitoring

  • The intro was simplified, removing the numbered two-step outline.
  • The entire page was restructured into a tabbed panel (panel-tabset) with three tabs:
    1. Get monitoring code snippet — uses the new _code-snippet.qmd include, instructs selecting Monitoring from the document dropdown, and setting the monitoring flag to true.
    2. Select monitoring template — the existing template selection steps, moved into their own tab.
    3. Run code snippet — a new tab with instructions to paste and run the snippet, including the document="monitoring" parameter in the example and a collapsible callout explaining how to use .env files with monitoring.
  • The old troubleshooting section was replaced with a prominent callout warning that a template must be applied before initializing.
  • The vm.init() example now includes document="monitoring" (requiring >=2.12.0).

Quickstarts (Model Development & Model Validation)

Updated conditional content based on a custom includes.developer metadata flag: Added a new step to select the document from the dropdown: Development for developers, Validation for validators.

  • get-started/common-steps/_get-your-code-snippet.qmd

Training (training/common-slides/_get-your-code-snippet.qmd, training/common-slides/_retrieve-your-code-snippet.qmd)

Common training slides were substantially expanded to support conditional content based on a custom includes.developer metadata flag:

  • When includes.developer: true — Slides instruct selecting Development from the document dropdown.
  • When includes.developer is absent — Slides instruct selecting Validation from the document dropdown.

Updates to notebook listing population Python scripts

site/scripts/developer-sidebar scripts updated

The two scripts in this directory auto-populate the listing tabs on the following landing pages from notebooks sourced from the validmind-library:

Added functionality for including page-size: 4 to each listing tab so that the entries are paginated instead of stretching down really far.

Pages updated

Tested the updated scripts — scripts added page-size: 4 to the aforementioned landing pages, paginating notebook cards to show 4 per tabbed section instead of displaying all at once.

How to test

Click on the live previews and compare the changes with the help of the detailed change log above:

preview link OLD NEW
Install and initialize the ValidMind Library
old-install.mov
new-install.mov
Store model credentials in .env files
old-credentials.mov
new-credentials.mov
Enable monitoring
old-monitoring.mov
new-monitoring.mov
Quickstart — Model Development (Click 3. Get your code snippet tab) Screenshot 2026-03-10 at 2 09 39 PM Screenshot 2026-03-10 at 2 26 43 PM
Quickstart — Model Validation Screenshot 2026-03-10 at 2 09 54 PM Screenshot 2026-03-10 at 2 26 56 PM
Developer Fundamentals (Click Modules 1-3
developer-old.mov
developer-new.mov
Validator Fundamentals (Click Modules 1-3)
validator-old.mov
validator-new.mov
How to use ValidMind Library features
old-features.mov
new-features.mov
Code samples (Click Credit risk and NLP and LLM tabs)
old-samples.mov
new-samples.mov

What needs special review?

Important

Some instances of the rename (model documentation > Development) were left untouched (I only updated the images or text relevant to retrieving the code snippet) as this is covered by sc-14434.

Dependencies, breaking changes, and deployment notes

Note

Notebooks / validmind-library side hasn't been updated — opened related sc-15077 to deal with this as it's got its own requirements. When changes are complete there, I will pull the updates back into the documentation repo side.

Release notes

Covered in validmind/validmind-library#479.

Checklist

  • What and why
  • Screenshots or videos (Frontend)
  • How to test
  • What needs special review
  • Dependencies, breaking changes, and deployment notes
  • Labels applied
  • PR linked to Shortcut
  • Unit tests added (Backend)
  • Tested locally
  • Documentation updated (if required)
  • Environment variable additions/changes documented (if required)

@validbeck validbeck self-assigned this Mar 10, 2026
@validbeck validbeck added the internal Not to be externalized in the release notes label Mar 10, 2026
@github-actions
Copy link
Contributor

PR Summary

This pull request introduces several enhancements and bug fixes to the developer documentation and user interface components of the project. The changes include:

  1. Grid Pagination: Multiple QMD files for various sections (e.g., feature overview, sample notebooks) have been updated to include a new attribute page-size: 4 in the grid listings. This ensures a consistent number of items per page across different sections of the site.

  2. Code Snippet Documentation: A new file _code-snippet.qmd has been added to the model documentation section. This file provides clear instructions regarding initialization, code snippet usage, and proper connection to the platform. The instructions include details on how to obtain and use the unique code snippet for each model.

  3. Updated Installation and Initialization Guides: The installation guide for the ValidMind library has been revised to incorporate more detailed instructions. New steps include selecting the appropriate document type (e.g., Development, Validation, Monitoring) and ensuring that prerequisites are met, such as having a template applied to the model document. The guide now also covers retrieving code snippets, copying them, and initializing the library with proper parameters like document and monitoring flags.

  4. Environment Credentials Handling: The guide on storing credentials in .env files has been enhanced. It now clarifies the security benefits of separating credentials from inline code and provides a more detailed step-by-step process for setting up and using a .env file with code snippet modifications in Jupyter Notebooks.

  5. Developer-Specific UI Adjustments: Several training and get-started slide files have been updated to include conditionally visible content when developer metadata is present. This ensures that developers see relevant instructions and interactive iframe content, while non-developer views follow a different rendering path.

  6. Script Updates: Minor script changes in the sidebar update logic have been made to include the new page-size attribute in the generated listings, keeping the UI consistent across sections.

Test Suggestions

  • Verify that grid listings across all pages display exactly 4 items per page.
  • Test the retrieval and copying of code snippets for Development, Validation, and Monitoring to ensure the correct document type is selected.
  • Ensure that the new _code-snippet.qmd file renders correctly and the embedded copyright/license notice is in place.
  • Validate that the conditional content (e.g., developer-specific slides) renders appropriately based on the metadata tags.
  • Perform a manual walkthrough of the environment credentials setup to verify that instructions provided for using .env files work as expected.

@github-actions
Copy link
Contributor

Lighthouse check results

⚠️ WARN: Average accessibility score is 0.87 (required: >0.9) — Check the workflow run

Show Lighthouse scores

Folder depth level checked: 0

Commit SHA: 4112d0d

Modify the workflow to check a different depth:

  • 0: Top-level navigation only — /index.html, /guide/guides.html, ...
  • 1: All first-level subdirectories — /guide/.html, /developer/.html, ...
  • 2: All second-level subdirectories — /guide/attestation/*.html, ...
Page Accessibility Performance Best Practices SEO
/developer/validmind-library.html 0.85 0.67 1.00 0.82
/get-started/get-started.html 0.85 0.69 1.00 0.73
/guide/guides.html 0.85 0.69 1.00 0.82
/index.html 0.93 0.66 1.00 0.82
/releases/all-releases.html 0.86 0.69 1.00 0.73
/support/support.html 0.91 0.62 1.00 0.82
/training/training.html 0.85 0.67 0.96 0.73

@github-actions
Copy link
Contributor

Validate docs site

✓ INFO: A live preview of the docs site is available — Open the preview

@validbeck validbeck requested a review from nrichers March 10, 2026 21:44
Copy link

@mdeyell-valid-mind mdeyell-valid-mind left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

looks good

@validbeck validbeck merged commit 99dd51a into main Mar 11, 2026
21 checks passed
@validbeck validbeck deleted the beck/sc-14938/document-document-parameter-in-vm-init-for branch March 11, 2026 02:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

internal Not to be externalized in the release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants