From 99c2456bbbf290074e9200e91af973d92a014774 Mon Sep 17 00:00:00 2001 From: Salvatore Rossitto Date: Fri, 13 Mar 2026 10:29:55 +0100 Subject: [PATCH] removed error guard on dataset (its not generic) --- examples/qlora_training/finetune_qlora.cpp | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/examples/qlora_training/finetune_qlora.cpp b/examples/qlora_training/finetune_qlora.cpp index 57972712fc..cf6705c5a6 100644 --- a/examples/qlora_training/finetune_qlora.cpp +++ b/examples/qlora_training/finetune_qlora.cpp @@ -217,11 +217,12 @@ static std::vector load_jsonl( break; } } - if (last_assistant_content.find("Error:") != std::string::npos || - last_assistant_content.find("error:") != std::string::npos) { - LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno); - continue; - } + // // this should be done on the python side... + // if (last_assistant_content.find("Error:") != std::string::npos || + // last_assistant_content.find("error:") != std::string::npos) { + // LOG_DBG("%s: skipping line %d — assistant response contains error marker\n", __func__, lineno); + // continue; + // } } // Split into prompt (no loss) + last assistant response (loss). @@ -262,11 +263,12 @@ static std::vector load_jsonl( } } else if (j.contains("prompt") && j.contains("response")) { response_text = j["response"].get(); - if (response_text.find("Error:") != std::string::npos || - response_text.find("error:") != std::string::npos) { - LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno); - continue; - } + // // this should be done on the python side... + // if (response_text.find("Error:") != std::string::npos || + // response_text.find("error:") != std::string::npos) { + // LOG_DBG("%s: skipping line %d — response contains error marker\n", __func__, lineno); + // continue; + // } prompt_text = j["prompt"].get(); } else if (j.contains("text")) { response_text = j["text"].get();