Skip to content

Commit

Permalink
fix: small changes from review
Browse files Browse the repository at this point in the history
Signed-off-by: Will Johnson <mwjohnson728@gmail.com>
  • Loading branch information
willmj committed Sep 25, 2024
1 parent 375cac5 commit 6f264f9
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions build/accelerate_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,8 +122,8 @@ def main():
peft_method = job_config.get("peft_method")

if job_config.get("lora_post_process_for_vllm") and peft_method == "lora":
if job_config.get("save_model_dir"):
save_model_dir = job_config.get("save_model_dir")
save_model_dir = job_config.get("save_model_dir")
if save_model_dir:
if os.path.exists(os.path.join(save_model_dir, "added_tokens_info.json")):
with open(
os.path.join(save_model_dir, "added_tokens_info.json"),
Expand All @@ -133,7 +133,8 @@ def main():
num_added_tokens = added_tokens_info["num_new_tokens"]
else:
logging.warning(
"file added_tokens_info.json not in model_path. Cannot post-processes"
"Failed to post-process: file added_tokens_info.json not in path %s",
save_model_dir,
)

if os.path.exists(
Expand Down Expand Up @@ -163,8 +164,8 @@ def main():
)
else:
logging.warning(
"file added_tokens_info.json not in model_path. Cannot post-processes.\
Ignore if no checkpoints were saved during tuning"
"Failed to post-process: file added_tokens_info.json not in path %s",
save_model_dir,
)

# The .complete file will signal to users that we are finished copying
Expand Down

0 comments on commit 6f264f9

Please sign in to comment.