-
Notifications
You must be signed in to change notification settings - Fork 612
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
Metrics redesign #1389
base: main
Are you sure you want to change the base?
Metrics redesign #1389
Conversation
|
||
@dataclasses.dataclass | ||
class ColumnInfo: | ||
type: ColumnType |
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.
usually renamed as type_
to not collide with type
src/evidently/v2/datasets.py
Outdated
self.data = data | ||
|
||
|
||
class Scorer: |
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.
need to think about naming, this class most definitely does not do "scoring" :)
return ColumnType.Unknown | ||
|
||
|
||
class DatasetColumn: |
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.
dataclass?
self._alias = alias | ||
|
||
@abc.abstractmethod | ||
def generate_data(self, dataset: "Dataset") -> Union[DatasetColumn, Dict[str, DatasetColumn]]: |
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 try to avoid unions, because every it means i will need to do instance check somewhere. How about we use general interface with a dict, but have something like SingleColumnScorer
that will delegate this method to another abs method that returns a single DatasetColumn
?
raise NotImplementedError() | ||
|
||
@property | ||
def alias(self) -> 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.
why this is not a field?
src/evidently/v2/metrics/base.py
Outdated
class MetricResult: | ||
_widget: Optional[List[BaseWidgetInfo]] = None | ||
|
||
def set_widget(self, widget: List[BaseWidgetInfo]): |
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.
seems redundant
Allow multiple scorer with same names (auto suffix).
* codegen scorers * rename and skip * add alias * imports * remove display name
Update metric_workbench.ipynb to use descriptors instead of Scorers.
* support v2 metrics in v1 snapshots * plot * v1 to v2 compat * update stuff * fix * revert pydantic * revert pydantic * revert pydantic * merge * merge * rename scorers->descriptors
…eature/metrics-redesign
No description provided.