Draft
Fix EfficientNet-B3 training failure due to SSL certificate error when downloading weights#6392
Conversation
Copilot
AI
changed the title
[WIP] Fix EfficientNet-B3 training failure with certificate verification
Fix EfficientNet-B3 training failure due to SSL certificate error when downloading weights
May 6, 2026
…cal path - Add pretrained_weights_path parameter to TorchvisionBackbone that loads weights from a local file instead of downloading from PyTorch servers - Add pretrained_weights_path parameter to TVModelMulticlassCls, TVModelMultilabelCls, and TVModelHLabelCls that is passed through to backbone - Add _inject_pretrained_weights_path static method to GetiTuneTrainer that checks if the model class supports pretrained_weights_path and injects the pre-downloaded weights path into model init_args when training from scratch - Call _inject_pretrained_weights_path in train_model when has_parent_revision=False to resolve the TODO comment referencing this issue - Add tests for _inject_pretrained_weights_path and train_model without parent revision Agent-Logs-Url: https://github.com/open-edge-platform/training_extensions/sessions/9e58cbd2-c6ef-47e3-a528-64a237272cbe Co-authored-by: itallix <1437853+itallix@users.noreply.github.com>
…ptions Agent-Logs-Url: https://github.com/open-edge-platform/training_extensions/sessions/9e58cbd2-c6ef-47e3-a528-64a237272cbe Co-authored-by: itallix <1437853+itallix@users.noreply.github.com>
d31952d to
d022957
Compare
🐳 Docker image sizes
|
📊 Test coverage report
|
|
Codecov Report❌ Patch coverage is
📢 Thoughts on this report? Let us know! |
Contributor
|
@itallix |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
EfficientNet-B3 training fails with
CERTIFICATE_VERIFY_FAILEDbecauseTorchvisionBackboneunconditionally triggers a download fromhttps://download.pytorch.org/models/via torchvision's weight enum mechanism — even when the weights are already pre-downloaded locally byBaseWeightsService. The pre-downloaded path was silently ignored (there was a TODO comment acknowledging this gap).Changes
TorchvisionBackbone(backbones/torchvision.py)pretrained_weights_path: str | Path | None = NoneparameterTV model wrappers (
TVModelMulticlassCls,TVModelMultilabelCls,TVModelHLabelCls)pretrained_weights_path: str | None = Nonedown toTorchvisionBackboneGetiTuneTrainer(getitune_trainer.py)_inject_pretrained_weights_path()static method: usesinspect.signatureto check if the model class acceptspretrained_weights_path, then injects the pre-downloaded path intomodel_cfg["init_args"]train_model()whenhas_parent_revision=False, resolving the existing TODO referencing this issueImportError,AttributeError,ValueError) with a warning fallback so non-TV models are unaffectedHow to test
https://download.pytorch.orgis unreachable or SSL verification fails — training should succeed using the locally pre-downloaded weightspretrained_weights_pathparameterChecklist