Skip to content

Commit 68318d2

Browse files
authored
fix data handler to string conversion bug (foundation-model-stack#490)
Signed-off-by: Dushyant Behl <dushyantbehl@in.ibm.com>
1 parent 14f2f24 commit 68318d2

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

tuning/data/data_handlers.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,11 +47,10 @@ def __init__(
4747
self.allows_batching = allows_batching
4848

4949
def __str__(self):
50-
return f"DataHandler(op={\
51-
self.op.__name__ if hasattr(self.op, '__name__') else str(self.op)\
52-
},\
53-
handler_type={self.handler_type.name},\
54-
allows_batching={self.allows_batching})"
50+
o = self.op.__name__ if hasattr(self.op, "__name__") else str(self.op)
51+
n = self.handler_type.name
52+
b = self.allows_batching
53+
return f"DataHandler(op={o}, handler_type={n}, allows_batching={b})"
5554

5655

5756
### Utils for custom masking / manipulating input / output strs, etc

0 commit comments

Comments
 (0)