Save weights to custom folder of user 's choice#130
Save weights to custom folder of user 's choice#130valavanisleonidas wants to merge 2 commits intoroboflow:developfrom
Conversation
|
Hi @valavanisleonidas 👋🏻 Thank you so much for your interest in RF-DETR and for submitting this PR! We won’t be merging this PR in its current form, and here’s why:
Thanks again for your contribution! Let me know if you’d like to discuss this further or explore alternative approaches. |
|
Hello @SkalskiP, thank you for your response. I was trying to implement something with minimal changes to the code. To be honest I took the idea from Ultralytics in which you can do Another idea is to have two properties one for selecting the model to download I just believe it's really useful to be able to select where to save the model if it is not in a |
|
Yes, I believe the responsibility should be split between the two arguments. |
60b16c1 to
523f9df
Compare
|
@valavanisleonidas, apologies for being silent for quite some time. I wanted to quickly click with you if you are still interested in working on this PR, as the title suggests?
I don't think this is a good pattern to follow
Yes, I agree with this one... |
|
Hello @Borda, yes I can continue with the PR. the selected path is to add an env var |
Personally, I would take the simple path for now, let's have env. variable what would specify cache/home directory, which by default can be, for example, |
|
ok
Ok sounds good! |
Cool, are you going to continue? 🦝 |
Hey i have been busy lately. i plan to continue and fix it this week :) |
a6e6ca0 to
0485141
Compare
Description
This PR enhances the model downloading utility by allowing the user to choose any custom path to save the weights of the model. The destination path’s parent directories are created before saving the file.
The PR introduces one more config variable
pretrain_save_file:Optional[str] = 'model.pth'which is used to select the path to save the file. it can bemodels/model.pthor justdetr-large.pthfor example. The variablepretrain_weightsis used to select the model to use and has 3 values from theHOSTED_MODELSdictType of change
How has this change been tested, please provide a testcase or example of how you tested the change?
Manually tested by setting pretrain_weights to a custom path and verifying:
I have tested the following scenarios with comments on expected behavior
Any specific deployment considerations
Docs