dmlc / MXNet.jl

MXNet Julia Package - flexible and efficient deep learning in Julia

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Fix deprecation warnings

ViralBShah opened this issue · comments

Perhaps this is already fixed for 0.5 and only a tag is needed.

WARNING: `@windows_only` is deprecated, use `@static if is_windows()` instead
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in depwarn(::String, ::Symbol) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in @windows_only(::Any) at ./deprecated.jl:489
 in include_from_node1(::String) at ./loading.jl:426
 in include_from_node1(::String) at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
 in evalfile(::String, ::Array{String,1}) at ./loading.jl:442 (repeats 2 times)
 in cd(::##2#4, ::String) at ./file.jl:59
 in (::##1#3)(::IOStream) at ./none:13
 in open(::##1#3, ::String, ::String) at ./iostream.jl:113
 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 process_options(::Base.JLOptions) at ./client.jl:239
 in _start() at ./client.jl:318
 in _start() at /Users/viral/Desktop/Julia-0.5.app/Contents/Resources/julia/lib/julia/sys.dylib:?
while loading /Users/viral/.julia/v0.5/MXNet/deps/build.jl, in expression starting on line 20

Cc @ranjanan

Are you on current master of MXNet.jl? I am hesitant to tag a new release until I have addressed the remaining documentation issues.

I believe that is what I had with the latest METADATA. I don't think this is urgent in any way.

@pluskid I think we can tag a new release and close this.

Tagged, waiting for merging.

On the latest tagged MXNet, I still see:

julia> using MXNet
INFO: Precompiling module MXNet.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

WARNING: deprecated syntax "[a=>b for (a,b) in c]".
Use "Dict(a=>b for (a,b) in c)" instead.

Also, running the example:

julia> # fit parameters
       mx.fit(model, optimizer, train_provider, n_epoch=20, eval_data=eval_provider)
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
WARNING: Base.UTF8String is deprecated, use String instead.
  likely near no file:0
INFO: Start training on MXNet
INFO: Initializing parameters...
INFO: Creating KVStore...
INFO: TempSpace: Total 0 MB allocated on CPU0
INFO: Start training...
WARNING: utf8(s::AbstractString) is deprecated, use String(s) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in utf8(::String) at ./deprecated.jl:50
 in Formatting.FormatExpr(::String) at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:118
 in format at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:168 [inlined]
 in #fit#962(::Array{Any,1}, ::Function, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at /home/vinchhid/.julia/v0.5/MXNet/src/model.jl:518
 in (::MXNet.mx.#kw##fit)(::Array{Any,1}, ::MXNet.mx.#fit, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
WARNING: utf8(s::AbstractString) is deprecated, use String(s) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in utf8(::String) at ./deprecated.jl:50
 in Formatting.FormatExpr(::String) at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:119
 in format at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:168 [inlined]
 in #fit#962(::Array{Any,1}, ::Function, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at /home/vinchhid/.julia/v0.5/MXNet/src/model.jl:518
 in (::MXNet.mx.#kw##fit)(::Array{Any,1}, ::MXNet.mx.#fit, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
WARNING: utf8(s::AbstractString) is deprecated, use String(s) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in utf8(::String) at ./deprecated.jl:50
 in find_next_entry_open(::String, ::Int64) at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:103
 in Formatting.FormatExpr(::String) at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:124
 in format at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:168 [inlined]
 in #fit#962(::Array{Any,1}, ::Function, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at /home/vinchhid/.julia/v0.5/MXNet/src/model.jl:518
 in (::MXNet.mx.#kw##fit)(::Array{Any,1}, ::MXNet.mx.#fit, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
WARNING: bytestring(io::Base.AbstractIOBuffer) is deprecated, use String(io) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in bytestring(::Base.AbstractIOBuffer{Array{UInt8,1}}) at ./deprecated.jl:50
 in #fit#962(::Array{Any,1}, ::Function, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at /home/vinchhid/.julia/v0.5/MXNet/src/model.jl:518
 in (::MXNet.mx.#kw##fit)(::Array{Any,1}, ::MXNet.mx.#fit, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0
INFO: == Epoch 001 ==========
INFO: ## Training summary
WARNING: bytestring(io::Base.AbstractIOBuffer) is deprecated, use String(io) instead.
 in depwarn(::String, ::Symbol) at ./deprecated.jl:64
 in bytestring(::Base.AbstractIOBuffer{Array{UInt8,1}}) at ./deprecated.jl:50
 in format(::String, ::String, ::Vararg{Any,N}) at /home/vinchhid/.julia/v0.5/Formatting/src/formatexpr.jl:168
 in #fit#962(::Array{Any,1}, ::Function, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at /home/vinchhid/.julia/v0.5/MXNet/src/model.jl:521
 in (::MXNet.mx.#kw##fit)(::Array{Any,1}, ::MXNet.mx.#fit, ::MXNet.mx.FeedForward, ::MXNet.mx.SGD, ::MXNet.mx.MXDataProvider) at ./<missing>:0
 in eval(::Module, ::Any) at ./boot.jl:234
 in eval_user_input(::Any, ::Base.REPL.REPLBackend) at ./REPL.jl:64
 in macro expansion at ./REPL.jl:95 [inlined]
 in (::Base.REPL.##3#4{Base.REPL.REPLBackend})() at ./event.jl:68
while loading no file, in expression starting on line 0

I get the warnings on master too.

Formatting.jl needs a new tag. Cc @ranjanan

The dictionary deprecation warnings are problematic because Compat can't translate the new generator syntax.