Skip to content

Commit

Permalink
linting
Browse files Browse the repository at this point in the history
  • Loading branch information
jdchang1 committed Aug 20, 2024
1 parent d3aae1a commit 49024e6
Showing 1 changed file with 5 additions and 8 deletions.
13 changes: 5 additions & 8 deletions llmfoundry/models/hf/hf_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -193,15 +193,13 @@ def build_metrics(
"""
from llmfoundry.utils.builders import build_metric

train_metric_names = list(cls.default_train_metrics) + (
additional_train_metrics or []
)
train_metric_names = list(cls.default_train_metrics
) + (additional_train_metrics or [])
train_metrics = [
build_metric(metric, {}) for metric in train_metric_names
] if use_train_metrics else []
eval_metric_names = list(cls.default_eval_metrics) + (
additional_eval_metrics or []
)
eval_metric_names = list(cls.default_eval_metrics
) + (additional_eval_metrics or [])
eval_metrics = [
build_metric(metric, {}) for metric in eval_metric_names
]
Expand All @@ -220,8 +218,7 @@ def build_inner_model(
config_overrides: dict[str, Any],
load_in_8bit: bool,
pretrained: bool,
model_cls: Optional[Union[_BaseAutoModelClass,
PreTrainedModel]] = None,
model_cls: Optional[Union[_BaseAutoModelClass, PreTrainedModel]] = None,
prepare_for_fsdp: bool = False,
) -> Union[PreTrainedModel, 'PeftModel']:
"""Builds the inner model for the ComposerHFCausalLM.
Expand Down

0 comments on commit 49024e6

Please sign in to comment.