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

Fix in src/autotrain/trainers/clm/utils.py in function #836

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
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
1 change: 1 addition & 0 deletions src/autotrain/app/params.py
Original file line number Diff line number Diff line change
Expand Up @@ -274,6 +274,7 @@ def _munge_params_llm(self):
"rejected_text" if not self.api else "rejected_text_column", "rejected_text"
)
_params["train_split"] = self.train_split
_params["valid_split"] = self.valid_split
if "log" not in _params:
_params["log"] = "tensorboard"

Expand Down
3 changes: 1 addition & 2 deletions src/autotrain/trainers/clm/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -610,7 +610,7 @@ def get_tokenizer(config):
return tokenizer


def process_data_with_chat_template(config, tokenizer, train_data, valid_data):
def process_data_with_chat_template(config, tokenizer, train_data, valid_data=None):
"""
Processes training and validation data using a specified chat template.

Expand All @@ -629,7 +629,6 @@ def process_data_with_chat_template(config, tokenizer, train_data, valid_data):
- For ORPO/DPO, the `prompt` will be extracted from chosen messages.
- If `config.valid_split` is not None, the validation data will also be processed.
"""
valid_data = None
if config.chat_template in ("chatml", "zephyr", "tokenizer"):
logger.info("Applying chat template")
logger.info("For ORPO/DPO, `prompt` will be extracted from chosen messages")
Expand Down