Skip to content

Commit

Permalink
Feature/update code for build (#4)
Browse files Browse the repository at this point in the history
* update pyproject.toml, add readme

* update pyproject.toml, call to pydantic

* move code around
  • Loading branch information
azuur authored Jan 17, 2024
1 parent 47916dc commit 890547c
Show file tree
Hide file tree
Showing 19 changed files with 24 additions and 12 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# IDE stuff
.vscode/

# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
Expand Down
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
# ML pipelines

Simple ML pipeline repo for experimenting with CI/CD / DevOps / MLOps.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
File renamed without changes.
Empty file.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
from ml_pipelines.common.dgp import generate_raw_data
from ml_pipelines.logic.common.dgp import generate_raw_data

data = generate_raw_data(10_000, 813)
data.to_csv("data.csv", index=False)
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
import matplotlib.pyplot as plt
import pandas as pd

from ml_pipelines.common.model import load_model, predict
from ml_pipelines.eval.eval import (
from ml_pipelines.logic.common.model import load_model, predict
from ml_pipelines.logic.eval.eval import (
calculate_metrics,
make_roc_plot,
prob_calibration_plot,
Expand Down
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
import pandas as pd

from ml_pipelines.common.feature_eng import fit_feature_transform, transform_features
from ml_pipelines.train.train import save_model, split_data, train_model
from ml_pipelines.logic.common.feature_eng import (
fit_feature_transform,
transform_features,
)
from ml_pipelines.logic.train.train import save_model, split_data, train_model

# Input
data = pd.read_csv("data.csv")
Expand All @@ -19,4 +22,7 @@
train_data.to_csv("train_data.csv", index=False)
test_data.to_csv("test_data.csv", index=False)
with open("feature_eng_params.json", "w") as f:
f.write(feature_eng_params.json())
f.write(feature_eng_params.model_dump_json())
test_data.to_csv("test_data.csv", index=False)
with open("feature_eng_params.json", "w") as f:
f.write(feature_eng_params.model_dump_json())
12 changes: 6 additions & 6 deletions pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,10 +1,14 @@
[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.poetry]
name = "mlops-nth-try"
name = "ml_pipelines"
version = "0.1.0"
description = "My nth attempt at making a demo MLOps project"
authors = ["Adrian Zuur <[email protected]>"]
readme = "README.md"
packages = [{include = "mlops_nth_try"}]
packages = [{include = "ml_pipelines"}]

[tool.poetry.dependencies]
python = "^3.11"
Expand All @@ -22,10 +26,6 @@ pre-commit = "^3.6.0"
pandas-stubs = "^2.1.4.231227"
isort = "^5.13.2"

[build-system]
requires = ["poetry-core"]
build-backend = "poetry.core.masonry.api"

[tool.ruff]
line-length = 88
show-fixes = true
Expand Down

0 comments on commit 890547c

Please sign in to comment.