Skip to content

Commit

Permalink
interpret v0.6.4 and powerlift v0.1.12
Browse files Browse the repository at this point in the history
  • Loading branch information
paulbkoch committed Sep 28, 2024
1 parent 66fa2ae commit bc823be
Show file tree
Hide file tree
Showing 13 changed files with 41 additions and 23 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -186,6 +186,8 @@ jobs:
docs:
runs-on: ubuntu-20.04
needs: [sdist]
permissions:
checks: write
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand All @@ -212,7 +214,7 @@ jobs:
pip install -r requirements.txt
/bin/sh ./build.sh
- name: Mark step with a warning
if: ${{ steps.build_docs.outcome == 'failure' && github.event_name != 'pull_request' }}
if: ${{ steps.build_docs.outcome == 'failure' }}
uses: actions/github-script@v6
with:
script: |
Expand Down Expand Up @@ -630,6 +632,8 @@ jobs:
format_clang:
needs: [bdist] # bdist is not needed but slow this step down
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand All @@ -646,7 +650,7 @@ jobs:
find shared/libebm \( -iname "*.cpp" -o -iname "*.h" -o -iname "*.hpp" \) | xargs clang-format-16 -i -style=file
git diff --exit-code
- name: Mark step with a warning
if: ${{ steps.check_cpp.outcome == 'failure' && github.event_name != 'pull_request' }}
if: ${{ steps.check_cpp.outcome == 'failure' }}
uses: actions/github-script@v6
with:
script: |
Expand All @@ -662,6 +666,8 @@ jobs:
format_black:
needs: [bdist] # bdist is not needed but slow this step down
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Check out repo
uses: actions/checkout@v4
Expand Down
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,12 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and the versioning is mostly derived from [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## [v0.6.4] - 2024-09-28
### Added
- support for regularization parameters reg_alpha, and reg_lambda in EBMs
- support for the parameter max_delta_step in EBMs
- improved fitting speed for most of the alternative objectives

## [v0.6.3] - 2024-08-07
### Added
- visualizations for the APRL (Automatic Piecewise Linear Regression) package by @mathias-von-ottenbreit
Expand Down
2 changes: 1 addition & 1 deletion python/interpret-core/interpret/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Distributed under the MIT software license

# NOTE: Version is replaced by a regex script.
__version__ = "0.6.3"
__version__ = "0.6.4"
2 changes: 1 addition & 1 deletion python/interpret-core/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
from setuptools.command.sdist import sdist

# NOTE: Version is replaced by a regex script.
version = "0.6.3"
version = "0.6.4"


def _copy_native_code_to_setup():
Expand Down
2 changes: 1 addition & 1 deletion python/interpret/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

name = "interpret"
# NOTE: Version is replaced by a regex script.
version = "0.6.3"
version = "0.6.4"
long_description = """
In the beginning machines learned in darkness, and data scientists struggled in the void to explain them.
Expand Down
8 changes: 8 additions & 0 deletions python/powerlift/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,14 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and the versioning is mostly derived from [Semantic Versioning](https://semver.org/spec/v2.0.0.html).

## v0.1.12 - 2024-09-28
### Added
- improved reliability when running on Azure
- much faster interface
- Azure runners now self-terminate when complete
- handle out of memory terminations
- new options to specify pip and apt get installations on remote runners

## v0.1.11 - 2024-08-20
### Added
- eliminate need for private container registries
Expand Down
2 changes: 1 addition & 1 deletion python/powerlift/powerlift/_version.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,4 +2,4 @@
# Distributed under the MIT software license

# NOTE: Version is replaced by a regex script.
__version__ = "0.1.11"
__version__ = "0.1.12"
4 changes: 2 additions & 2 deletions python/powerlift/scripts/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
# syntax=docker/dockerfile:1
FROM python:3.9-slim-buster

COPY powerlift-0.1.11-py3-none-any.whl .
COPY powerlift-0.1.12-py3-none-any.whl .

# Install dependencies
RUN apt-get update && \
apt-get install -y --no-install-recommends build-essential unixodbc-dev libpq-dev python-dev && \
pip install powerlift-0.1.11-py3-none-any.whl[postgres,mssql,testing] && \
pip install powerlift-0.1.12-py3-none-any.whl[postgres,mssql,testing] && \
apt-get clean && \
rm -rf /var/lib/apt/lists/* /tmp/* /var/tmp/* && \
apt-get autoremove -y
Expand Down
2 changes: 1 addition & 1 deletion python/powerlift/scripts/build-docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,4 +5,4 @@ cd "$(dirname "${BASH_SOURCE[0]}")"
mkdir -p ../build/docker
cp Dockerfile ../build/docker/
cd .. && python -m build && cp dist/* build/docker/
cd build/docker && docker build -t interpretml/powerlift:0.1.11 .
cd build/docker && docker build -t interpretml/powerlift:0.1.12 .
2 changes: 1 addition & 1 deletion python/powerlift/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

setuptools.setup(
name="powerlift",
version="0.1.11",
version="0.1.12",
author="The InterpretML Contributors",
author_email="[email protected]",
description="Interactive Benchmarking for Machine Learning.",
Expand Down
10 changes: 4 additions & 6 deletions scripts/release_process.txt
Original file line number Diff line number Diff line change
Expand Up @@ -264,9 +264,7 @@ set_visualize_provider(InlineProvider())
POWERLIFT:
- update CHANGELOG.md
- update version in:
scripts\build-docker.sh
scripts\Dockerfile (in 2 places)
setup.py
powerlift\executors\azure_ci.py
powerlift\executors\docker.py
powerlift\_version.py
python\powerlift\scripts\build-docker.sh
python\powerlift\scripts\Dockerfile (in 2 places)
python\powerlift\setup.py
python\powerlift\powerlift\_version.py
12 changes: 6 additions & 6 deletions shared/libebm/ebm_stats.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ static constexpr FloatCalc k_gainMin = 0;
// - details on float representations -> https://www.volkerschatz.com/science/float.html
// - things that are guaranteed and not -> https://docs.oracle.com/cd/E19957-01/806-3568/ncg_goldberg.html

INLINE_ALWAYS static FloatCalc HandleL1(const FloatCalc sumGradient, const FloatCalc regAlpha) {
INLINE_ALWAYS static FloatCalc ApplyL1(const FloatCalc sumGradient, const FloatCalc regAlpha) {
EBM_ASSERT(0 <= regAlpha);
FloatCalc regularizedSumGradient = std::fabs(sumGradient) - regAlpha;
regularizedSumGradient = UNLIKELY(regularizedSumGradient < FloatCalc{0}) ? FloatCalc{0} : regularizedSumGradient;
Expand All @@ -73,7 +73,7 @@ INLINE_ALWAYS static FloatCalc HandleL1(const FloatCalc sumGradient, const Float
return regularizedSumGradient;
}

INLINE_ALWAYS static FloatCalc HandleL2(const FloatCalc sumHessian, const FloatCalc regLambda) {
INLINE_ALWAYS static FloatCalc ApplyL2(const FloatCalc sumHessian, const FloatCalc regLambda) {
EBM_ASSERT(0 <= regLambda);
return sumHessian + regLambda;
}
Expand All @@ -98,7 +98,7 @@ INLINE_ALWAYS static FloatCalc CalcNegUpdate(const FloatCalc sumGradient,
return FloatCalc{0};
}
}
FloatCalc ret = HandleL1(sumGradient, regAlpha) / HandleL2(sumHessian, regLambda);
FloatCalc ret = ApplyL1(sumGradient, regAlpha) / ApplyL2(sumHessian, regLambda);
if(UNLIKELY(std::fabs(ret) > deltaStepMax)) {
ret = UNPREDICTABLE(ret < FloatCalc{0}) ? -deltaStepMax : deltaStepMax;
}
Expand All @@ -114,7 +114,7 @@ INLINE_ALWAYS static FloatCalc CalcPartialGainFromUpdate(const FloatCalc sumGrad
EBM_ASSERT(std::isnan(sumHessian) || FloatCalc{0} <= sumHessian);

const FloatCalc partialGain =
negUpdate * (HandleL1(sumGradient, regAlpha) * FloatCalc{2} - negUpdate * HandleL2(sumHessian, regLambda));
negUpdate * (ApplyL1(sumGradient, regAlpha) * FloatCalc{2} - negUpdate * ApplyL2(sumHessian, regLambda));

return partialGain;
}
Expand All @@ -136,8 +136,8 @@ INLINE_ALWAYS static FloatCalc CalcPartialGain(const FloatCalc sumGradient,
const FloatCalc negUpdate = CalcNegUpdate<false>(sumGradient, sumHessian, regAlpha, regLambda, deltaStepMax);
partialGain = CalcPartialGainFromUpdate(sumGradient, sumHessian, negUpdate, regAlpha, regLambda);
} else {
const FloatCalc regularizedSumGradient = HandleL1(sumGradient, regAlpha);
partialGain = regularizedSumGradient / HandleL2(sumHessian, regLambda) * regularizedSumGradient;
const FloatCalc regularizedSumGradient = ApplyL1(sumGradient, regAlpha);
partialGain = regularizedSumGradient / ApplyL2(sumHessian, regLambda) * regularizedSumGradient;

EBM_ASSERT(std::isnan(partialGain) ||
IsApproxEqual(partialGain,
Expand Down
2 changes: 1 addition & 1 deletion shared/vis/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@interpretml/interpret-inline",
"version": "0.6.3",
"version": "0.6.4",
"description": "Interpret inline library for rendering visualizations across all notebook environments.",
"main": "index.js",
"keywords": [],
Expand Down

0 comments on commit bc823be

Please sign in to comment.