Skip to content

Fix output formatting for PEER evaluation callback#152

Merged
taylormjs merged 3 commits intomainfrom
t/eval-outputs
Jul 21, 2025
Merged

Fix output formatting for PEER evaluation callback#152
taylormjs merged 3 commits intomainfrom
t/eval-outputs

Conversation

@taylormjs
Copy link
Collaborator

  • 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.

Description

Brief description of changes made

Type of Change

  • Bug fix
  • New feature
  • Documentation update
  • Performance improvement
  • Code refactoring

Testing

  • Tests pass locally
  • Added new tests for new functionality
  • Updated existing tests if needed

Checklist

  • Code follows style guidelines
  • Self-review completed
  • Documentation updated if needed
  • No breaking changes (or clearly documented)

Taylor Joren 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
@taylormjs taylormjs marked this pull request as ready for review July 18, 2025 22:55
@taylormjs taylormjs requested a review from karinazad July 21, 2025 15:45

def convert_numpy_to_python(obj):
"""Recursively convert NumPy scalars to Python types for clean YAML formatting."""
if isinstance(obj, dict):
Copy link
Contributor

Choose a reason for hiding this comment

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

use match/case here ?

- 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
@taylormjs taylormjs merged commit f53a078 into main Jul 21, 2025
5 checks passed
@taylormjs taylormjs deleted the t/eval-outputs branch July 21, 2025 18:42
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.

2 participants