-
Notifications
You must be signed in to change notification settings - Fork 67
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Model predict
input format changed in v0.50.15
#2255
Comments
Thank you for reporting this, we're investigating this regression. Downgrading to v0.50.14 would be the best short term workaround. |
@naingthet can yu share the shape of |
Thanks for investigating. Loving weave so far and excited to see where it goes!
|
Hey @naingthet, does this repro in from typing import Any
import weave
class Model(weave.Model):
@weave.op()
def predict(self, query: dict[str, Any]):
arg1 = query["arg1"]
return arg1 + 1
m = Model()
payloads = [
{"query": {"arg1": 1}},
{"query": {"arg1": 2}},
{"query": {"arg1": 3}},
{"query": {"arg1": 4}},
{"query": {"arg1": 5}},
]
evaluation = weave.Evaluation(name=f"evaluation", dataset=payloads)
res = await evaluation.evaluate(m) |
I also got this error. Was able to use the |
I had code in weave
v0.50.14
that successfully passed data into models through theEvaluation
class. These objects are passed into the modelpredict
method as dict-like objects, allowing usage like so:Where model looks like:
However, in
v0.50.15
, this code no longer works and I receive an error message indicating that thequery
is now of typeBoxedStr
. I'm not sure how to handle this since it does not appear to be a dict-like or object-like type. Any help would be greatly appreciated.The text was updated successfully, but these errors were encountered: