[PR #50] fix: correct logger.info() syntax in finetune.py #50

Open
opened 2026-10-26 21:02:09 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepSeek-MoE/pull/50
Author: @yurekami
Created: 12/25/2025
Status: 🔄 Open

Base: main ← Head: fix-logger-info-syntax


📝 Commits (1)

  • e635d8d fix: correct logger.info() syntax in finetune.py

📊 Changes

1 file changed (+4 additions, -4 deletions)

View changed files

📝 finetune/finetune.py (+4 -4)

📄 Description

Summary

Fix incorrect logger.info() calls that used print-style multiple arguments instead of proper string formatting.

Problem

The Python logging module's logger.info() method doesn't support multiple arguments like print() does. The current code:

logger.info("PAD Token:", tokenizer.pad_token, tokenizer.pad_token_id)

This only logs "PAD Token:" and silently ignores the remaining arguments, losing important debugging information.

Solution

Changed to f-string formatting:

logger.info(f"PAD Token: {tokenizer.pad_token}, {tokenizer.pad_token_id}")

Changes

Fixed 4 logger.info() calls:

  • Line 271: PAD Token logging
  • Line 272: BOS Token logging
  • Line 273: EOS Token logging
  • Line 305: Training dataset samples logging

Test plan

  • Verify Python syntax with python3 -m py_compile
  • Run finetuning to confirm logging output is correct

🤖 Generated with Claude Code


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/deepseek-ai/DeepSeek-MoE/pull/50 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 12/25/2025 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-logger-info-syntax` --- ### 📝 Commits (1) - [`e635d8d`](https://github.com/deepseek-ai/DeepSeek-MoE/commit/e635d8dc19cfa3fa17f1c289d00dd35c2dd50556) fix: correct logger.info() syntax in finetune.py ### 📊 Changes **1 file changed** (+4 additions, -4 deletions) <details> <summary>View changed files</summary> 📝 `finetune/finetune.py` (+4 -4) </details> ### 📄 Description ## Summary Fix incorrect `logger.info()` calls that used print-style multiple arguments instead of proper string formatting. ## Problem The Python `logging` module's `logger.info()` method doesn't support multiple arguments like `print()` does. The current code: ```python logger.info("PAD Token:", tokenizer.pad_token, tokenizer.pad_token_id) ``` This only logs `"PAD Token:"` and silently ignores the remaining arguments, losing important debugging information. ## Solution Changed to f-string formatting: ```python logger.info(f"PAD Token: {tokenizer.pad_token}, {tokenizer.pad_token_id}") ``` ## Changes Fixed 4 `logger.info()` calls: - Line 271: PAD Token logging - Line 272: BOS Token logging - Line 273: EOS Token logging - Line 305: Training dataset samples logging ## Test plan - [x] Verify Python syntax with `python3 -m py_compile` - [ ] Run finetuning to confirm logging output is correct 🤖 Generated with [Claude Code](https://claude.com/claude-code) --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
Sign in to join this conversation.
No labels
pull-request
WIP
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
deepseek-ai/DeepSeek-MoE#50
No description provided.