Skip to content

Commit

Permalink
always use root logger
Browse files Browse the repository at this point in the history
Signed-off-by: Khaled Sulayman <[email protected]>
  • Loading branch information
khaledsulayman committed Dec 11, 2024
1 parent fe891e0 commit c9371d1
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions src/instructlab/sdg/generate_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -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."

Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit c9371d1

Please sign in to comment.