Fix output formatting for PEER evaluation callback#152
Merged
Conversation
added 2 commits
July 18, 2025 22:16
- Convert NumPy scalars to Python types for clean YAML formatting - Use clean enum values (e.g., 'bindingdb') instead of 'PEERTask.BINDINGDB' - Move convert_numpy_to_python utility to _peer_utils.py for reusability - Ensure consistent markdown formatting with other evaluation callbacks This makes PEER evaluation results display cleanly in evaluation reports, matching the format of CALM and MoleculeACE callbacks.
- Fix cache key assertions to use task.value instead of str(task) - Fix probe storage assertions to use task.value instead of str(task) - Ensure all tests pass with updated PEER callback implementation
ncfrey
approved these changes
Jul 21, 2025
src/lobster/callbacks/_peer_utils.py
Outdated
|
|
||
| def convert_numpy_to_python(obj): | ||
| """Recursively convert NumPy scalars to Python types for clean YAML formatting.""" | ||
| if isinstance(obj, dict): |
- Updated test splits to use only most important split per task: * humanppi/yeastppi: only 'test' (removed cross_species_test) * bindingdb: only 'holdout_test' (removed random_test) * fold: only 'test_superfamily_holdout' for remote homology detection * secondarystructure: only 'cb513' benchmark - Removed categories section and task averaging logic since each task now has single split - Added descriptive comments to fold and secondarystructure task constants - Updated convert_numpy_to_python to use modern match-case syntax - Updated tests to match simplified evaluation behavior - Kept global mean aggregation across all tasks
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.
This makes PEER evaluation results display cleanly in evaluation reports, matching the format of CALM and MoleculeACE callbacks.
Description
Brief description of changes made
Type of Change
Testing
Checklist