Skip to content

FIX: Accept string keys in update_node_formatters#8218

Open
Ahmadhassan011 wants to merge 15 commits intopymc-devs:mainfrom
Ahmadhassan011:fix/node-formatters-string-keys
Open

FIX: Accept string keys in update_node_formatters#8218
Ahmadhassan011 wants to merge 15 commits intopymc-devs:mainfrom
Ahmadhassan011:fix/node-formatters-string-keys

Conversation

@Ahmadhassan011
Copy link
Copy Markdown

Description

This PR fixes issue #8091 by allowing users to pass both NodeType enum members and their string values (e.g., 'Free Random Variable') as node_formatter keys.

The Problem

The update_node_formatters function was validating keys only against NodeType enum members, but the documented examples show users passing string keys like 'Free Random Variable'.

The Fix

  1. Added string values to valid keys check
  2. Normalized string keys to enum keys for consistent handling

Testing

  • Verified fix works with string keys
  • Verified enum keys still work
  • Pre-commit checks passed

Issue

Closes #8091

Checklist

  • Tests added/updated
  • Pre-commit checks passed

ricardoV94 and others added 15 commits February 28, 2026 17:30
…from trace (pymc-devs#8015)

Co-authored-by: Michael Osthege <michael.osthege@outlook.com>
Like done with other Metropolis step methods.
- Distinguish between prior use (not recommended) and likelihood use (allowed)
- Explain why Wishart is problematic for MCMC sampling
- Reference LKJCholeskyCov/LKJCorr as alternatives
- Closes pymc-devs#8196
Allow users to pass both NodeType enum members and their string values
(e.g., 'Free Random Variable') as node_formatter keys, matching the
documented API examples.

- Added string values to valid keys check
- Normalize string keys to enum keys for consistent handling
- Closes pymc-devs#8091
@read-the-docs-community
Copy link
Copy Markdown

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants