Skip to content

Commit 9688192

Browse files
Bump versions (#427)
1 parent 6972751 commit 9688192

File tree

5 files changed

+39
-34
lines changed

5 files changed

+39
-34
lines changed

.github/workflows/nightly.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,8 @@ on:
44
- cron: "0 0 * * *"
55
workflow_dispatch:
66
env:
7-
elixir: 1.14.0
8-
otp: 24.0
7+
elixir: "1.19.2"
8+
otp: "28.1.1"
99
jobs:
1010
test:
1111
name: Test all
@@ -15,12 +15,12 @@ jobs:
1515
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
1616
LIBTORCH_DIR: ${{ github.workspace }}/cache/libtorch
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v5
1919
- uses: erlef/setup-beam@v1
2020
with:
2121
otp-version: ${{env.otp}}
2222
elixir-version: ${{env.elixir}}
23-
- uses: actions/cache@v3
23+
- uses: actions/cache@v4
2424
with:
2525
path: |
2626
deps

.github/workflows/test.yaml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,27 @@ jobs:
1414
matrix:
1515
include:
1616
- pair:
17-
elixir: "1.15.4"
18-
otp: "26.0.2"
17+
elixir: "1.19.2"
18+
otp: "28.1.1"
1919
lint: true
2020
slow: true
2121
- pair:
22-
elixir: "1.14.5"
23-
otp: "25.3.2.2"
22+
elixir: "1.15.8"
23+
otp: "26.2.5"
2424
env:
2525
MIX_ENV: test
2626
XLA_CACHE_DIR: ${{ github.workspace }}/cache/xla
2727
LIBTORCH_DIR: ${{ github.workspace }}/cache/torch
2828
steps:
29-
- uses: actions/checkout@v3
29+
- uses: actions/checkout@v5
3030
with:
3131
# We need the previous commit for git diff later
3232
fetch-depth: 2
3333
- uses: erlef/setup-beam@v1
3434
with:
3535
otp-version: ${{ matrix.pair.otp }}
3636
elixir-version: ${{ matrix.pair.elixir }}
37-
- uses: actions/cache@v3
37+
- uses: actions/cache@v4
3838
with:
3939
path: |
4040
deps

lib/bumblebee/conversion/pytorch_params.ex

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -84,12 +84,17 @@ defmodule Bumblebee.Conversion.PyTorchParams do
8484

8585
defp state_dict?(%{} = dict) when not is_struct(dict) do
8686
Enum.all?(dict, fn {key, value} ->
87-
is_binary(key) and Nx.LazyContainer.impl_for(value) != nil
87+
is_binary(key) and implements_lazy_container?(value)
8888
end)
8989
end
9090

9191
defp state_dict?(_other), do: false
9292

93+
defp implements_lazy_container?(value) do
94+
Nx.LazyContainer.impl_for(value) != Nx.LazyContainer.Any or
95+
Nx.Container.impl_for(value) != nil
96+
end
97+
9398
defp init_params(model, params_expr, pytorch_state, params_mapping) do
9499
layers =
95100
model

mix.exs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ defmodule Bumblebee.MixProject do
1010
version: @version,
1111
description: @description,
1212
name: "Bumblebee",
13-
elixir: "~> 1.14",
13+
elixir: "~> 1.15",
1414
elixirc_paths: elixirc_paths(Mix.env()),
1515
start_permanent: Mix.env() == :prod,
1616
deps: deps(),
@@ -44,7 +44,7 @@ defmodule Bumblebee.MixProject do
4444
{:unpickler, "~> 0.1.0"},
4545
{:safetensors, "~> 0.1.3"},
4646
{:jason, "~> 1.4.0"},
47-
{:unzip, "~> 0.12.0"},
47+
{:unzip, "~> 0.12.0 or ~> 0.13.0"},
4848
{:progress_bar, "~> 3.0"},
4949
{:stb_image, "~> 0.6.0", only: :test},
5050
{:bypass, "~> 2.1", only: :test},

0 commit comments

Comments
 (0)