From c9371d16b6125ea439b48f6d626e1ec3a26d2e5e Mon Sep 17 00:00:00 2001 From: Khaled Sulayman Date: Wed, 11 Dec 2024 13:32:11 -0500 Subject: [PATCH] always use root logger Signed-off-by: Khaled Sulayman --- src/instructlab/sdg/generate_data.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/src/instructlab/sdg/generate_data.py b/src/instructlab/sdg/generate_data.py index a640dbd3..93f1b071 100644 --- a/src/instructlab/sdg/generate_data.py +++ b/src/instructlab/sdg/generate_data.py @@ -34,7 +34,7 @@ read_taxonomy_leaf_nodes, ) -LOGGER = logging.getLogger(__name__) +LOGGER = logging.getLogger() _SYS_PROMPT = "I am a Red Hat® Instruct Model, an AI language model developed by Red Hat and IBM Research based on the granite-3.0-8b-base model. My primary role is to serve as a chat assistant." @@ -285,7 +285,6 @@ def _mixer_init( # to be removed: logger def generate_data( client: openai.OpenAI, - logger: logging.Logger = None, # pylint: disable=redefined-outer-name system_prompt: Optional[str] = None, use_legacy_pretraining_format: Optional[bool] = True, model_family: Optional[str] = None, @@ -318,10 +317,6 @@ def generate_data( We expect three files to be present in this directory: "knowledge.yaml", "freeform_skills.yaml", and "grounded_skills.yaml". """ - if logger is not None: - global LOGGER # pylint: disable=global-statement - LOGGER = logger - generate_start = time.time() system_prompt = system_prompt if system_prompt is not None else _SYS_PROMPT