FIX: Accept string keys in update_node_formatters#8218
Open
Ahmadhassan011 wants to merge 15 commits intopymc-devs:mainfrom
Open
FIX: Accept string keys in update_node_formatters#8218Ahmadhassan011 wants to merge 15 commits intopymc-devs:mainfrom
Ahmadhassan011 wants to merge 15 commits intopymc-devs:mainfrom
Conversation
…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
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
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_formattersfunction was validating keys only against NodeType enum members, but the documented examples show users passing string keys like 'Free Random Variable'.The Fix
Testing
Issue
Closes #8091
Checklist