Skip to content

Commit

Permalink
filter files (#1067)
Browse files Browse the repository at this point in the history
  • Loading branch information
dakinggg committed Mar 27, 2024
1 parent 7f0fdae commit e42ea70
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions llmfoundry/utils/huggingface_hub_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -131,15 +131,16 @@ def edit_files_for_hf_compatibility(
folder: str,
flatten_imports_prefix: Sequence[str] = ('llmfoundry',),
remove_imports_prefix: Sequence[str] = ('composer', 'omegaconf',
'llmfoundry.metrics'),
'llmfoundry.metrics',
'llmfoundry.utils.builders'),
) -> None:
"""Edit files to be compatible with Hugging Face Hub.
Args:
folder (str): The folder to process.
flatten_imports_prefix (Sequence[str], optional): Sequence of prefixes to flatten. Defaults to ('llmfoundry',).
remove_imports_prefix (Sequence[str], optional): Sequence of prefixes to remove. Takes precedence over flattening.
Defaults to ('composer', 'omegaconf', 'llmfoundry.metrics').
Defaults to ('composer', 'omegaconf', 'llmfoundry.metrics', 'llmfoundry.utils.builders').
"""
files_to_process = [
os.path.join(folder, filename)
Expand Down

0 comments on commit e42ea70

Please sign in to comment.