Skip to content

Commit

Permalink
fix: hf overwrite bug
Browse files Browse the repository at this point in the history
  • Loading branch information
garrett361 committed May 8, 2023
1 parent 8e03c14 commit ca02a95
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions harness/determined/integrations/huggingface/hf_callback.py
Original file line number Diff line number Diff line change
Expand Up @@ -359,10 +359,12 @@ def get_hf_args_with_overwrites(
use with DeepSpeed Autotune, which populates `hparams[overwrite_key]` using values which
obey the above constraints.
"""
assert overwrite_key in hparams, (
f"`get_hf_args_with_overwrites` expected {overwrite_key} to be a key in "
f"`hparams. Received {hparams}"
)
if overwrite_key not in hparams:
logging.info(
f"{overwrite_key} key not found in hparams, `get_hf_args_with_overwrites` is a no-op"
)
return

# Verify that the appropriate keys in the DS json file have `"auto"` values
ds_config_path = get_ds_config_path_from_args(args)

Expand Down

0 comments on commit ca02a95

Please sign in to comment.