-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat(sdk): implement get current dataset drift (#15)
- Loading branch information
Showing
4 changed files
with
233 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
from enum import Enum | ||
from typing import List, Optional | ||
|
||
from pydantic import BaseModel, ConfigDict | ||
from pydantic.alias_generators import to_camel | ||
|
||
|
||
class DriftAlgorithm(str, Enum): | ||
KS = "KS" | ||
CHI2 = "CHI2" | ||
|
||
|
||
class FeatureDriftCalculation(BaseModel): | ||
type: DriftAlgorithm | ||
value: Optional[float] = None | ||
has_drift: bool | ||
|
||
model_config = ConfigDict(populate_by_name=True, alias_generator=to_camel) | ||
|
||
|
||
class FeatureDrift(BaseModel): | ||
feature_name: str | ||
drift_calc: FeatureDriftCalculation | ||
|
||
model_config = ConfigDict(populate_by_name=True, alias_generator=to_camel) | ||
|
||
|
||
class Drift(BaseModel): | ||
pass | ||
|
||
|
||
class BinaryClassDrift(Drift): | ||
feature_metrics: List[FeatureDrift] | ||
|
||
model_config = ConfigDict(populate_by_name=True, alias_generator=to_camel) | ||
|
||
|
||
class MultiClassDrift(Drift): | ||
pass | ||
|
||
|
||
class RegressionDrift(BaseModel): | ||
pass |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters