Skip to content

Commit

Permalink
linters
Browse files Browse the repository at this point in the history
  • Loading branch information
lmeribal committed Nov 15, 2024
1 parent 5641cbd commit a31c01e
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
5 changes: 1 addition & 4 deletions turbo_alignment/common/tf/callbacks/logging.py
Original file line number Diff line number Diff line change
Expand Up @@ -70,10 +70,7 @@ def _log(self, logs: dict[str, Any], state: TrainerState) -> None:
self._wandb_run.log({**rewritten_logs, 'train/global_step': state.global_step}, step=state.global_step)

def _fix_table_type(self, logs: dict[str, Any]) -> dict[str, Any]:
return {
k: wandb.Table(dataframe=v) if isinstance(v, pd.DataFrame) else v
for k, v in logs.items()
}
return {k: wandb.Table(dataframe=v) if isinstance(v, pd.DataFrame) else v for k, v in logs.items()}


class ClearMLLoggingCallback(LoggingCallback):
Expand Down
1 change: 1 addition & 0 deletions turbo_alignment/metrics/distinctness.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from collections import defaultdict

from transformers.tokenization_utils_base import PreTrainedTokenizerBase

from turbo_alignment.metrics.metric import Metric
Expand Down
1 change: 1 addition & 0 deletions turbo_alignment/metrics/registry.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
from enum import Enum

from pydantic import field_validator

from turbo_alignment.common.registry import Registrable
Expand Down
2 changes: 1 addition & 1 deletion turbo_alignment/trainers/dpo.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,9 +26,9 @@
from turbo_alignment.settings.pipelines.train.dpo import (
APODownLossSettings,
APOZeroLossSettings,
ASFTLossSettings,
CPOLossSettings,
DPOLossesType,
ASFTLossSettings,
HingeLossSettings,
IPOLossSettings,
KTOLossSettings,
Expand Down

0 comments on commit a31c01e

Please sign in to comment.