Symbatcher is a tool that leverages the symbolicai library to provide efficient batch scheduling capabilities. Currently only 1 engine at a time is supported. Engine switching to be introduced in a future release.
To use symbatcher, you first need to install the symbolicai library. You can do this using pip:
pip install symbolicai
from symai import Import
from symai import Expression,Symbol
class TestExpression(Expression):
def __init__(self, **kwargs):
super().__init__(**kwargs)
def forward(self, input, **kwargs):
return Symbol(input).query("Summarize this input", **kwargs).value
module = Import('AynurAda/symbatcher')
module(expr = TestExpression, dataset = ["test1", "test2", "test3"], num_workers=1, batch_size=1)