Skip to content

Commit

Permalink
add cfg
Browse files Browse the repository at this point in the history
  • Loading branch information
olachinkei committed Dec 23, 2023
1 parent 3e0e7f1 commit 696415b
Showing 1 changed file with 9 additions and 6 deletions.
15 changes: 9 additions & 6 deletions fastchat/conversation.py
Original file line number Diff line number Diff line change
Expand Up @@ -1325,15 +1325,18 @@ def get_conv_template(name: str) -> Conversation:

# conv template for Custom
# source: hogehoge
from omegaconf import OmegaConf
cfg = OmegaConf.load("configs/config.yaml")

register_conv_template(
Conversation(
name=wandb.config.conv_name,
system_message=wandb.config.conv_system_message,
roles=eval(wandb.config.conv_roles),
name=cfg.mtbench.conv_name,
system_message=cfg.mtbench.conv_system_message,
roles=eval(cfg.mtbench.conv_roles),
sep_style=SeparatorStyle.CUSTOM,
sep=wandb.config.conv_sep,
stop_token_ids=eval(wandb.config.conv_stop_token_ids),
stop_str=wandb.config.conv_stop_str,
sep=cfg.mtbench.conv_sep,
stop_token_ids=eval(cfg.mtbench.conv_stop_token_ids),
stop_str=cfg.mtbench.conv_stop_str,
)
)

Expand Down

0 comments on commit 696415b

Please sign in to comment.