Skip to content

Commit

Permalink
replace os.getenv with os.path.expanduser because the first one doesn… (
Browse files Browse the repository at this point in the history
#2515)

Co-authored-by: khalil <[email protected]>
  • Loading branch information
khalil-Hennara and khalil authored Oct 4, 2023
1 parent e64ee0e commit c3ad73a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fastchat/model/compression.py
Original file line number Diff line number Diff line change
Expand Up @@ -147,7 +147,7 @@ def load_compress_model(model_path, device, torch_dtype, use_fast, revision="mai
# We don't necessarily need to download the model' repo again if there is a cache.
# So check the default huggingface cache first.
model_path_temp = os.path.join(
os.getenv("HOME"),
os.path.expanduser("~"),
".cache/huggingface/hub",
"models--" + model_path.replace("/", "--"),
"snapshots/",
Expand Down

0 comments on commit c3ad73a

Please sign in to comment.