Handle truncation errors (#436)
This commit is contained in:
@@ -29,7 +29,7 @@ class TestBind(unittest.TestCase):
|
||||
tracer = few_shot_qa_2.trace()
|
||||
print(tracer.last_node.print_graph_dfs() + "\n")
|
||||
|
||||
def test_pin(self):
|
||||
def test_cache(self):
|
||||
@sgl.function
|
||||
def few_shot_qa(s, prompt, question):
|
||||
s += prompt
|
||||
@@ -41,8 +41,7 @@ class TestBind(unittest.TestCase):
|
||||
few_shot_qa_2 = few_shot_qa.bind(
|
||||
prompt="Answer the following questions as if you were a 5-year-old kid.\n\n"
|
||||
)
|
||||
few_shot_qa_2.pin(self.backend)
|
||||
few_shot_qa_2.unpin(self.backend)
|
||||
few_shot_qa_2.cache(self.backend)
|
||||
|
||||
|
||||
if __name__ == "__main__":
|
||||
@@ -50,4 +49,4 @@ if __name__ == "__main__":
|
||||
|
||||
# t = TestBind()
|
||||
# t.setUp()
|
||||
# t.test_pin()
|
||||
# t.test_cache()
|
||||
Reference in New Issue
Block a user