Skip to content

Commit

Permalink
Refactor RewardConfig to own module (#1221)
Browse files Browse the repository at this point in the history
* Refactor RewardConfig to own module

* Fix init

* Fix import
  • Loading branch information
lewtun authored Jan 12, 2024
1 parent 2eeb7b0 commit 163ca9f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion trl/trainer/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,6 @@
from .iterative_sft_trainer import IterativeSFTTrainer
from .ppo_config import PPOConfig
from .ppo_trainer import PPOTrainer
from .reward_config import RewardConfig
from .reward_trainer import RewardTrainer, compute_accuracy
from .sft_trainer import SFTTrainer
from .training_configs import RewardConfig
Original file line number Diff line number Diff line change
@@ -1,6 +1,4 @@
# coding=utf-8
# coding=utf-8
# Copyright 2023 The HuggingFace Team. All rights reserved.
# Copyright 2024 The HuggingFace Team. All rights reserved.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
Expand All @@ -13,6 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

from dataclasses import dataclass
from typing import Optional

Expand Down
2 changes: 1 addition & 1 deletion trl/trainer/reward_trainer.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
from transformers.trainer_utils import EvalPrediction

from ..import_utils import is_peft_available
from .training_configs import RewardConfig
from .reward_config import RewardConfig
from .utils import RewardDataCollatorWithPadding, compute_accuracy


Expand Down

0 comments on commit 163ca9f

Please sign in to comment.