Remove duplicate Completeness class definition and refactor builtin scorers a bit#19064
Conversation
Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
|
|
||
| @experimental(version="3.7.0") | ||
| @format_docstring(_MODEL_API_DOC) | ||
| class Completeness(BuiltInScorer): |
There was a problem hiding this comment.
I think I merged a duplicate definition for Completeness due to some git stack weirdness. Let's remove this!
| """ | ||
|
|
||
| name: str | ||
| model: str | None = None |
There was a problem hiding this comment.
Moving this model field to BuiltInScorer base class instead of defining it for every child class
There was a problem hiding this comment.
Not every BuiltInScorer should be a Judge (this is something we should fix as a followup) - we may want to add built-in code-based scorers later. Accordingly, not every built-in scorer should have a model either. I'd rather add a subclass BuiltInJudge that inherits from Judge and has a model attribute, but we can do that later; for now, can we leave the model property on each scorer?
|
Documentation preview for e07e8ce is available at: More info
|
| instructions=self.instructions, | ||
| model=self.model, | ||
| description=self.description, | ||
| feedback_value_type=Literal["yes", "no"], |
There was a problem hiding this comment.
How well does this render in the MLflow UI? I'd ideally like to see red / green highlighting depending on the value. Does this accomplish that?
There was a problem hiding this comment.
Good question. I haven't looked into the UI yet. Let me create a ticket and investigate this!
| model=self.model, | ||
| description=self.description, | ||
| feedback_value_type=Literal[ | ||
| "no_frustration", "frustration_resolved", "frustration_not_resolved" |
There was a problem hiding this comment.
@xsh310 can we make this render nicely in the MLflow UI so that frustration_not_resolved is red and no_frustration / frustration_resolved are green?
Signed-off-by: Xiang Shen <xshen.shc@gmail.com>
b701871 to
e07e8ce
Compare
|
Updated the PR to revert the model attribute change |
🥞 Stacked PR
Use this link to review incremental changes.
What changes are proposed in this pull request?
Refactor the built-in scorers a bit.
How is this PR tested?
Test Plan
Passes Built-in Scorer unit tests:
Does this PR require documentation update?
Release Notes
Is this a user-facing change?
What component(s), interfaces, languages, and integrations does this PR affect?
Components
area/tracking: Tracking Service, tracking client APIs, autologgingarea/models: MLmodel format, model serialization/deserialization, flavorsarea/model-registry: Model Registry service, APIs, and the fluent client calls for Model Registryarea/scoring: MLflow Model server, model deployment tools, Spark UDFsarea/evaluation: MLflow model evaluation features, evaluation metrics, and evaluation workflowsarea/gateway: MLflow AI Gateway client APIs, server, and third-party integrationsarea/prompts: MLflow prompt engineering features, prompt templates, and prompt managementarea/tracing: MLflow Tracing features, tracing APIs, and LLM tracing functionalityarea/projects: MLproject format, project running backendsarea/uiux: Front-end, user experience, plotting, JavaScript, JavaScript dev serverarea/build: Build and test infrastructure for MLflowarea/docs: MLflow documentation pagesHow should the PR be classified in the release notes? Choose one:
rn/none- No description will be included. The PR will be mentioned only by the PR number in the "Small Bugfixes and Documentation Updates" sectionrn/breaking-change- The PR will be mentioned in the "Breaking Changes" sectionrn/feature- A new user-facing feature worth mentioning in the release notesrn/bug-fix- A user-facing bug fix worth mentioning in the release notesrn/documentation- A user-facing documentation change worth mentioning in the release notesShould this PR be included in the next patch release?
Yesshould be selected for bug fixes, documentation updates, and other small changes.Noshould be selected for new features and larger changes. If you're unsure about the release classification of this PR, leave this unchecked to let the maintainers decide.What is a minor/patch release?
Bug fixes, doc updates and new features usually go into minor releases.
Bug fixes and doc updates usually go into patch releases.