Skip to content
Merged
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
2 changes: 1 addition & 1 deletion src/oumi/core/configs/job_config.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ class JobResources:
Overrides image_id_map if both are specified.
"""

image_id_map: dict[str, str] = field(default_factory=dict)
image_id_map: Optional[dict[str, str]] = None
"""The image id map used to boot the instances (optional).
Map is in the form of {region: image_id}.
Expand Down
2 changes: 1 addition & 1 deletion src/oumi/core/configs/params/model_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ class ModelParams(BaseParams):
documentation for the appropriate template to use.
"""

chat_template_kwargs: dict[str, Any] = field(default_factory=dict)
chat_template_kwargs: Optional[dict[str, Any]] = None
"""Additional keyword args to pass to the chat template renderer.
Currently, it is only used by the vLLM inference engine to pass additional kwargs
for generation of assistant messages.
Expand Down
11 changes: 3 additions & 8 deletions tests/unit/core/configs/params/test_model_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -126,12 +126,7 @@ def test_model_params_reserved_processor_kwargs(field_names: list[str], tmp_path
)


def test_chat_template_kwargs_field_default():
gen_params = ModelParams()
assert isinstance(gen_params.chat_template_kwargs, dict)
assert gen_params.chat_template_kwargs == {}


def test_chat_template_kwargs_custom_assignment():
gen_params = ModelParams(chat_template_kwargs={"enable_thinking": False})
assert gen_params.chat_template_kwargs["enable_thinking"] is False
model_params = ModelParams(chat_template_kwargs={"enable_thinking": False})
assert model_params.chat_template_kwargs is not None
assert model_params.chat_template_kwargs["enable_thinking"] is False
2 changes: 1 addition & 1 deletion tests/unit/inference/test_vllm_inference_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -299,7 +299,7 @@ def test_infer_online_lora(mock_vllm, mock_lora_request):
use_tqdm=False,
chat_template=None,
chat_template_content_format="auto",
chat_template_kwargs={},
chat_template_kwargs=None,
)


Expand Down
Loading