Skip to content

Commit

Permalink
clean code, Dockerfile (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
azuur authored Feb 6, 2024
1 parent 687159f commit 057acbd
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 24 deletions.
2 changes: 2 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -49,4 +49,6 @@ RUN apt-get update && apt-get install -y curl
COPY --from=build /dist/*.whl /package/.
RUN pip install *.whl

EXPOSE 8000

USER python
1 change: 0 additions & 1 deletion ml_pipelines/logic/eval/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,4 +56,3 @@ def plot(ax):
ax.set_ylim(-0.05, 1.1 * m_bins)

return plot
return plot
23 changes: 0 additions & 23 deletions ml_pipelines/pipeline/eval_pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,31 +29,8 @@ def eval_pipeline(
y_score = predict(model, data[["X1", "X2"]], logger)
metrics = calculate_metrics(data["Y"], y_score, logger)

# Output
plots, axs = plt.subplots(1, 2, figsize=(10, 5))
make_roc_plot(model, data, logger)(ax=axs[0])
make_calibration_plot(data, y_score, logger)(ax=axs[1])
logger.info("Finished evaluation pipeline.")
return (metrics, plots)


# fig, ax = plt.subplots()
# for i in [0, 1]:
# tmp = test_data.loc[test_data.Y == i, :]
# ax.scatter(
# tmp["X1"],
# tmp["X2"],
# c=tmp["Y"].map({0: "lightgray", 1: "red"}),
# label=f"Y={i}",
# s=2,
# alpha=0.7,
# )
# ax.set_xlabel("X1")
# ax.set_ylabel("X2")
# ax.set_title("Scatter plot of training data")
# ax.legend(framealpha=1)
# plt.show()
# plt.show()
# ax.legend(framealpha=1)
# plt.show()
# plt.show()

0 comments on commit 057acbd

Please sign in to comment.