Skip to content

Commit

Permalink
fix: judge loss is not exists
Browse files Browse the repository at this point in the history
  • Loading branch information
zgqgit authored Oct 28, 2024
1 parent 5128e06 commit e6bf853
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/backend/bisheng/api/services/finetune.py
Original file line number Diff line number Diff line change
Expand Up @@ -406,7 +406,7 @@ def parse_log_data(cls, log_data: str) -> List[Dict[str, str]]:
sub_data = {'step': None, 'loss': None}
elem = elem.strip()
elem_data = json.loads(elem)
if elem_data['loss'] is None:
if elem_data.get('loss', None) is None:
continue
sub_data['step'] = elem_data['current_steps']
sub_data['loss'] = elem_data['loss']
Expand Down

0 comments on commit e6bf853

Please sign in to comment.