Skip to content

Commit 98e1ad4

Browse files
authored
Merge pull request #148 from georgian-io/better-logging
Better Handling of Logs and Warnings for UI
2 parents a57022b + 0ea4ea5 commit 98e1ad4

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

Diff for: llmtune/cli/toolkit.py

+3-2
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
from pathlib import Path
44

55
import torch
6+
import transformers
67
import typer
78
import yaml
89
from pydantic import ValidationError
9-
from transformers import utils as hf_utils
1010
from typing_extensions import Annotated
1111

1212
import llmtune
@@ -20,8 +20,9 @@
2020
from llmtune.utils.save_utils import DirectoryHelper
2121

2222

23-
hf_utils.logging.set_verbosity_error()
23+
transformers.logging.set_verbosity(transformers.logging.CRITICAL)
2424
torch._logging.set_logs(all=logging.CRITICAL)
25+
logging.captureWarnings(True)
2526

2627

2728
app = typer.Typer()

0 commit comments

Comments
 (0)