Skip to content

[FEATURE_REQUEST] Download pretrained model weights to a filepath inside of the repository folder #400

Open
@mawah

Description

@mawah

Description

In the 01_training_introduction.ipynb file in the object detection folder, I ran a code cell with the following code/output:

detector = DetectionLearner(data, im_size=IM_SIZE)
> Downloading: "https://download.pytorch.org/models/fasterrcnn_resnet50_fpn_coco-258fb6c6.pth" to C:\Users\mawah/.cache\torch\checkpoints\fasterrcnn_resnet50_fpn_coco-258fb6c6.pth

Pre-trained model weights are relatively large files and may not be deleted for quite a while if stored in the cache. Users may prefer that all files associated with this repository are deleted when the repository is removed from their machine. Users who intend to build on the tutorial may also appreciate having the weights stored to a permanent filepath so that they can be referenced by the user's own code.

I also recommend that you point to a URL of a file is stored and redistributed by Microsoft (even if it means having to train a network from scratch because you do not have rights to distribute the pretrained model weights) because the given link will surely break someday.

Expected behavior with the suggested feature

Pretrained model weights are saved by default to a permanent filepath instead of a cache. By default this filepath is inside of the repository, so that any downloaded pretrained model weights files are deleted when the repository is deleted.

Other Comments

Metadata

Metadata

Assignees

No one assigned

    Labels

    bug-bashIssues that you came across during the bug-bash

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions