We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d31bb52 commit 80e3235Copy full SHA for 80e3235
verl/utils/tensor_utils.py
@@ -13,11 +13,16 @@
13
# limitations under the License.
14
"""Utility functions for tensor operations."""
15
16
+import logging
17
+import os
18
from dataclasses import dataclass
19
from functools import reduce
20
21
import torch
22
23
+logger = logging.getLogger(__file__)
24
+logger.setLevel(os.getenv("VERL_LOGGING_LEVEL", "INFO"))
25
+
26
27
@dataclass
28
class WeightChunkInfo:
@@ -58,9 +63,6 @@ def compute_weight_chunks(
58
63
Raises:
59
64
ValueError: If a single slice is larger than bucket_size.
60
65
"""
61
- import logging
62
-
- logger = logging.getLogger(__name__)
66
67
weight_size = weight.nbytes
68
if weight_size <= bucket_size:
0 commit comments