Unverified Commit 5a7ed3ee authored by Choyunhui's avatar Choyunhui Committed by GitHub
Browse files

Fix TypeError in samplers.py by converting int to str (#2074)


Co-authored-by: default avataryhjo <yhjo@suresofttech.com>
parent d855d0ba
......@@ -55,7 +55,7 @@ class ContextSampler:
labeled_examples += (
str(doc_target[0])
if isinstance(doc_target, list)
else doc_target
else str(doc_target)
if self.config.doc_to_choice is None or isinstance(doc_target, str)
else str(self.doc_to_choice(doc)[doc_target])
)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment