Skip to content

Commit

Permalink
Merge pull request #207 from MindSetLib/dev
Browse files Browse the repository at this point in the history
Dev
  • Loading branch information
alexmindset authored Jun 26, 2024
2 parents 97e6ac7 + fe955c6 commit 2fa3126
Show file tree
Hide file tree
Showing 8 changed files with 201 additions and 197 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/insolver-pypi-release.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ jobs:
- name: Install dependencies
shell: bash
run: |
pip install -U pip setuptools wheel
python -m pip install --upgrade pip setuptools wheel
poetry self add poetry-version-plugin
- name: Build a binary wheel and a source tarball
run: poetry build
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/insolver-tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- name: Install dependencies
shell: bash
run: |
pip install -U pip setuptools wheel
python -m pip install --upgrade pip setuptools wheel
poetry install --extras "all" --with dev --no-interaction
- name: Lint with black
shell: bash
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ Insolver can be installed via pip from PyPI. There are several installation opti
|----------------------------------------------------|---------------------------------------------|
| Regular installation | `pip install insolver` |
| Installation with feature engineering requirements | `pip install insolver[feature_engineering]` |
| Installation with feature monitoring requirements | `pip install insolver[feature_monitoring]` |
| Installation with interpretation requirements | `pip install insolver[interpretation]` |
| Installation with serving requirements | `pip install insolver[serving]` |
| Installation with report requirements | `pip install insolver[report]` |
Expand Down
2 changes: 1 addition & 1 deletion insolver/pricing/optimization.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ def max_conversion(x: np.ndarray, threshold: Union[float, int] = 0.5) -> np.ndar
orig = x[np.abs(x[:, 0] - x[:, 1].max()) < 0.01] # [:, 0] for price, [:, 1] for orig_price
if orig.shape[0] == 0:
orig = max_profit(x)
if x[:, 3].min() >= 0.5: # [:, 3] for orig_pred
if x[:, 3].min() >= threshold: # [:, 3] for orig_pred
choice = orig
else:
converted = x[x[:, 2] >= threshold]
Expand Down
385 changes: 193 additions & 192 deletions poetry.lock

Large diffs are not rendered by default.

1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -100,6 +100,7 @@ sphinxcontrib-serializinghtml = "*"

[tool.poetry.extras]
feature_engineering = ["statsmodels"]
feature_monitoring = ["Jinja2"]
interpretation = ["alibi", "dice-ml", "lime"]
report = ["Jinja2", "lime", "ydata-profiling"]
serving = ["Flask", "fastapi", "uvicorn", "pydantic", "gunicorn", "Django", "djangorestframework", "sympy", "Jinja2"]
Expand Down
4 changes: 2 additions & 2 deletions serving_docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
FROM python:3.8
FROM python:3.10

# Setup build arguments
ARG INSOLVER_VER=0.4.11
ARG INSOLVER_VER=0.4.28
ARG MODEL
ARG TRANSFORMS

Expand Down
1 change: 1 addition & 0 deletions tests/feature_monitoring/test_HomogeneityReport.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,3 +29,4 @@
os.rmdir('./datasets/')

assert os.path.exists('homogeneity_report.html')
os.remove('homogeneity_report.html')

0 comments on commit 2fa3126

Please sign in to comment.