[PR #742] Parse EP_BUFFER_DEBUG as an integer on the Python side #747

Open
opened 2026-10-27 21:05:50 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/deepseek-ai/DeepEP/pull/742
Author: @yurekami
Created: 8/29/2026
Status: 🔄 Open

Base: main ← Head: fix-ep-buffer-debug-env


📝 Commits (1)

  • f8b612c Parse EP_BUFFER_DEBUG as an integer on the Python side

📊 Changes

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

View changed files

📝 deep_ep/buffers/elastic.py (+2 -2)

📄 Description

Fixes #718.

The Python side tested the raw environment string for truthiness (if os.environ.get('EP_BUFFER_DEBUG', 0):), so EP_BUFFER_DEBUG=0 — the documented "off" value — enabled the debug prints at both sites in deep_ep/buffers/elastic.py, while the C++ side (get_env<int> via sscanf %d) correctly treated it as off. Both sites now parse the value as an integer first, matching the C++ semantics and the README's 0/1 contract.

Quick check of the semantics change:

'0': old=True  new=False
'1': old=True  new=True

A non-numeric value now raises ValueError loudly instead of silently enabling debug output; #733 tracks the C++ side's handling of that same case.


🔄 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/DeepEP/pull/742 **Author:** [@yurekami](https://github.com/yurekami) **Created:** 8/29/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `fix-ep-buffer-debug-env` --- ### 📝 Commits (1) - [`f8b612c`](https://github.com/deepseek-ai/DeepEP/commit/f8b612c4da363906c8107686bec9290d7e77a852) Parse EP_BUFFER_DEBUG as an integer on the Python side ### 📊 Changes **1 file changed** (+2 additions, -2 deletions) <details> <summary>View changed files</summary> 📝 `deep_ep/buffers/elastic.py` (+2 -2) </details> ### 📄 Description Fixes #718. The Python side tested the raw environment string for truthiness (`if os.environ.get('EP_BUFFER_DEBUG', 0):`), so `EP_BUFFER_DEBUG=0` — the documented "off" value — enabled the debug prints at both sites in `deep_ep/buffers/elastic.py`, while the C++ side (`get_env<int>` via `sscanf %d`) correctly treated it as off. Both sites now parse the value as an integer first, matching the C++ semantics and the README's `0`/`1` contract. Quick check of the semantics change: ``` '0': old=True new=False '1': old=True new=True ``` A non-numeric value now raises `ValueError` loudly instead of silently enabling debug output; #733 tracks the C++ side's handling of that same case. --- <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
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/DeepEP#747
No description provided.