From bc823be8cae492db71234261d26d2062c07367cc Mon Sep 17 00:00:00 2001 From: Paul Koch Date: Sat, 28 Sep 2024 11:24:02 -0700 Subject: [PATCH] interpret v0.6.4 and powerlift v0.1.12 --- .github/workflows/ci.yml | 10 ++++++++-- CHANGELOG.md | 6 ++++++ python/interpret-core/interpret/_version.py | 2 +- python/interpret-core/setup.py | 2 +- python/interpret/setup.py | 2 +- python/powerlift/CHANGELOG.md | 8 ++++++++ python/powerlift/powerlift/_version.py | 2 +- python/powerlift/scripts/Dockerfile | 4 ++-- python/powerlift/scripts/build-docker.sh | 2 +- python/powerlift/setup.py | 2 +- scripts/release_process.txt | 10 ++++------ shared/libebm/ebm_stats.hpp | 12 ++++++------ shared/vis/package.json | 2 +- 13 files changed, 41 insertions(+), 23 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 349cfbf5a..d4278b93a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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 @@ -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: | @@ -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 @@ -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: | @@ -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 diff --git a/CHANGELOG.md b/CHANGELOG.md index e1af427a7..f6e2df12b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/python/interpret-core/interpret/_version.py b/python/interpret-core/interpret/_version.py index 5d003e683..820b9ff84 100644 --- a/python/interpret-core/interpret/_version.py +++ b/python/interpret-core/interpret/_version.py @@ -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" diff --git a/python/interpret-core/setup.py b/python/interpret-core/setup.py index ed4ad3cee..4c56584d9 100644 --- a/python/interpret-core/setup.py +++ b/python/interpret-core/setup.py @@ -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(): diff --git a/python/interpret/setup.py b/python/interpret/setup.py index f09843aa3..a81c8adeb 100644 --- a/python/interpret/setup.py +++ b/python/interpret/setup.py @@ -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. diff --git a/python/powerlift/CHANGELOG.md b/python/powerlift/CHANGELOG.md index ba5e3cb7f..daece50d1 100644 --- a/python/powerlift/CHANGELOG.md +++ b/python/powerlift/CHANGELOG.md @@ -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 diff --git a/python/powerlift/powerlift/_version.py b/python/powerlift/powerlift/_version.py index 5ca3be224..b5c918113 100644 --- a/python/powerlift/powerlift/_version.py +++ b/python/powerlift/powerlift/_version.py @@ -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" diff --git a/python/powerlift/scripts/Dockerfile b/python/powerlift/scripts/Dockerfile index 353c4f8cf..0fcdc27f2 100644 --- a/python/powerlift/scripts/Dockerfile +++ b/python/powerlift/scripts/Dockerfile @@ -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 diff --git a/python/powerlift/scripts/build-docker.sh b/python/powerlift/scripts/build-docker.sh index 88a7ce44f..a11004ff1 100755 --- a/python/powerlift/scripts/build-docker.sh +++ b/python/powerlift/scripts/build-docker.sh @@ -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 . diff --git a/python/powerlift/setup.py b/python/powerlift/setup.py index 4a8fc0f8e..dc5f81347 100644 --- a/python/powerlift/setup.py +++ b/python/powerlift/setup.py @@ -5,7 +5,7 @@ setuptools.setup( name="powerlift", - version="0.1.11", + version="0.1.12", author="The InterpretML Contributors", author_email="interpret@microsoft.com", description="Interactive Benchmarking for Machine Learning.", diff --git a/scripts/release_process.txt b/scripts/release_process.txt index 4fe53996c..4e43822f6 100644 --- a/scripts/release_process.txt +++ b/scripts/release_process.txt @@ -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 diff --git a/shared/libebm/ebm_stats.hpp b/shared/libebm/ebm_stats.hpp index 491a6031d..cfaba67cf 100644 --- a/shared/libebm/ebm_stats.hpp +++ b/shared/libebm/ebm_stats.hpp @@ -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; @@ -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; } @@ -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; } @@ -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; } @@ -136,8 +136,8 @@ INLINE_ALWAYS static FloatCalc CalcPartialGain(const FloatCalc sumGradient, const FloatCalc negUpdate = CalcNegUpdate(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, diff --git a/shared/vis/package.json b/shared/vis/package.json index e7b88fe6e..cb3b0fd9b 100644 --- a/shared/vis/package.json +++ b/shared/vis/package.json @@ -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": [],