Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Matchall in visualize.jl has been deprecated as of Julia 1.3 #18491

Closed
andevellicus opened this issue Jun 5, 2020 · 2 comments · Fixed by #18515
Closed

Matchall in visualize.jl has been deprecated as of Julia 1.3 #18491

andevellicus opened this issue Jun 5, 2020 · 2 comments · Fixed by #18515

Comments

@andevellicus
Copy link
Contributor

Description

to_graphviz will no longer work.

Error Message

ERROR: LoadError: UndefVarError: matchall not defined
Stacktrace:
[1] _extract_shape(::String) at /home/###julia/packages/MXNet/XoVCW/src/visualize.jl:210
[2] to_graphviz(::SymbolicNode; title::String, input_shapes::Nothing) at /home/andevellicus/.julia/packages/MXNet/XoVCW/src/visualize.jl:91
[3] to_graphviz at /home/###/.julia/packages/MXNet/XoVCW/src/visualize.jl:33 [inlined]
[4] (::var"#3#4")(::IOStream) at /home/###Programming/ML/julia/MXNet/train.jl:24
[5] open(::var"#3#4", ::String, ::Vararg{String,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./io.jl:298
[6] top-level scope at /home/###/Programming/ML/julia/MXNet/train.jl:23
in expression starting at /home/###Programming/ML/julia/MXNet/train.jl:23

To Reproduce

model = build_model()

open("visualize.dot", "w") do io
println(io, mx.to_graphviz(model))
end
run(pipeline(dot -Tsvg visualize.dot, stdout="model.svg"))

Environment

We recommend using our script for collecting the diagnositc information. Run the following command and paste the outputs below:

----------MXNet Info-----------
Version      : 2.0.0
Directory    : /usr/lib/python3.8/site-packages/mxnet
Num GPUs     : 3
Hashtag not found. Not installed from pre-built package.
----------System Info----------
Platform     : Linux-5.6.15-arch1-1-x86_64-with-glibc2.2.5
system       : Linux
node         : mordekai
release      : 5.6.15-arch1-1
version      : #1 SMP PREEMPT Wed, 27 May 2020 23:42:26 +0000

Julia 1.4

@leezu leezu added the Julia label Jun 5, 2020
@andevellicus
Copy link
Contributor Author

Changing

  shape = matchall(r"\d+", str)

to

  shape = collect(m.match for m in eachmatch(r"\d+", str))

will fix this error.

@leezu
Copy link
Contributor

leezu commented Jun 8, 2020

Please open a PR

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants