Skip to content

Commit 62baf24

Browse files
committed
logging
1 parent 17141f1 commit 62baf24

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

torchao/prototype/quantization/safetensors_support.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,8 @@
1111
)
1212
from torchao.quantization import Float8Tensor
1313

14+
logger: logging.Logger = logging.getLogger(__name__)
15+
1416

1517
def load_tensor_state_dict(file_path: str, device: str):
1618
"""
@@ -71,7 +73,7 @@ def load_tensor_state_dict(file_path: str, device: str):
7173
else:
7274
raise ValueError(f"Unsupported tensor type: {tensor_type}")
7375

74-
logging.info(
76+
logger.info(
7577
f"Loaded {len(tensor_names)} tensor subclasses from {file_path} with metadata"
7678
)
7779
return result
@@ -136,6 +138,6 @@ def save_tensor_state_dict(
136138
combined_metadata["tensor_names"] = json.dumps(list(tensor_dict.keys()))
137139

138140
save_file(combined_tensors_dict, file_path, metadata=combined_metadata)
139-
logging.info(
141+
logger.info(
140142
f"Saved {len(tensor_dict)} tensor subclasses to {file_path} with metadata"
141143
)

0 commit comments

Comments
 (0)