Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a utility for writing a barebones config file #371

Merged
merged 10 commits into from
May 18, 2022
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions src/accelerate/utils/other.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,10 @@ def write_basic_config(mixed_precision="no", save_location: str = default_json_c
Args:
mixed_precision (`str`, *optional*, defaults to "no"):
Mixed Precision to use. Should be one of "no", "fp16", or "bf16"
save_location (`str`, *optional*, defaults to "~/.cache/huggingface/accelerate/default_config.yaml"):
Optional custom save location. Should be passed to `--config_file` when using `accelerate launch`.
save_location (`str`, *optional*, defaults to `default_json_config_file`):
Optional custom save location. Should be passed to `--config_file` when using `accelerate launch`. Default
location is inside the huggingface cache folder as default_config.yaml, can be overriden by setting the
`HF_HOME` environmental variable.
muellerzr marked this conversation as resolved.
Show resolved Hide resolved
"""
path = Path(save_location)
path.parent.mkdir(parents=True, exist_ok=True)
Expand Down