From 66837bf9f62b8009a882f1a555fce1802978d41f Mon Sep 17 00:00:00 2001 From: Huanzhi Mao Date: Wed, 6 Aug 2025 15:04:55 -0700 Subject: [PATCH] fix ipython field in OpenAIToMessages class --- torchtune/data/_messages.py | 1 + 1 file changed, 1 insertion(+) diff --git a/torchtune/data/_messages.py b/torchtune/data/_messages.py index 6b5049a020..5ff9206547 100644 --- a/torchtune/data/_messages.py +++ b/torchtune/data/_messages.py @@ -737,6 +737,7 @@ def __call__(self, sample: Mapping[str, Any]) -> Mapping[str, Any]: role=message["role"], content=content, eot=eot, + ipython=message["ipython"] if "ipython" in message else False, ), ) mask_messages(updated_messages, self.masking_strategy)