Skip to content

Commit

Permalink
Merge pull request #86 from booxter/print-out
Browse files Browse the repository at this point in the history
Remove remaining print()s from the library
  • Loading branch information
nathan-weinberg authored Aug 5, 2024
2 parents 5da0651 + ee93cd5 commit 3f2623c
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/instructlab/eval/mt_bench_branch_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ def generate(judge_model_name, branch, taxonomy_dir, output_dir):
examples = read_qna(qna_file_path)
qna_file = qna_file_path[len(taxonomy_dir) + 1 :]
if examples is None:
print(f"failed to load {qna_file}. skipping...")
logger.warning("failed to load %s. skipping...", qna_file)
continue
for ex in examples:
q, a = ex.get("question"), ex.get("answer")
Expand Down
3 changes: 1 addition & 2 deletions src/instructlab/eval/mt_bench_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -272,8 +272,7 @@ def chat_completion_openai(
return response.choices[0].message.content
except openai.OpenAIError as e:
if i == API_MAX_RETRY - 1:
# Print error on last try
print(type(e), e)
logger.error(e)
break
logger.debug(e)
time.sleep(API_RETRY_SLEEP)
Expand Down

0 comments on commit 3f2623c

Please sign in to comment.