File tree Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Expand file tree Collapse file tree 4 files changed +11
-11
lines changed Original file line number Diff line number Diff line change 1
1
FROM python:3.10-slim
2
- LABEL author="Jaime Céspedes Sisniega <cespedes@ifca .unican.es>"
2
+ LABEL author="Jaime Céspedes Sisniega <jaime. cespedes@alumnos .unican.es>"
3
3
4
4
ARG DATASET
5
5
ARG PARENT_DIR
@@ -15,7 +15,7 @@ RUN apt-get -y update && \
15
15
rm requirements.txt
16
16
17
17
COPY ${PARENT_DIR}/app ./
18
- COPY ./ml/${DATASET}/detector.pkl ./objects/detector.pkl
18
+ COPY ./ml/objects/ ${DATASET}/detector.pkl ./objects/detector.pkl
19
19
20
20
USER app
21
21
Original file line number Diff line number Diff line change 25
25
status_code = HTTP_200_OK ,
26
26
)
27
27
async def check_drift (data : DetectorInputData ) -> DistanceBasedResponse :
28
- """Check if drift is present.
28
+ """Check if covariate drift is present.
29
29
30
30
:param data: input data
31
31
:type data: DetectorInputData
32
- :return: drift data information
32
+ :return: covariate drift data information
33
33
:rtype: DistanceBasedResponse
34
34
"""
35
- logging .info ("Checking drift..." )
35
+ logging .info ("Checking covariate drift..." )
36
36
check_drift_result = detector .check_drift (
37
37
values = data .values ,
38
38
alpha = data .alpha ,
Original file line number Diff line number Diff line change @@ -18,14 +18,14 @@ class Detector(metaclass=SingletonMeta):
18
18
19
19
def __init__ (self : "Detector" , settings : DetectorSettings ) -> None :
20
20
"""Init method."""
21
- logging .info ("Loading drift detector..." )
21
+ logging .info ("Loading covariate drift detector..." )
22
22
self .detector = self .load (
23
23
settings = settings ,
24
24
)
25
- logging .info ("Drift detector loaded." )
25
+ logging .info ("Covariate drift detector loaded." )
26
26
27
27
def load (self : "Detector" , settings : DetectorSettings ) -> BaseDetector :
28
- """Load drift detector.
28
+ """Load covariate drift detector.
29
29
30
30
:return detector
31
31
:rtype: BaseDetector
@@ -46,13 +46,13 @@ def check_drift(
46
46
values : np .ndarray ,
47
47
alpha : float = 0.05 ,
48
48
) -> dict [str , Any ]:
49
- """Check if drift is present.
49
+ """Check if covariate drift is present.
50
50
51
51
:param values: input sample
52
52
:type values: numpy.ndarray
53
53
:param alpha: significance level, defaults to 0.05
54
54
:type alpha: float, optional
55
- :return: drift data information
55
+ :return: covariate drift data information
56
56
:rtype: dict[str, Any]
57
57
"""
58
58
distance , callback_logs = self .detector .compare (
Original file line number Diff line number Diff line change @@ -12,7 +12,7 @@ class APISettings(BaseSettings):
12
12
"""
13
13
14
14
API_V1_STR : str = "/api/v1"
15
- PROJECT_NAME : str = "Data drift detection service"
15
+ PROJECT_NAME : str = "Covariate drift detection service"
16
16
VERSION : str = "1.0.0"
17
17
18
18
You can’t perform that action at this time.
0 commit comments