Skip to content

Commit 9cbff8e

Browse files
committed
Cleaning sonarcloud smells
1 parent 83102e5 commit 9cbff8e

3 files changed

Lines changed: 4 additions & 3 deletions

File tree

Dockerfile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,8 @@ LABEL maintainer="j.garciadebustos@godeltech.com"
44

55
# OpenMP library needed by LightGBM, XGBoost, etc
66
RUN apt-get update \
7-
&& apt-get install -y --no-install-recommends libgomp1
7+
&& apt-get install -y --no-install-recommends libgomp1 \
8+
&& apt clean
89

910
COPY requirements.txt /app/
1011

ml_rest_fastapi/trained_model/adult_census_income.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -83,7 +83,7 @@ def run(input_data: Iterable) -> Dict:
8383
data = pd.DataFrame(input_data, index=[0])
8484
data = pd.get_dummies(data)
8585
data = data.reindex(columns=COLUMNS, fill_value=0)
86-
log.info("transformed_data: %s", np.array_str(data.values[0], max_line_width=10000))
86+
log.info("transformed_data: %s", np.array_str(data.to_numpy()[0], max_line_width=10000))
8787

8888
ret = {}
8989

ml_rest_fastapi/trained_model/sample_model.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ def run(input_data: Iterable) -> Dict:
6767
# then make (or mock) a prediction
6868
# prediction = MODEL.predict(data)
6969

70-
log.info("transformed_data: %s", np.array_str(data.values[0], max_line_width=10000))
70+
log.info("transformed_data: %s", np.array_str(data.to_numpy()[0], max_line_width=10000))
7171
prediction = "mock_prediction"
7272
if isinstance(prediction, np.ndarray):
7373
prediction = prediction.tolist()[0]

0 commit comments

Comments
 (0)