Skip to content

Commit

Permalink
refactor: Enhance logging configuration in W&B to Neptune migration s…
Browse files Browse the repository at this point in the history
…cript
  • Loading branch information
SiddhantSadangi committed Jan 9, 2025
1 parent 9b84878 commit 5966f41
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions utils/migration_tools/from_wandb/wandb_to_neptune.py
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,12 @@
from neptune_scale.projects import create_project
from tqdm.auto import tqdm

# Silencing Neptune and httpx messages, W&B errors, urllib connection pool warnings
logging.getLogger("httpx").setLevel(logging.ERROR)
logging.getLogger("urllib3").setLevel(logging.ERROR)
logging.getLogger("wandb").setLevel(logging.ERROR)
logging.getLogger("neptune").setLevel(logging.CRITICAL)

SUPPORTED_DATATYPES = [int, float, str, datetime, bool, list, set]

if __name__ == "__main__":
Expand Down Expand Up @@ -84,12 +90,6 @@

print(f"Logs available at {log_filename}\n")

# Silencing Neptune and httpx messages, W&B errors, urllib connection pool warnings
logging.getLogger("neptune").setLevel(logging.CRITICAL)
logging.getLogger("httpx").setLevel(logging.ERROR)
logging.getLogger("urllib3").setLevel(logging.ERROR)
logging.getLogger("wandb").setLevel(logging.ERROR)

def exc_handler(exctype, value, tb):
logger.exception("".join(traceback.format_exception(exctype, value, tb)))

Expand Down

0 comments on commit 5966f41

Please sign in to comment.