diff --git a/.github/workflows/build_wheels.yml b/.github/workflows/build_wheels.yml index 16115f0a..5c8cd0a2 100644 --- a/.github/workflows/build_wheels.yml +++ b/.github/workflows/build_wheels.yml @@ -17,7 +17,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Build wheels - uses: pypa/cibuildwheel@v2.16.2 + uses: pypa/cibuildwheel@v2.16.4 env: CIBW_ARCHS_MACOS: x86_64 arm64 - uses: actions/upload-artifact@v4 diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 36e2798d..fd0341b5 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,7 +12,7 @@ jobs: - name: Checkout branch uses: actions/checkout@v4 - name: Set up micromamba - uses: mamba-org/setup-micromamba@8752438cc2755ab7d0de2a8d70b694f5586baae8 + uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194 - name: Add micromamba to GITHUB_PATH run: echo "${HOME}/micromamba-bin" >> "$GITHUB_PATH" - name: Install Python 3.11 @@ -41,7 +41,7 @@ jobs: - name: Checkout branch uses: actions/checkout@v4 - name: Set up conda env - uses: mamba-org/setup-micromamba@8752438cc2755ab7d0de2a8d70b694f5586baae8 + uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194 with: environment-file: environment.yml init-shell: ${{ matrix.os == 'windows-latest' && 'powershell' || 'bash' }} diff --git a/.github/workflows/conda-build.yml b/.github/workflows/conda-build.yml index 6f2da138..ef937200 100644 --- a/.github/workflows/conda-build.yml +++ b/.github/workflows/conda-build.yml @@ -32,7 +32,7 @@ jobs: uses: actions/checkout@v4 - name: Fetch full git history run: git fetch --prune --unshallow - - uses: mamba-org/setup-micromamba@8752438cc2755ab7d0de2a8d70b694f5586baae8 + - uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194 with: init-shell: ${{ matrix.os == 'windows-latest' && 'cmd.exe' || 'bash' }} environment-name: build diff --git a/.github/workflows/daily.yml b/.github/workflows/daily.yml index 610dfca8..4d1b1ba1 100644 --- a/.github/workflows/daily.yml +++ b/.github/workflows/daily.yml @@ -24,7 +24,7 @@ jobs: steps: - name: Checkout branch uses: actions/checkout@v4 - - uses: mamba-org/setup-micromamba@8752438cc2755ab7d0de2a8d70b694f5586baae8 + - uses: mamba-org/setup-micromamba@8767fb704bd78032e9392f0386bf46950bdd1194 with: environment-file: environment.yml create-args: >- diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 0aca0118..ccd5f9fe 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -1,6 +1,6 @@ repos: - repo: https://github.com/Quantco/pre-commit-mirrors-black - rev: 23.11.0 + rev: 23.12.1 hooks: - id: black-conda args: @@ -23,12 +23,12 @@ repos: ] exclude: (^src/glum_benchmarks/orig_sklearn_fork/|^docs) - repo: https://github.com/Quantco/pre-commit-mirrors-isort - rev: 5.12.0 + rev: 5.13.2 hooks: - id: isort-conda additional_dependencies: [toml] - repo: https://github.com/Quantco/pre-commit-mirrors-mypy - rev: "1.7.1" + rev: "1.8.0" hooks: - id: mypy-conda args: diff --git a/src/glum/_distribution.py b/src/glum/_distribution.py index 6b52187e..8050e4ab 100644 --- a/src/glum/_distribution.py +++ b/src/glum/_distribution.py @@ -1369,7 +1369,7 @@ def guess_intercept( second = np.log((mu ** (2 - p)).dot(sample_weight)) return first - second elif isinstance(link, LogitLink): - log_odds = np.log(avg_y) - np.log(np.average(1 - y, weights=sample_weight)) + log_odds = np.log(avg_y) - np.log(1 - avg_y) if eta is None: return log_odds avg_eta = eta if np.isscalar(eta) else np.average(eta, weights=sample_weight)