Skip to content

Commit

Permalink
precommit
Browse files Browse the repository at this point in the history
  • Loading branch information
v-chen_data committed Sep 10, 2024
1 parent 9cda55d commit ed34351
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 3 additions & 1 deletion llmfoundry/command_utils/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -99,7 +99,9 @@ def evaluate_model(
mosaicml_logger.log_metrics(metadata)
mosaicml_logger._flush_metadata(force_flush=True)

fsdp_config = parallelism_config.get('fsdp_config', None) if parallelism_config else None
fsdp_config = parallelism_config.get(
'fsdp_config', None
) if parallelism_config else None
if fsdp_config and model.get('load_in_8bit', False):
raise ValueError(
'The FSDP config block is not supported when loading ' +
Expand Down
3 changes: 2 additions & 1 deletion tests/a_scripts/inference/test_convert_composer_to_hf.py
Original file line number Diff line number Diff line change
Expand Up @@ -922,7 +922,8 @@ def test_huggingface_conversion_callback(
model=original_model,
device='gpu',
precision=trainer_precision,
parallelism_config={'fsdp': fsdp_config} if fsdp_state_dict_type is not None else None,
parallelism_config={'fsdp': fsdp_config}
if fsdp_state_dict_type is not None else None,
train_dataloader=train_dataloader,
save_folder=os.path.join(tmp_path, 'checkpoints'),
save_interval=save_interval,
Expand Down

0 comments on commit ed34351

Please sign in to comment.