From 1aefe971e5aeaa6d716aa1f6902696ff7106193a Mon Sep 17 00:00:00 2001 From: "Tianyi (Alex) Qiu" Date: Fri, 6 Dec 2024 09:13:58 -0800 Subject: [PATCH] fix(abstractions): misspec of stdout/stderr under LOUD_BACKEND --- src/download_models.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/download_models.py b/src/download_models.py index cc921ed..e0621fd 100644 --- a/src/download_models.py +++ b/src/download_models.py @@ -1,5 +1,5 @@ from src.path import root -import subprocess, os, sys +import subprocess, os def download_model(model_name: str, save_path: str): @@ -8,8 +8,8 @@ def download_model(model_name: str, save_path: str): with open(os.devnull, "w") as devnull: process = subprocess.Popen( ["huggingface-cli", "download", model_name, "--local-dir", save_path], - stdout=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else sys.stdout), - stderr=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else sys.stderr), + stdout=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else None), + stderr=(devnull if not eval(os.environ.get("LOUD_BACKEND", "False")) else None), ) process.wait()