Skip to content

[Fix issue #239] Adjust timm imports and update requirements.txt #246

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

pm25
Copy link
Contributor

@pm25 pm25 commented May 17, 2025

What does this PR do?

Fixes #239

This PR addresses the import error described in issue #239:

ModuleNotFoundError: No module named 'timm.models.layers.helpers'

The error arises because the import path in the timm library has changed in newer versions. Following the suggestions from @wpsapp123, @CHR-ray, and @thunguyenth (see: #239), this PR updates the import statements to match the new structure of the timm library.

Additionally, I have updated requirements.txt to specify timm>=1.0.11, which is the minimum version required to ensure compatibility with the new import path and prevent this error in the future.

Does your PR introduce any breaking changes? If yes, please list them.

No.

I have verified that the updated timm version (>=1.0.11) is compatible with the minimal versions of the other packages listed in requirements.txt. I also tested the FixMatch implementation to confirm that it continues to work as expected.

Before submitting

  • Was this discussed/approved via a GitHub issue? (not for typos and docs)
  • Did you read the contributor guideline, Pull Request section?
  • Did you make sure your PR does only one thing, instead of bundling different changes together?
  • Did you make sure to update the documentation with your changes? (if necessary)
  • Did you list all the breaking changes introduced by this pull request?

PR review

Anyone in the community is welcome to review the PR.
Before you start reviewing, make sure you have read the review guidelines. In short, see the following bullet-list:

  • Is this pull request ready for review? (if not, please submit in draft mode)
  • Check that all items from Before submitting are resolved
  • Make sure the title is self-explanatory and the description concisely explains the PR
  • Add labels and milestones (and optionally projects) to the PR so it can be classified

@pm25
Copy link
Contributor Author

pm25 commented May 17, 2025

@pm25 please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

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.

ModuleNotFoundError: No module named 'timm.models.layers.helpers'
1 participant