Skip to content

fix(trainer): add missing wildcard to .pt and .pth ignore patterns#372

Open
ghazariann wants to merge 2 commits intokubeflow:mainfrom
ghazariann:main
Open

fix(trainer): add missing wildcard to .pt and .pth ignore patterns#372
ghazariann wants to merge 2 commits intokubeflow:mainfrom
ghazariann:main

Conversation

@ghazariann
Copy link

What this PR does / why we need it:

Fixes a typo in INITIALIZER_DEFAULT_IGNORE_PATTERNS.pt and .pth were missing the * wildcard prefix, so files like model.pt or weights.pth were never actually ignored during model initialization.

Which issue(s) this PR fixes:

Fixes #370

Checklist:

  • Docs included if any changes are user facing

Copilot AI review requested due to automatic review settings March 8, 2026 19:50
@github-actions
Copy link
Contributor

github-actions bot commented Mar 8, 2026

🎉 Welcome to the Kubeflow SDK! 🎉

Thanks for opening your first PR! We're happy to have you as part of our community 🚀

Here's what happens next:

  • If you haven't already, please check out our Contributing Guide for repo-specific guidelines and the Kubeflow Contributor Guide for general community standards
  • Our team will review your PR soon! cc @kubeflow/kubeflow-sdk-team

Join the community:

Feel free to ask questions in the comments if you need any help or clarification!
Thanks again for contributing to Kubeflow! 🙏

Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR fixes a bug where INITIALIZER_DEFAULT_IGNORE_PATTERNS in constants.py had .pt and .pth entries missing the * glob wildcard prefix, meaning files like model.pt or weights.pth were never matched by the ignore patterns during model initialization.

Changes:

  • Added * wildcard prefix to .pt and .pth patterns, changing them to *.pt and *.pth to match the existing convention used by the other entries (*.msgpack, *.h5, *.bin).

You can also share your feedback on Copilot code review. Take the survey.

Copy link
Contributor

@kramaranya kramaranya left a comment

Choose a reason for hiding this comment

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

Thanks @ghazariann!
/lgtm

Copy link
Member

@andreyvelich andreyvelich left a comment

Choose a reason for hiding this comment

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

Thanks @ghazariann!
This needs to be aligned with Trainer initializer: https://github.com/kubeflow/trainer/blob/db1047909da21407f89b99969b2e2c7cc484d69e/pkg/initializers/types/types.py#L31-L41
Can you update it as well please?
/ok-to-test

@google-oss-prow
Copy link
Contributor

New changes are detected. LGTM label has been removed.

@google-oss-prow
Copy link
Contributor

[APPROVALNOTIFIER] This PR is NOT APPROVED

This pull-request has been approved by:
Once this PR has been reviewed and has the lgtm label, please ask for approval from kramaranya. For more information see the Kubernetes Code Review Process.

The full list of commands accepted by this bot can be found here.

Details Needs approval from an approver in each of these files:

Approvers can indicate their approval by writing /approve in a comment
Approvers can cancel approval by writing /approve cancel in a comment

@google-oss-prow google-oss-prow bot added size/L and removed size/XS labels Mar 11, 2026
Vahagn and others added 2 commits March 11, 2026 12:23
Signed-off-by: Vahagn <vghazaryan@cloudlinux.com>
Signed-off-by: ghazariann <vahagn.ghazayan@gmail.com>
@ghazariann
Copy link
Author

Thanks @ghazariann! This needs to be aligned with Trainer initializer: https://github.com/kubeflow/trainer/blob/db1047909da21407f89b99969b2e2c7cc484d69e/pkg/initializers/types/types.py#L31-L41 Can you update it as well please? /ok-to-test

Done! Fixed in kubeflow/trainer#3307

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

bug(sdk): Missing glob wildcard prefix for .pt and .pth in INITIALIZER_DEFAULT_IGNORE_PATTERNS

4 participants