Address copilot feedback

This commit is contained in:
oobabooga 2026-03-12 19:55:02 -07:00
parent 24fdcc52b3
commit 04213dff14
6 changed files with 14 additions and 6 deletions

View file

@ -431,7 +431,8 @@ def load_instruction_template(template):
else:
return ''
file_contents = open(filepath, 'r', encoding='utf-8').read()
with open(filepath, 'r', encoding='utf-8') as f:
file_contents = f.read()
data = yaml.safe_load(file_contents)
if 'instruction_template' in data:
return data['instruction_template']