Subject: [bug#47350] [PATCH 00/29] Add Zygote (piece for Machine Learning with Julia)

From: zimoun <[email-masked]>
Date: Tue, 23 Mar 2021 20:42:11 +0100

Hi,

This adds all the packages required to build Zygote, the source-to-source
automatic differentiation in Julia.

   <https://github.com/FluxML/Zygote.jl>

It is the first brick to have Flux, the Julia machine learning framework.

  <https://github.com/FluxML/Flux.jl>

Noting that (at least 3) large pieces are still missing: Juno, Documenter and
CUDA.

Speaking about the Julia package CUDA, it is required by the test suite of
Zygote, that's why the #:tests? is #f.  However, we manually check the package
by running the small examples, e.g.,

--8<---------------cut here---------------start------------->8---
$ ./pre-inst-env guix environment -C --ad-hoc julia julia-zygote -- julia
julia> using Zygote
[ Info: Precompiling Zygote [e88e6eb3-aa80-5325-afca-941959d7151f]

julia> f(x) = 5x + 3
f (generic function with 1 method)

julia> f(10), f'(10)
(53, 5)

julia> @code_llvm f'(10)

;  @ /gnu/store/5m6676w77bbz44prbfxhxmk88srgxy81-profile/share/julia/packages/Zygote/src/compiler/interface.jl:62 within `#43'
define i64 @"julia_#43_2036"(i64) {
top:
  ret i64 5
}

julia>  W, b = rand(2, 3), rand(2);

julia> predict(x) = W*x .+ b;

julia> g = gradient(Params([W, b])) do
         sum(predict([1,2,3]))
       end
Grads(...)

julia> g[W], g[b]
([1.0 2.0 3.0; 1.0 2.0 3.0], 2-element Fill{Float64}: entries equal to 1.0)
--8<---------------cut here---------------end--------------->8---

All the packages are not archived because of the rate limit.  They should be soon.

--8<---------------cut here---------------start------------->8---
for n in $(git log -30 --format="%s" --reverse | cut -d'-' -f2 | sed 's/\.//');
do
  ./pre-inst-env guix lint -c archival julia-${n} ;
done

gnu/packages/julia-xyz.scm:397:7: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:817:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:1040:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:723:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:283:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:1059:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:1085:5: [email-masked]: scheduled Software Heritage archival
gnu/packages/julia-xyz.scm:552:5: [email-masked]: Software Heritage rate limit reached; try again later
gnu/packages/julia-xyz.scm:211:5: [email-masked]: archival rate limit exceeded; try again later

gnu/packages/julia-xyz.scm:528:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:309:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:131:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:441:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:488:5: [email-masked]: archival rate limit exceeded; try again later
guix lint: error: julia-compilersupportlibraries: unknown package
guix lint: error: julia-openspecfun: unknown package
gnu/packages/julia-xyz.scm:1112:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:155:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:613:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:1221:5: [email-masked]: archival rate limit exceeded; try again later
gnu/packages/julia-xyz.scm:1243:5: [email-masked]: archival rate limit exceeded; try again later
--8<---------------cut here---------------end--------------->8---

Last, well, I feel motivated to implement an (recursive) importer, even
inaccurate, it will greatly help.

All the best,
simon

zimoun (29):
  gnu: Add julia-constructionbase.
  gnu: Add julia-macrotools.
  gnu: Add julia-nanmath.
  gnu: Add julia-reexport.
  gnu: Add julia-irtools.
  gnu: Add julia-staticarrays.
  gnu: Add julia-unitful.
  gnu: Add julia-abstractffts.
  gnu: Add julia-colortypes.
  gnu: Add julia-colors.
  gnu: Add julia-example.
  gnu: Add julia-requires.
  gnu: Add julia-chainrulescore.
  gnu: Add julia-richardson.
  gnu: Add julia-finitedifferences.
  gnu: Add julia-chainrulestestutils.
  gnu: Add julia-fillarrays.
  gnu: Add julia-commonsubexpressions.
  gnu: Add julia-calculus.
  gnu: Add julia-diffresults.
  gnu: Add julia-difftests.
  gnu: Add julia-compilersupportlibraries-jll.
  gnu: Add julia-openspecfun-jll.
  gnu: Add julia-specialfunctions.
  gnu: Add julia-diffrules.
  gnu: Add julia-chainrules.
  gnu: Add julia-forwarddiff.
  gnu: Add julia-zygoterules.
  gnu: Add julia-zygote.

 gnu/packages/julia-xyz.scm | 777 +++++++++++++++++++++++++++++++++++++
 1 file changed, 777 insertions(+)

base-commit: a2f3a456bec357394fe550d927c26bbbdaa7ba6e
-- 
2.28.0