Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

MacroTools error on 0.5 #2

Closed
ViralBShah opened this issue Sep 16, 2016 · 2 comments
Closed

MacroTools error on 0.5 #2

ViralBShah opened this issue Sep 16, 2016 · 2 comments

Comments

@ViralBShah
Copy link
Member

I am not sure if I should be using Flux.jl yet with 0.5, but:

julia> using Flux
INFO: Recompiling stale cache file /Users/viral/.julia/lib/v0.5/Media.ji for module Media.
WARNING: Method definition require(Symbol) in module Base at loading.jl:345 overwritten in module Juno at /Users/viral/.julia/v0.5/Requires/src/require.jl:12.
ERROR: LoadError: LoadError: Unsupported expression MacroTools.flatten in @>
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in include_from_node1(::String) at ./loading.jl:488
 in include_from_node1(::String) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval(::Module, ::Any) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in require(::Symbol) at ./loading.jl:415
 in require(::Symbol) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/viral/.julia/v0.5/Flux/src/compiler/code.jl, in expression starting on line 7
while loading /Users/viral/.julia/v0.5/Flux/src/Flux.jl, in expression starting on line 12
@MikeInnes
Copy link
Member

I think you'll need to checkout lazy for this (will be tagged soon)

@MikeInnes
Copy link
Member

Should be tagged now.

MikeInnes pushed a commit that referenced this issue Oct 23, 2018
gartangh referenced this issue in gartangh/Flux.jl Jan 18, 2020
# This is the 1st commit message:

added GroupedConvolutions

# This is the commit message #2:

Working implementation of channel shuffling

# This is the commit message #3:

grouped convolutions can now act on the whole input

# This is the commit message #4:

updated documentation
bors bot pushed a commit that referenced this issue Feb 29, 2020
bors bot pushed a commit that referenced this issue Dec 9, 2020
New implementation based on Zygote.Buffer
bors bot added a commit that referenced this issue Nov 23, 2021
1775: Fix a doctest failure r=mcabbott a=mcognetta

This fixes a doctest failure that seems to be causing builds to fail. The issue seems to be that gradient now returns floats, even if the inputs are integers.

See the following stack trace:

```
┌ Error: doctest failure in ~/work/Flux.jl/Flux.jl/docs/src/models/basics.md:25-30
│ 
│ ```jldoctest basics
│ julia> f(x, y) = sum((x .- y).^2);
│ 
│ julia> gradient(f, [2, 1], [2, 0])
│ ([0, 2], [0, -2])
│ ```
│ 
│ Subexpression:
│ 
│ gradient(f, [2, 1], [2, 0])
│ 
│ Evaluated output:
│ 
│ ([0.0, 2.0], [-0.0, -2.0])
│ 
│ Expected output:
│ 
│ ([0, 2], [0, -2])
│ 
│   diff =
│    Warning: Diff output requires color.
│    ([0, 2], [0, -2])([0.0, 2.0], [-0.0, -2.0])
└ @ Documenter.DocTests ~/.julia/packages/Documenter/bFHi4/src/DocTests.jl:373
┌ Error: doctest failure in ~/work/Flux.jl/Flux.jl/docs/src/models/basics.md:37-56
│ 
│ ```jldoctest basics
│ julia> x = [2, 1];
│ 
│ julia> y = [2, 0];
│ 
│ julia> gs = gradient(params(x, y)) do
│          f(x, y)
│        end
│ Grads(...)
│ 
│ julia> gs[x]
│ 2-element Vector{Int64}:
│  0
│  2
│ 
│ julia> gs[y]
│ 2-element Vector{Int64}:
│   0
│  -2
│ ```
│ 
│ Subexpression:
│ 
│ gs[x]
│ 
│ Evaluated output:
│ 
│ 2-element Vector{Float64}:
│  0.0
│  2.0
│ 
│ Expected output:
│ 
│ 2-element Vector{Int64}:
│  0
│  2
│ 
│   diff =
│    Warning: Diff output requires color.
│    2-element Vector{Int64}:
│     0
│     2Vector{Float64}:
│     0.0
│     2.0
└ @ Documenter.DocTests ~/.julia/packages/Documenter/bFHi4/src/DocTests.jl:373
┌ Error: doctest failure in ~/work/Flux.jl/Flux.jl/docs/src/models/basics.md:37-56
│ 
│ ```jldoctest basics
│ julia> x = [2, 1];
│ 
│ julia> y = [2, 0];
│ 
│ julia> gs = gradient(params(x, y)) do
│          f(x, y)
│        end
│ Grads(...)
│ 
│ julia> gs[x]
│ 2-element Vector{Int64}:
│  0
│  2
│ 
│ julia> gs[y]
│ 2-element Vector{Int64}:
│   0
│  -2
│ ```
│ 
│ Subexpression:
│ 
│ gs[y]
│ 
│ Evaluated output:
│ 
│ 2-element Vector{Float64}:
│  -0.0
│  -2.0
│ 
│ Expected output:
│ 
│ 2-element Vector{Int64}:
│   0
│  -2
│ 
│   diff =
│    Warning: Diff output requires color.
│    2-element Vector{Int64}:
│      0
│     -2Vector{Float64}:
│     -0.0
│     -2.0
└ @ Documenter.DocTests ~/.julia/packages/Documenter/bFHi4/src/DocTests.jl:373
┌ Error: Doctesting failed
│   exception =
│    `makedocs` encountered a doctest error. Terminating build
│    Stacktrace:
│      [1] error(s::String)
│        @ Base ./error.jl:33
│      [2] runner(#unused#::Type{Documenter.Builder.Doctest}, doc::Documenter.Documents.Document)
│        @ Documenter.Builder ~/.julia/packages/Documenter/bFHi4/src/Builder.jl:217
│      [3] dispatch(#unused#::Type{Documenter.Builder.DocumentPipeline}, x::Documenter.Documents.Document)
│        @ Documenter.Utilities.Selectors ~/.julia/packages/Documenter/bFHi4/src/Utilities/Selectors.jl:170
│      [4] #2
│        @ ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:249 [inlined]
│      [5] cd(f::Documenter.var"#2#3"{Documenter.Documents.Document}, dir::String)
│        @ Base.Filesystem ./file.jl:106
│      [6] makedocs(; debug::Bool, format::Documenter.Writers.HTMLWriter.HTML, kwargs::Base.Iterators.Pairs{Symbol, Any, NTuple{6, Symbol}, NamedTuple{(:root, :source, :sitename, :doctest, :modules, :doctestfilters), Tuple{String, String, String, Symbol, Vector{Module}, Vector{Regex}}}})
│        @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:248
│      [7] (::Documenter.var"#all_doctests#35"{Bool, Vector{Regex}, Vector{Module}})()
│        @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:815
│      [8] macro expansion
│        @ ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:836 [inlined]
│      [9] macro expansion
│        @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
│     [10] doctest(source::String, modules::Vector{Module}; fix::Bool, testset::String, doctestfilters::Vector{Regex})
│        @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:836
│     [11] doctest(package::Module; manual::Bool, testset::Nothing, kwargs::Base.Iterators.Pairs{Union{}, Union{}, Tuple{}, NamedTuple{(), Tuple{}}})
│        @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:771
│     [12] doctest(package::Module)
│        @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:758
│     [13] top-level scope
│        @ none:7
│     [14] eval
│        @ ./boot.jl:360 [inlined]
│     [15] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:261
│     [16] _start()
│        @ Base ./client.jl:485
└ @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:825
Doctests: Flux: Test Failed at /home/runner/.julia/packages/Documenter/bFHi4/src/Documenter.jl:836
  Expression: all_doctests()
Stacktrace:
 [1] macro expansion
   @ ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:836 [inlined]
 [2] macro expansion
   @ /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.6/Test/src/Test.jl:1151 [inlined]
 [3] doctest(source::String, modules::Vector{Module}; fix::Bool, testset::String, doctestfilters::Vector{Regex})
   @ Documenter ~/.julia/packages/Documenter/bFHi4/src/Documenter.jl:836
Test Summary:  | Fail  Total
Doctests: Flux |    1      1
ERROR: Some tests did not pass: 0 passed, 1 failed, 0 errored, 0 broken.
Error: Process completed with exit code 1.
```

Co-authored-by: Marco Cognetta <cognetta.marco@gmail.com>
Co-authored-by: Marco <cognetta.marco@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants