Skip to content

Comments

move sanitize_metadata out of save_metadata#852

Merged
willccbb merged 1 commit intomainfrom
sebastian/sanitize-metadata-2026-02-06
Feb 7, 2026
Merged

move sanitize_metadata out of save_metadata#852
willccbb merged 1 commit intomainfrom
sebastian/sanitize-metadata-2026-02-06

Conversation

@snimu
Copy link
Contributor

@snimu snimu commented Feb 7, 2026

Description

Moves sanitize_metadata out of save_metadata. The reason is that there's no reason for the function to be defined inside the other function, and that prime-rl tries to import sanitize_metadata which it cannot if it's nested in such a way.

Type of Change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update
  • Test improvement

Testing

  • All existing tests pass when running uv run pytest locally.
  • New tests have been added to cover the changes

Checklist

  • My code follows the style guidelines of this project as outlined in AGENTS.md
  • I have performed a self-review of my own code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • Any dependent changes have been merged and published

Note

Low Risk
Small refactor that only changes function scope/visibility; serialization and file-writing behavior remains the same.

Overview
Moves sanitize_metadata out of save_metadata in verifiers/utils/save_utils.py, making it a top-level helper that can be imported by other packages.

save_metadata now calls the extracted sanitize_metadata function, preserving the same metadata filtering (path_to_save, date) before writing metadata.json.

Written by Cursor Bugbot for commit 16b47ad. This will update automatically on new commits. Configure here.

@willccbb willccbb merged commit 495683f into main Feb 7, 2026
6 checks passed
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