Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore; log cleanup #1192

Merged
merged 3 commits into from
Dec 7, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions helpers/configuration/env_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,11 @@
import os
import subprocess
import logging
from helpers.training.multi_process import should_log

logger = logging.getLogger("SimpleTuner")
logger.setLevel(os.environ.get("SIMPLETUNER_LOG_LEVEL", "INFO"))
if should_log():
logger.setLevel(os.environ.get("SIMPLETUNER_LOG_LEVEL", "INFO"))


def load_env():
Expand Down Expand Up @@ -131,7 +133,7 @@ def load_env():
continue
config_file_contents[key] = " ".join(value)

print(f"[CONFIG.ENV] Loaded environment variables from {config_env_path}")
logger.info(f"[CONFIG.ENV] Loaded environment variables from {config_env_path}")
else:
logger.error(f"Cannot find config file: {config_env_path}")

Expand Down
6 changes: 2 additions & 4 deletions helpers/training/trainer.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
import logging, os
import huggingface_hub
from helpers.training.default_settings.safety_check import safety_check
from helpers.publishing.huggingface import HubManager
Expand All @@ -7,15 +8,12 @@
import json
import copy
import random
import logging
import math
import os
import sys
import glob
import wandb

# Quiet down, you.
os.environ["ACCELERATE_LOG_LEVEL"] = "WARNING"

from helpers import log_format # noqa
from helpers.configuration.loader import load_config
from helpers.caching.memory import reclaim_memory
Expand Down
Loading
Loading