Skip to content

Commit

Permalink
linter
Browse files Browse the repository at this point in the history
  • Loading branch information
kallewoof committed Dec 12, 2023
1 parent b4d352e commit 48b13f8
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 9 deletions.
6 changes: 2 additions & 4 deletions src/axolotl/train.py
Original file line number Diff line number Diff line change
Expand Up @@ -175,21 +175,19 @@ def terminate_handler(_, __, model):
return model, tokenizer


def pretrain_hooks(cfg, trainer):
def pretrain_hooks(_cfg, _trainer):
"""
Run hooks right before kicking off the training
:param cfg:
:param trainer:
:return:
"""
pass


def post_train_hooks(cfg, trainer):
def post_train_hooks(_cfg, _trainer):
"""
Run hooks right after training completes
:param cfg:
:param trainer:
:return:
"""
pass
9 changes: 4 additions & 5 deletions src/axolotl/utils/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -411,12 +411,11 @@ def validate_config(cfg):
cfg.neftune_noise_alpha = cfg.noisy_embedding_alpha
else:
# User is providing both; bail and have them sort out their settings
raise ValueError("noisy_embedding_alpha is deprecated, use neftune_noise_alpha; both are set, please remove the deprecated noisy_embedding_alpha setting")
raise ValueError(
"noisy_embedding_alpha is deprecated, use neftune_noise_alpha; both are set, please remove the deprecated noisy_embedding_alpha setting"
)

if (
cfg.neftune_noise_alpha is not None
and cfg.neftune_noise_alpha <= 0.0
):
if cfg.neftune_noise_alpha is not None and cfg.neftune_noise_alpha <= 0.0:
raise ValueError("neftune_noise_alpha must be > 0.0")

# TODO
Expand Down

0 comments on commit 48b13f8

Please sign in to comment.