Fix lint and bug post merge from main

This commit is contained in:
Chirag Jain
2024-07-30 23:59:38 +05:30
parent fd7538dca7
commit 34ea51dcf3
3 changed files with 3 additions and 4 deletions

View File

@@ -341,10 +341,10 @@ def load(tokenizer, cfg, ds_cfg: Optional[Dict[str, Any]] = None):
chat_template = ds_cfg.get("chat_template", "chatml")
chat_template_str = chat_templates(chat_template, tokenizer=tokenizer)
LOG.info(f"Using chat template:\n---\n{chat_template_str!s}\n---")
prompter_params = {
"tokenizer": tokenizer,
"chat_template": chat_templates(ds_cfg.get("chat_template", "chatml")),
"chat_template": chat_template_str,
"message_field_role": ds_cfg.get("message_field_role", "from"),
"message_field_content": ds_cfg.get("message_field_content", "value"),
"message_field_training": ds_cfg.get("message_field_training", "training"),

View File

@@ -7,9 +7,9 @@ Module for pydantic models for configuration
import logging
import os
from enum import Enum
from importlib.metadata import version
from typing import Annotated, Any, Dict, List, Literal, Optional, Tuple, Union
from importlib.metadata import version
from pydantic import (
BaseModel,
Field,

View File

@@ -720,7 +720,6 @@ class TestChatTemplateConfigurations:
LOG.debug(f"Final input_ids: {input_ids}")
class TestAssistantChatTemplateLlama3:
"""
Test class for assistant style datasets with llama-3 prompts using the chat_template strategy.