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

[bug fix] ensure base_model is correctly set in model card #2124

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
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
reuse info in card markdown
  • Loading branch information
valayDave committed Oct 3, 2024
commit d4e19d57844e1c23bfcc4ffa7e557e6b7ef7aca7
2 changes: 1 addition & 1 deletion src/peft/peft_model.py
Original file line number Diff line number Diff line change
Expand Up @@ -1316,7 +1316,7 @@ def create_or_update_model_card(self, output_dir: str):

model_config = BaseTuner.get_model_config(self)
model_config = None if model_config == DUMMY_MODEL_CONFIG else model_config
if model_config is not None and "_name_or_path" in model_config:
if card.data.get("base_model") is None and model_config is not None and "_name_or_path" in model_config:
card.data["base_model"] = model_config["_name_or_path"]

lines = card.text.splitlines()
Expand Down