Skip to content

Commit 0e8103f

Browse files
committed
Quiet Diffusion Pipe TensorBoard warning
1 parent 23f37f5 commit 0e8103f

3 files changed

Lines changed: 14 additions & 4 deletions

File tree

CHANGELOG

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ v2.5.0 (June 12th 2026)
66
- Refreshed major build pins: ComfyUI `v0.24.1`, InvokeAI `6.13.0`, JupyterLab `4.5.8`, code-server `4.123.0`, Diffusion Pipe `5aa6577`, AI Toolkit `8812755`, xFormers `0.0.35`, Diffusers `0.38.0`, Transformers `5.11.0`, Accelerate `1.14.0`, PEFT `0.19.1`, Hugging Face Hub `1.19.0`, and bitsandbytes `0.49.2`.
77
- Pinned npm to `11.17.0` for the AI Toolkit UI build/runtime path and patched AI Toolkit's deprecated Next dev indicator config out of the bundled UI.
88
- Suppressed Kohya's upstream `pkg_resources` deprecation warning without doing runtime setuptools repairs during service startup.
9+
- Suppressed TensorBoard's `pkg_resources` deprecation warning in the Diffusion Pipe launcher readiness check and both TensorBoard start paths.
910
- Refreshed `models.manifest` so the image default and repo reference manifest stay aligned, and added Comfy-ready quantized Ideogram 4, Lens, and PixelDiT entries without duplicating the shared `flux2-vae` entry.
1011
- Preserved TagPilot provider key clearing in the UI and the bootstrap secret rewrite behavior for `HF_TOKEN`, `OPENAI_API_KEY`, `GEMINI_API_KEY`, and `XAI_API_KEY`.
1112

scripts/diffusion-pipe.sh

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,11 @@ ln -s "${TRAINPILOT_LOGDIR}" "${TB_ROOT}/trainpilot"
2121

2222
cd "${REPO}"
2323
TB_CMD=(/opt/venvs/core/bin/python -m tensorboard.main)
24+
TENSORBOARD_WARNING_FILTER="ignore:pkg_resources is deprecated as an API:UserWarning"
25+
TENSORBOARD_PYTHONWARNINGS="${PYTHONWARNINGS:+${PYTHONWARNINGS},}${TENSORBOARD_WARNING_FILTER}"
2426

2527
ensure_tensorboard_ready() {
26-
/opt/venvs/core/bin/python - <<'PY'
28+
PYTHONWARNINGS="${TENSORBOARD_PYTHONWARNINGS}" /opt/venvs/core/bin/python - <<'PY'
2729
import tensorboard.main # noqa: F401
2830
import pkg_resources # noqa: F401
2931
PY
@@ -41,8 +43,7 @@ if [[ -n "${CONFIG}" ]]; then
4143
echo "TensorBoard import failed in /opt/venvs/core. Rebuild the image or reinstall setuptools<81.0." >&2
4244
exit 1
4345
fi
44-
# Silence pkg_resources deprecation warning from tensorboard
45-
PYTHONWARNINGS="${PYTHONWARNINGS:-ignore:pkg_resources is deprecated as an API:UserWarning}" \
46+
PYTHONWARNINGS="${TENSORBOARD_PYTHONWARNINGS}" \
4647
"${TB_CMD[@]}" --logdir "${TB_ROOT}" --bind_all --port "${PORT}" &
4748
TB_PID=$!
4849
trap 'kill "${TB_PID}" 2>/dev/null || true' EXIT
@@ -55,4 +56,4 @@ if ! ensure_tensorboard_ready; then
5556
echo "TensorBoard import failed in /opt/venvs/core. Rebuild the image or reinstall setuptools<81.0." >&2
5657
exit 1
5758
fi
58-
exec "${TB_CMD[@]}" --logdir "${TB_ROOT}" --bind_all --port "${PORT}"
59+
PYTHONWARNINGS="${TENSORBOARD_PYTHONWARNINGS}" exec "${TB_CMD[@]}" --logdir "${TB_ROOT}" --bind_all --port "${PORT}"

tests/test_build_pins.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -185,6 +185,14 @@ def test_kohya_launchers_suppress_pkg_resources_warning_without_runtime_pip(self
185185
self.assertIn(warning_filter, text)
186186
self.assertNotIn('pip install "setuptools<81.0"', text)
187187

188+
def test_diffusion_pipe_suppresses_tensorboard_pkg_resources_warning(self):
189+
text = (ROOT / "scripts/diffusion-pipe.sh").read_text()
190+
191+
self.assertIn('TENSORBOARD_WARNING_FILTER="ignore:pkg_resources is deprecated as an API:UserWarning"', text)
192+
self.assertIn('TENSORBOARD_PYTHONWARNINGS="${PYTHONWARNINGS:+${PYTHONWARNINGS},}${TENSORBOARD_WARNING_FILTER}"', text)
193+
self.assertGreaterEqual(text.count('PYTHONWARNINGS="${TENSORBOARD_PYTHONWARNINGS}"'), 3)
194+
self.assertNotIn('PYTHONWARNINGS="${PYTHONWARNINGS:-ignore:pkg_resources is deprecated as an API:UserWarning}"', text)
195+
188196
def test_make_build_runs_dockerfile_check_first(self):
189197
text = (ROOT / "Makefile").read_text()
190198
self.assertIn(".PHONY: help build build-check", text)

0 commit comments

Comments
 (0)