-
Notifications
You must be signed in to change notification settings - Fork 181
Model update command/api #1309
Model update command/api #1309
Conversation
Signed-off-by: James <[email protected]>
fix: resume download failed
|
@nguyenhoangthuan99 Can I check the main purpose of the
|
* fix: require sudo for cortex update * fix: comment
…nto feat/model-update-cmd
|
|
||
| void ModelUpdCmd::UpdateConfig(const std::string& key, | ||
| const std::string& value) { | ||
| static const std::unordered_map< |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hmm, I think there's a better way. We can define a function: UpdateModelConfig(const std::string& attr, std::variant<std::string, explicit_int, explicit_bool>) and handle the update logic there.
However if this works for you then I'm fine with it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think should keep it this way. We don't know which format user will input, so need to handle it for specific cases
* feat: pulling interact with new model.list * feat: return model id when download model success * feat: model delete for new model.list (#1317) * feat: models delete for new models data folder structure * feat: delete model * feat: cortex chat/run/models start with new model data structure (#1301) * feat: cortex chat/run/models start with new model data structure * temp * fix: use model_id from model service and std::get_line * f:m * Model update command/api (#1309) * Model update command/api * fix: resume download failed Signed-off-by: James <[email protected]> * fix: align github syntax for cuda (#1316) * fix: require sudo for cortex update (#1318) * fix: require sudo for cortex update * fix: comment * refactor code * Format code * Add clean up when finish test * remove model.list after finish test * Fix windows CI build --------- Signed-off-by: James <[email protected]> Co-authored-by: James <[email protected]> Co-authored-by: vansangpfiev <[email protected]> * Add more fields to handle when update --------- Signed-off-by: James <[email protected]> Co-authored-by: James <[email protected]> Co-authored-by: vansangpfiev <[email protected]>
Closes #1154
command option:

Now cortex.cpp can update model parameters by passing it to this command, only passed argument will be updated
If successfully Update, it will output which parameters of model ID is updated