Skip to content

Commit

Permalink
Fix/download model logs (#1361)
Browse files Browse the repository at this point in the history
* fix/mistral-nemo-chat-template

* Fix: change log when re download model

* fix: remove unnecessary logs
nguyenhoangthuan99 authored Oct 1, 2024
1 parent 93bce74 commit db6d822
Showing 3 changed files with 3 additions and 5 deletions.
4 changes: 1 addition & 3 deletions engine/commands/model_pull_cmd.cc
Original file line number Diff line number Diff line change
@@ -6,8 +6,6 @@ void ModelPullCmd::Exec(const std::string& input) {
auto result = model_service_.DownloadModel(input);
if (result.has_error()) {
CLI_LOG(result.error());
} else {
CLI_LOG("Model downloaded successfully!");
}
}
}
}; // namespace commands
2 changes: 2 additions & 0 deletions engine/services/download_service.cc
Original file line number Diff line number Diff line change
@@ -183,6 +183,7 @@ cpp::result<void, std::string> DownloadService::Download(
CLI_LOG("Resuming download..");
} else {
CLI_LOG("Start over..");
return {};
}
} else {
CLI_LOG(download_item.localPath.filename().string()
@@ -231,6 +232,7 @@ cpp::result<void, std::string> DownloadService::Download(

fclose(file);
curl_easy_cleanup(curl);
CLI_LOG("Model " << download_id << " downloaded successfully!")
return {};
}

2 changes: 0 additions & 2 deletions engine/services/model_service.cc
Original file line number Diff line number Diff line change
@@ -223,7 +223,6 @@ cpp::result<std::string, std::string> ModelService::HandleUrl(
}}}};

auto on_finished = [&](const DownloadTask& finishedTask) {
CLI_LOG("Model " << finishedTask.id << " downloaded successfully!")
auto gguf_download_item = finishedTask.items[0];
ParseGguf(gguf_download_item, author);
};
@@ -295,7 +294,6 @@ cpp::result<std::string, std::string> ModelService::DownloadModelFromCortexso(
return cpp::fail(result.error());
}

CLI_LOG("Model " << model_id << " downloaded successfully!")
return model_id;
}

0 comments on commit db6d822

Please sign in to comment.