Skip to content

upload: fix benchmark deletion filter to match upload filter#543

Open
Dev-X25874 wants to merge 1 commit into
huggingface:mainfrom
Dev-X25874:fix/benchmark-delete-non-py-files
Open

upload: fix benchmark deletion filter to match upload filter#543
Dev-X25874 wants to merge 1 commit into
huggingface:mainfrom
Dev-X25874:fix/benchmark-delete-non-py-files

Conversation

@Dev-X25874
Copy link
Copy Markdown

Related issue

Closes #

What does this PR do?

The deletion predicate in collect_benchmark_commit_ops was missing && n.ends_with(".py"), causing non-.py files under benchmarks/ to be incorrectly deleted on existing branches.

Motivation

The upload pass only adds benchmark*.py files. The deletion pass should match the same filter. The existing comment even stated "only delete benchmark*.py" but the predicate didn't enforce it.

Changes

  • Added && n.ends_with(".py") to the deletion predicate in collect_benchmark_commit_ops

Testing

  • Existing tests pass unchanged

Checklist

  • This PR is linked to an issue that was discussed and approved
  • I have tested these changes locally
  • New/changed functionality has test coverage

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.

1 participant