Skip to content

Commit be4e78e

Browse files
committed
Fix logger issue
1 parent 542e4ac commit be4e78e

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

trinity/algorithm/policy_loss_fn/gspo_policy_loss.py

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,6 @@
1111
from trinity.algorithm.utils import aggregate_loss, masked_mean
1212
from trinity.utils.log import get_logger
1313

14-
logger = get_logger(__name__)
15-
1614

1715
class GSPOLossFn(PolicyLossFn):
1816
def __init__(
@@ -35,6 +33,7 @@ def __init__(
3533
self.clip_range_high = _clip_range_high
3634

3735
if loss_agg_mode != "seq-mean-token-mean":
36+
logger = get_logger(__name__)
3837
logger.warning(
3938
f"The original GSPO paper requires loss_agg_mode to be 'seq-mean-token-mean', but the current setting is '{loss_agg_mode}'."
4039
)

0 commit comments

Comments
 (0)