Skip to content

Commit

Permalink
Merge branch 'main' into bump_version_v0.10.0.dev0
Browse files Browse the repository at this point in the history
  • Loading branch information
KuuCi authored Jun 6, 2024
2 parents 47d0e81 + 3966f0e commit 54a8867
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 8 deletions.
8 changes: 0 additions & 8 deletions llmfoundry/data/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,14 +26,6 @@ def _validate_cfg(
eos_token_id = dataset_cfg.get('eos_token_id', None)
bos_token_id = dataset_cfg.get('bos_token_id', None)

if eos_token_id is None and bos_token_id is None and (
hasattr(tokenizer, 'eos_token_id') or
hasattr(tokenizer, 'bos_token_id')
):
log.warning(
'The user has not provided an eos_token_id or bos_token_id, but the tokenizer has an eos_token_id or a bos_token_id.',
)

tokenizer_eos_token_id = getattr(tokenizer, 'eos_token_id', None)
if eos_token_id is not None and eos_token_id != tokenizer_eos_token_id:
eos_mismatch_str = f'Provided {eos_token_id=} does not match the eos_token_id of the tokenizer={tokenizer_eos_token_id}.'
Expand Down
3 changes: 3 additions & 0 deletions llmfoundry/utils/huggingface_hub_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -280,6 +280,9 @@ def edit_files_for_hf_compatibility(
for f in files_processed_and_queued
}
for entrypoint in entrypoint_files:
file_path = os.path.join(folder, entrypoint)
if not os.path.exists(file_path):
continue
existing_relative_imports = get_all_relative_imports(
os.path.join(folder, entrypoint),
)
Expand Down

0 comments on commit 54a8867

Please sign in to comment.