Skip to content
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

Vendor efficientnet-pytorch #1036

Merged
merged 4 commits into from
Jan 16, 2025
Merged

Conversation

adamjstewart
Copy link
Collaborator

Supersedes #1018

EfficientNet-PyTorch doesn't have wheels on PyPI, and is no longer maintained. Let's vendor it and maintain it ourselves. This will make SMP easier to install.

This PR doesn't deprecate the non-timm EfficientNet implementation, but we can also do that if we want to. Let's wait until we have download statistics.

Will do the same thing with pretrainedmodels once this is merged.

Copy link

codecov bot commented Jan 15, 2025

Codecov Report

Attention: Patch coverage is 71.47766% with 83 lines in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
...mentation_models_pytorch/encoders/_efficientnet.py 71.37% 83 Missing ⚠️
Files with missing lines Coverage Δ
...gmentation_models_pytorch/encoders/efficientnet.py 94.33% <100.00%> (-0.11%) ⬇️
...mentation_models_pytorch/encoders/_efficientnet.py 71.37% <71.37%> (ø)

@qubvel
Copy link
Collaborator

qubvel commented Jan 15, 2025

Thanks for moving it and removing dependency! What do you think re removing unnecessary code? I mean not all functions/methods are required, such as from_pretrained

Copy link
Collaborator

@qubvel qubvel left a comment

Choose a reason for hiding this comment

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

Thanks!

segmentation_models_pytorch/encoders/_efficientnet.py Outdated Show resolved Hide resolved
Copy link
Collaborator

@qubvel qubvel left a comment

Choose a reason for hiding this comment

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

Thanks, a few things to remove and we can merge it

segmentation_models_pytorch/encoders/_efficientnet.py Outdated Show resolved Hide resolved
segmentation_models_pytorch/encoders/_efficientnet.py Outdated Show resolved Hide resolved
segmentation_models_pytorch/encoders/_efficientnet.py Outdated Show resolved Hide resolved
segmentation_models_pytorch/encoders/_efficientnet.py Outdated Show resolved Hide resolved
@qubvel qubvel merged commit ce65165 into qubvel-org:main Jan 16, 2025
16 of 17 checks passed
@qubvel
Copy link
Collaborator

qubvel commented Jan 16, 2025

Thanks!

@adamjstewart adamjstewart deleted the deps/efficientnet branch January 16, 2025 11:41
@adamjstewart
Copy link
Collaborator Author

pretrainedmodels is up next. This one is a bit more complicated because we have multiple models. Should we have a segmentation_models_pytorch/encoders/_pretrainedmodels/ directory containing each model, or multiple segmentation_models_pytorch/encoders/_foo.py files for each model?

@qubvel
Copy link
Collaborator

qubvel commented Jan 16, 2025

I prefer segmentation_models_pytorch/encoders/_foo.py, but feel free to choose the one you think is better.

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