mirror of
https://github.com/huggingface/lerobot.git
synced 2026-07-25 02:36:11 +00:00
style: compact comments in language runtime
This commit is contained in:
@@ -63,18 +63,11 @@ def test_flatten_leaves_messages_without_tool_calls_untouched():
|
||||
|
||||
def test_flatten_drops_non_say_tool_calls_but_keeps_content():
|
||||
weather = {"type": "function", "function": {"name": "check_weather", "arguments": {}}}
|
||||
out = _flatten_say_tool_calls(
|
||||
{"role": "assistant", "content": "plan only", "tool_calls": [weather]}
|
||||
)
|
||||
out = _flatten_say_tool_calls({"role": "assistant", "content": "plan only", "tool_calls": [weather]})
|
||||
assert out["content"] == "plan only"
|
||||
assert "tool_calls" not in out
|
||||
|
||||
|
||||
# ---------------------------------------------------------------------------
|
||||
# EOS-termination supervision
|
||||
# ---------------------------------------------------------------------------
|
||||
|
||||
|
||||
def test_format_messages_appends_eos_to_target_turns_only():
|
||||
msgs = [
|
||||
{"role": "user", "content": "pick cube"},
|
||||
|
||||
Reference in New Issue
Block a user