Skip to content

Commit f7c9b3d

Browse files
authored
Merge pull request #78 from ausimian/fix/nif-download-timeout
Fix NIF download timeout on cold-cache installs
2 parents 2468c22 + 3194f86 commit f7c9b3d

7 files changed

Lines changed: 17 additions & 6 deletions

File tree

RELEASE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
### Fixed
2+
3+
- Precompiled NIF download no longer times out on the `:peer.call/4`
4+
default 5s `gen_server.call` deadline. Consumers installing
5+
`{:emily, "~> 0.3"}` on a cold cache could see `:gen_server.call`
6+
timeouts while fetching the multi-MB tarball; the `.sha256` sidecar
7+
fit in the window but the main asset did not. The peer RPC now runs
8+
with `:infinity` so httpc's own request timing drives cancellation.

mix.exs

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,10 @@ defmodule Emily.MixProject do
444444
request = {String.to_charlist(url), []}
445445
opts = [body_format: :binary, stream: String.to_charlist(dest)]
446446

447-
case :peer.call(pid, :httpc, :request, [:get, request, http_opts, opts]) do
447+
# :peer.call/4 defaults to a 5000 ms gen_server.call timeout. The
448+
# sha256 sidecar fits; a multi-MB tarball doesn't. Let httpc drive
449+
# its own timing and don't let the RPC wrapper abort it.
450+
case :peer.call(pid, :httpc, :request, [:get, request, http_opts, opts], :infinity) do
448451
{:ok, :saved_to_file} ->
449452
:ok
450453

notebooks/distilbert_qa.livemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
```elixir
44
Mix.install(
55
[
6-
{:emily, "~> 0.1"},
6+
{:emily, "~> 0.3"},
77
{:bumblebee, "~> 0.6"},
88
{:tokenizers, "~> 0.5"},
99
{:nx, "~> 0.10"},

notebooks/fast_kernels.livemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
```elixir
44
Mix.install(
55
[
6-
{:emily, "~> 0.1"},
6+
{:emily, "~> 0.3"},
77
{:bumblebee, "~> 0.6"},
88
{:tokenizers, "~> 0.5"},
99
{:axon, "~> 0.7"},

notebooks/mnist_training.livemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
```elixir
44
Mix.install(
55
[
6-
{:emily, "~> 0.1"},
6+
{:emily, "~> 0.3"},
77
{:axon, "~> 0.7"},
88
{:scidata, "~> 0.1"},
99
{:nx, "~> 0.10"},

notebooks/qwen3_quantized.livemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
```elixir
44
Mix.install(
55
[
6-
{:emily, "~> 0.1"},
6+
{:emily, "~> 0.3"},
77
# Bumblebee 0.6.3 (the latest Hex release) doesn't yet include
88
# Qwen3 support, so pin the `main` ref that does. `override: true`
99
# because Emily's mix.exs declares `{:bumblebee, "~> 0.6", optional: true}`

notebooks/whisper_transcription.livemd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
```elixir
44
Mix.install(
55
[
6-
{:emily, "~> 0.1"},
6+
{:emily, "~> 0.3"},
77
{:bumblebee, "~> 0.6"},
88
{:tokenizers, "~> 0.5"},
99
{:nx, "~> 0.10"},

0 commit comments

Comments
 (0)