Spaces:
Running on Zero
Running on Zero
Commit ·
b886ed1
1
Parent(s): 19bb9bc
Log reason when inference logging is skipped
Browse filesPrints which env var is missing instead of returning silently,
making it easier to diagnose missing HF_TOKEN or LOG_DATASET_REPO.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- logging_utils.py +1 -0
logging_utils.py
CHANGED
|
@@ -25,6 +25,7 @@ def _readme_from_features(feats):
|
|
| 25 |
def log_inference(pil_inputs, output_pil, prompt, seed, steps, guidance_scale,
|
| 26 |
input_width, input_height, duration_seconds, success, error_message=""):
|
| 27 |
if not HF_TOKEN or not DATASET_REPO:
|
|
|
|
| 28 |
return
|
| 29 |
try:
|
| 30 |
import tempfile, json as _json
|
|
|
|
| 25 |
def log_inference(pil_inputs, output_pil, prompt, seed, steps, guidance_scale,
|
| 26 |
input_width, input_height, duration_seconds, success, error_message=""):
|
| 27 |
if not HF_TOKEN or not DATASET_REPO:
|
| 28 |
+
print(f"[log] skipped — HF_TOKEN={'set' if HF_TOKEN else 'missing'}, DATASET_REPO={'set' if DATASET_REPO else 'missing'}")
|
| 29 |
return
|
| 30 |
try:
|
| 31 |
import tempfile, json as _json
|