-
Notifications
You must be signed in to change notification settings - Fork 69
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
chore(weave): Extract common functions in eval.py
into re-usable common modules.
#3328
chore(weave): Extract common functions in eval.py
into re-usable common modules.
#3328
Conversation
Preview this PR with FeatureBee: https://beta.wandb.ai/?betaVersion=13ca03d598a05b1c2579cd966fc78d061047c517 |
eval.py
into re-usable common modules.
@@ -57,3 +68,110 @@ def get_infer_method(model: Model) -> Op: | |||
raise MissingInferenceMethodError( | |||
f"Missing a method with name in ({INFER_METHOD_NAMES})" | |||
) | |||
|
|||
|
|||
# Using `dataclass` because pydantic does not like `Call` as a property |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's odd -- why?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it doesn't like the future
score_call: Call | ||
|
||
|
||
ApplyScorerResult = ApplyScorerSuccess |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no error case?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
not yet (:
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lgtm
db9f4da
into
tim/extract_scoring_mechanics_into_module
This is another refactor PR to decouple Scoring and model prediction mechanics from the eval api itself. This builds off of #3325. There should be no functional changes to the user. Specifically:
weave/trace/op_caller.py
now contains the helper functions forasync_call
andasync_call_op
which unifies op calling for async and sync calls under the same API.apply_scorer_async
intoweave/scorers/base_scorer.py
prepping for re-use elsewhereapply_model_async
intoweave/flow/model.py
for similar reasons.