Skip to content

Commit 0ea4ea5

Browse files
committed
suppress warnings
1 parent fa532c0 commit 0ea4ea5

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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)