From 6f801e7a964aa10cb0a257401342f910fb5f25b8 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 17 Sep 2026 06:34:49 -0400 Subject: [PATCH 1/3] docs: fetch Burgers dataset from Hugging Face mirror instead of Google Drive The Burgers tutorials downloaded burgers_data_R10.mat from Google Drive via gdown. Drive rate-limits shared files ("Too many users have viewed or downloaded this file recently"), which failed CI docs builds with FileURLRetrievalError whenever the quota was exhausted. Fetch the same dataset from the kks32/sciml-dataset Hugging Face mirror over plain HTTPS with a pinned sha256 checksum instead. This also drops the PythonCall/CondaPkg/gdown stack from the docs environment. The DataDep is renamed to BurgersR10 so machines with a stale Drive-zip cache refetch instead of reusing the old layout. Co-Authored-By: Chris Rackauckas Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL) --- docs/CondaPkg.toml | 2 -- docs/Project.toml | 4 ---- docs/src/tutorials/burgers_deeponet.md | 18 ++++++------------ docs/src/tutorials/burgers_fno.md | 18 ++++++------------ 4 files changed, 12 insertions(+), 30 deletions(-) delete mode 100644 docs/CondaPkg.toml diff --git a/docs/CondaPkg.toml b/docs/CondaPkg.toml deleted file mode 100644 index 4bd19d9..0000000 --- a/docs/CondaPkg.toml +++ /dev/null @@ -1,2 +0,0 @@ -[deps] -gdown = "" diff --git a/docs/Project.toml b/docs/Project.toml index 5c394d9..24eb43e 100644 --- a/docs/Project.toml +++ b/docs/Project.toml @@ -2,7 +2,6 @@ AlgebraOfGraphics = "cbdf2221-f076-402e-a563-3d30da359d67" CSV = "336ed68f-0bac-5ca0-87d4-7b16caf5d00b" CairoMakie = "13f3f980-e62b-5c42-98c6-ff1f3baf88f0" -CondaPkg = "992eb4ea-22a4-4c89-a5bb-47a3300528ab" DataDeps = "124859b0-ceae-595e-8997-d05f6a7a8dfe" DataFrames = "a93c6f00-e57d-5684-b7b6-d8193f3e46c0" Documenter = "e30172f5-a6a5-5a46-863b-614d45cd2de4" @@ -13,7 +12,6 @@ MLUtils = "f1d291b0-491e-4a28-83b9-f70985020b54" NeuralOperators = "ea5c82af-86e5-48da-8ee1-382d6ad7af4b" Optimisers = "3bd65402-5787-11e9-1adc-39752487f4e2" Printf = "de0858da-6303-5e67-8744-51eddeeeb8d7" -PythonCall = "6099a3de-0909-46bc-b1f4-468b9a2dfc0d" Reactant = "3c362404-f566-11ee-1572-e11a4b42c853" Scratch = "6c6a2e73-6563-6170-7368-637461726353" @@ -21,7 +19,6 @@ Scratch = "6c6a2e73-6563-6170-7368-637461726353" AlgebraOfGraphics = "0.10.7, 0.11, 0.12, 0.13" CSV = "0.10, 1.0" CairoMakie = "0.13, 0.14, 0.15" -CondaPkg = "0.2.23" DataDeps = "0.7.13, 1.0" DataFrames = "1" Documenter = "1.7.0" @@ -32,6 +29,5 @@ MLUtils = "0.4.4" NeuralOperators = "0.7" Optimisers = "0.4" Printf = "1.10, < 0.0.1, 1" -PythonCall = "0.9.23" Reactant = "0.2.130" Scratch = "1.3.0" diff --git a/docs/src/tutorials/burgers_deeponet.md b/docs/src/tutorials/burgers_deeponet.md index af2cbd0..91b391e 100644 --- a/docs/src/tutorials/burgers_deeponet.md +++ b/docs/src/tutorials/burgers_deeponet.md @@ -4,16 +4,14 @@ ```@example burgers using MAT, MLUtils, Printf, DataDeps -using PythonCall, CondaPkg # For `gdown` - -const gdown = pyimport("gdown") register( DataDep( - "Burgers", + "BurgersR10", """ Burgers' equation dataset from - [fourier_neural_operator](https://github.com/zongyi-li/fourier_neural_operator) + [fourier_neural_operator](https://github.com/zongyi-li/fourier_neural_operator), + mirrored at [kks32/sciml-dataset](https://huggingface.co/datasets/kks32/sciml-dataset). mapping between initial conditions to the solutions at the last point of time \ evolution in some function space. @@ -23,16 +21,12 @@ register( * `a`: initial conditions u(x,0) * `u`: solutions u(x,t_end) """, - "https://drive.google.com/uc?id=16a8od4vidbiNR3WtaBPCSZ0T3moxjhYe", - "9cbbe5070556c777b1ba3bacd49da5c36ea8ed138ba51b6ee76a24b971066ecd"; - fetch_method=(url, local_dir) -> begin - pyconvert(String, gdown.download(url, joinpath(local_dir, "Burgers_R10.zip"))) - end, - post_fetch_method=unpack, + "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/main/fno/burgers_data_R10.mat", + "d1a0456776255a4bd841dbc18951d3f468266d945d96e24ae531a12f18bb5a1a", ), ) -filepath = joinpath(datadep"Burgers", "burgers_data_R10.mat") +filepath = joinpath(datadep"BurgersR10", "burgers_data_R10.mat") const N = 2048 const Δsamples = 2^3 diff --git a/docs/src/tutorials/burgers_fno.md b/docs/src/tutorials/burgers_fno.md index 9ad58e3..59f286b 100644 --- a/docs/src/tutorials/burgers_fno.md +++ b/docs/src/tutorials/burgers_fno.md @@ -4,17 +4,15 @@ ```@example burgers_fno using DataDeps, MAT, MLUtils -using PythonCall, CondaPkg # For `gdown` using Printf -const gdown = pyimport("gdown") - register( DataDep( - "Burgers", + "BurgersR10", """ Burgers' equation dataset from - [fourier_neural_operator](https://github.com/zongyi-li/fourier_neural_operator) + [fourier_neural_operator](https://github.com/zongyi-li/fourier_neural_operator), + mirrored at [kks32/sciml-dataset](https://huggingface.co/datasets/kks32/sciml-dataset). mapping between initial conditions to the solutions at the last point of time \ evolution in some function space. @@ -24,16 +22,12 @@ register( * `a`: initial conditions u(x,0) * `u`: solutions u(x,t_end) """, - "https://drive.google.com/uc?id=16a8od4vidbiNR3WtaBPCSZ0T3moxjhYe", - "9cbbe5070556c777b1ba3bacd49da5c36ea8ed138ba51b6ee76a24b971066ecd"; - fetch_method=(url, local_dir) -> begin - pyconvert(String, gdown.download(url, joinpath(local_dir, "Burgers_R10.zip"))) - end, - post_fetch_method=unpack, + "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/main/fno/burgers_data_R10.mat", + "d1a0456776255a4bd841dbc18951d3f468266d945d96e24ae531a12f18bb5a1a", ), ) -filepath = joinpath(datadep"Burgers", "burgers_data_R10.mat") +filepath = joinpath(datadep"BurgersR10", "burgers_data_R10.mat") const N = 2048 const Δsamples = 2^3 From 4118fe4afde2a69f90d35ff3c477bbc2753f61fd Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 17 Sep 2026 06:34:49 -0400 Subject: [PATCH 2/3] fix GridEmbedding for Reactant compilation without regressing CUDA placement Placing the CPU-built grid via Lux.get_device(x) throws inside Reactant.@compile (get_device errors on TracedRArray), which broke the Burgers FNO docs tutorial training step. Allocate like x and broadcast-assign instead: no runtime device query, and the grid still lands on x's device, preserving the CUDA scalar-indexing fix from #125. Co-Authored-By: Chris Rackauckas Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL) --- src/layers.jl | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/layers.jl b/src/layers.jl index 1b70a44..bdf64e3 100644 --- a/src/layers.jl +++ b/src/layers.jl @@ -345,8 +345,10 @@ function (layer::GridEmbedding)(x::AbstractArray{T, N}, ps, st) where {T, N} size(x, N), ) - # Move the CPU-built grid to the same device as x (fixes CUDA scalar indexing, #125) - grid = Lux.get_device(x)(grid) + # Place the CPU-built grid on `x`'s device (fixes CUDA scalar indexing, #125). + # This must not query the device at runtime: `Lux.get_device(x)` errors + # inside `Reactant.@compile`. + grid = (similar(x, eltype(grid), size(grid)) .= grid) return cat(grid, x; dims = N - 1), st end From a534b3c7ed5794299cac5eab26ea0a8c2fc06865 Mon Sep 17 00:00:00 2001 From: ChrisRackauckas-Claude Date: Thu, 17 Sep 2026 20:34:29 -0400 Subject: [PATCH 3/3] docs: pin Burgers dataset mirror to immutable HF revision The mirror URL used `resolve/main`, so any upstream change to the mirror's main branch would force a full re-download before the pinned sha256 could fail the build. Pin to the revision (982685ff) whose content the checksum was verified against, so docs builds are reproducible. Co-Authored-By: Chris Rackauckas Agent-Harness: OpenCode Agent-Model: muse-spark-1.3-contributor-free Agent-Session: local session at /home/crackauc/sandbox/tmp_20260917_040834_91074 (no public conversation URL) --- docs/src/tutorials/burgers_deeponet.md | 2 +- docs/src/tutorials/burgers_fno.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/docs/src/tutorials/burgers_deeponet.md b/docs/src/tutorials/burgers_deeponet.md index 91b391e..5eea26f 100644 --- a/docs/src/tutorials/burgers_deeponet.md +++ b/docs/src/tutorials/burgers_deeponet.md @@ -21,7 +21,7 @@ register( * `a`: initial conditions u(x,0) * `u`: solutions u(x,t_end) """, - "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/main/fno/burgers_data_R10.mat", + "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/982685ff70965591682682dddd284d35e670ac7f/fno/burgers_data_R10.mat", "d1a0456776255a4bd841dbc18951d3f468266d945d96e24ae531a12f18bb5a1a", ), ) diff --git a/docs/src/tutorials/burgers_fno.md b/docs/src/tutorials/burgers_fno.md index 59f286b..38f0350 100644 --- a/docs/src/tutorials/burgers_fno.md +++ b/docs/src/tutorials/burgers_fno.md @@ -22,7 +22,7 @@ register( * `a`: initial conditions u(x,0) * `u`: solutions u(x,t_end) """, - "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/main/fno/burgers_data_R10.mat", + "https://huggingface.co/datasets/kks32/sciml-dataset/resolve/982685ff70965591682682dddd284d35e670ac7f/fno/burgers_data_R10.mat", "d1a0456776255a4bd841dbc18951d3f468266d945d96e24ae531a12f18bb5a1a", ), )