-
Notifications
You must be signed in to change notification settings - Fork 7
Conversation
e87252c
to
a371f22
Compare
@@ -204,3 +217,8 @@ async def inference( | |||
data=output_data, | |||
model_name=self.name, | |||
) | |||
|
|||
|
|||
class SingularModelComponent(BaseModelComponent[SINGULAR_MODEL_INPUT, MODEL_OUTPUT]): |
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.
naming: InferenceModelCompoent?
first round of feedbacks:
|
a371f22
to
bfb61c8
Compare
return input.request.request_id | ||
|
||
|
||
ModelComponent = MultiEntityModelComponent |
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.
To support backward compatible for now
2ec4efa
to
2e1909e
Compare
@@ -35,8 +37,8 @@ class BusinessLogicEventData(EntityEventData): | |||
|
|||
business_logic_pipeline_order: int | |||
business_logic_name: str | |||
old_score: float | |||
new_score: float | |||
old_score: str |
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.
model scores/output should be logged as string
) | ||
|
||
|
||
fraud_pipeline = FraudPipeline(model=fraud_model, business_logic=fraud_biz_pipeline) |
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.
this is the "new experience" of passing the model and business_logic to the pipeline to define the pipeline.
Does it look simpler than the current RankingPipeline.get_model pattern?
def get_model(self) -> ModelCompolent:
return SomeModelComponent()
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.
@ykeremy i think the model=xxx
pattern definitely makes it easier to play around with different version of models in the future for a pipeline. i prefer model=xxx
pattern. wdyt?
1f6d5f0
to
a45781a
Compare
a45781a
to
c8bc660
Compare
I also tested against Joao's credit limit PR: https://github.com/inventa-shop/wyvern/pull/219 |
""" | ||
|
||
request: REQUEST_ENTITY | ||
adjusted_model_output: MODEL_OUTPUT_DATA_TYPE |
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.
I don't know if we should call this adjusted model output. If it's boosting/deboosting etc. yes it's adjusted model output but what if they don't have any models? adjusted_score
feels more accurate to me since we also use old_score
and new_score
within the event data. WDYT?
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.
my problem with score is that it indicates it's a number(int, float). but actually this "model output" could be a list of float or a dict[str, AnySerializable]
.
what about adjusted_output
?
candidate: The candidate that the business logic layer is being asked to perform business logic on | ||
""" | ||
|
||
identifier: Identifier |
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.
We only need this for logging purposes. Let's try to think of a logging component / request design so that we know the main entity for the request and they won't need to pass in the identifier.
Not urgent though, just to keep in mind.
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.
Yeah it's pretty challenging to get rid of this identifier rn.
The problem here is how do we know what THE entity is for this pipeline, model and business logic.
The "logging part" has to either happen within the business logic pipeline, or the business logic pipeline has to output all the information to log outside of the biz pipeline.
The way we do it in this PR is by passing the identifier / entity through the SingleEntityBusinessLogicRequest.
* chained model evaluation (#58) * multi model evaluation * fix test * chained model evaluation * cache model output * v bump * support dict model output * rename * add get_model_output support * fix * 0.0.18-beta1 * shu/more 0.0.18 fix (#62) * ChainedModelInput should be in wyvern.__init__ * doc for target in ModelEventData * docstring for get_model_output * beta2 * by default we should not cache model output * cache output for modelbit component (#64) * 0.0.18-beta3 * shu/do not enforce features in model component (#67) * return empty set for model component manifest_feature_names * version beta4 * target -> model_key (#70) * SingleEntityPipeline (v0.0.18-beta5) (#69) * introduce singular model component and singular pipeline * SingularBusinessLogicPipeline * integrate with business logic in SingularPipelineComponent * update to SingleEntity style * update to SingleEntity style * single entity pipeline * update generic type order for business logic components * SingleEntityModelbitComponent * address feedbacks for single entity pipeline (#72) * address feedbacks for single entity pipeline * feature store feature available in realtime feature * v0.0.18-beta6 * Fix how we filter real time features before feature retrieval (#66) * Fix how we filter real time features before feature retrieval * Bump version to 0.0.18-beta7 * v0.0.18b7 - support any dictionary type * v0.0.18 --------- Co-authored-by: Kerem Yilmaz <[email protected]>
In order to make all the singular entity inference pipeline easier to build:
These components are introduced:
SingleEntityBusinessLogicComponent
SingleEntityBusinessLogicPipeline
SingleEntityModelComponent
SingleEntityPipelineComponent
Does this PR have impact on local development experience? If yes, make sure you have a plan and add the documentations to address issues that come with the change
bump version
make a release
publish to pypi service