avik-pal / Wandb.jl

Unofficial Julia bindings for logging experiments to wandb.ai
https://avik-pal.github.io/Wandb.jl/stable/
MIT License
80 stars 10 forks source link

Error in FluxTraining.jl Integration Example #30

Closed itan1 closed 4 months ago

itan1 commented 4 months ago

I am trying to run the FluxTraining.jl Integration example from the docs. When I try to import Wandb I run into the following error.

I think all usages of finish should be replaced with close as mentioned in the readme?

➜ julia --project=@. --threads=8
               _
   _       _ _(_)_     |  Documentation: https://docs.julialang.org
  (_)     | (_) (_)    |
   _ _   _| |_  __ _   |  Type "?" for help, "]?" for Pkg help.
  | | | | | | |/ _` |  |
  | | |_| | | | (_| |  |  Version 1.9.4 (2023-11-14)
 _/ |\__'_|_|_|\__'_|  |  Official https://julialang.org/ release
|__/                   |

(wandb-test) pkg> status
Status `~/projects/wandb-test/Project.toml`
  [587475ba] Flux v0.14.12
  [7bf95e4d] FluxTraining v0.3.9
  [eb30cadb] MLDatasets v0.7.14
  [f1d291b0] MLUtils v0.4.4
  [ad70616a] Wandb v0.5.1
  [ade2ca70] Dates

julia> using Flux

julia> using FluxTraining

julia> using Wandb
[ Info: Precompiling WandbFluxTrainingExt [10d72657-bc10-5b61-a9ba-946b2737303c]
ERROR: LoadError: UndefVarError: `finish` not defined
Stacktrace:
 [1] getproperty(x::Module, f::Symbol)
   @ Base ./Base.jl:31
 [2] top-level scope
   @ ~/.julia/packages/Wandb/nfzlz/ext/WandbFluxTrainingExt.jl:18
 [3] eval(m::Module, e::Any)
   @ Core ./boot.jl:370
 [4] top-level scope
   @ ~/.julia/packages/Wandb/nfzlz/ext/WandbFluxTrainingExt.jl:17
 [5] include
   @ ./Base.jl:457 [inlined]
 [6] include_package_for_output(pkg::Base.PkgId, input::String, depot_path::Vector{String}, dl_load_path::Vector{String}, load_path::Vector{String}, concrete_deps::Vector{Pair{Base.PkgId, UInt128}}, source::Nothing)
   @ Base ./loading.jl:2049
 [7] top-level scope
   @ stdin:3
in expression starting at /Users/itan/.julia/packages/Wandb/nfzlz/ext/WandbFluxTrainingExt.jl:1
in expression starting at stdin:3
┌ Error: Error during loading of extension WandbFluxTrainingExt of Wandb, use `Base.retry_load_extensions()` to retry.
│   exception =
│    1-element ExceptionStack:
│    Failed to precompile WandbFluxTrainingExt [10d72657-bc10-5b61-a9ba-946b2737303c] to "/Users/itan/.julia/compiled/v1.9/WandbFluxTrainingExt/jl_jQahDx".
│    Stacktrace:
│      [1] error(s::String)
│        @ Base ./error.jl:35
│      [2] compilecache(pkg::Base.PkgId, path::String, internal_stderr::IO, internal_stdout::IO, keep_loaded_modules::Bool)
│        @ Base ./loading.jl:2294
│      [3] compilecache
│        @ ./loading.jl:2167 [inlined]
│      [4] _require(pkg::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1805
│      [5] _require_prelocked(uuidkey::Base.PkgId, env::Nothing)
│        @ Base ./loading.jl:1660
│      [6] _require_prelocked(uuidkey::Base.PkgId)
│        @ Base ./loading.jl:1658
│      [7] run_extension_callbacks(extid::Base.ExtensionId)
│        @ Base ./loading.jl:1255
│      [8] run_extension_callbacks(pkgid::Base.PkgId)
│        @ Base ./loading.jl:1290
│      [9] run_package_callbacks(modkey::Base.PkgId)
│        @ Base ./loading.jl:1124
│     [10] _require_prelocked(uuidkey::Base.PkgId, env::String)
│        @ Base ./loading.jl:1667
│     [11] macro expansion
│        @ ./loading.jl:1648 [inlined]
│     [12] macro expansion
│        @ ./lock.jl:267 [inlined]
│     [13] require(into::Module, mod::Symbol)
│        @ Base ./loading.jl:1611
│     [14] eval
│        @ ./boot.jl:370 [inlined]
│     [15] eval_user_input(ast::Any, backend::REPL.REPLBackend, mod::Module)
│        @ REPL ~/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:153
│     [16] repl_backend_loop(backend::REPL.REPLBackend, get_module::Function)
│        @ REPL ~/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:249
│     [17] start_repl_backend(backend::REPL.REPLBackend, consumer::Any; get_module::Function)
│        @ REPL ~/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:234
│     [18] run_repl(repl::REPL.AbstractREPL, consumer::Any; backend_on_current_task::Bool, backend::Any)
│        @ REPL ~/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:379
│     [19] run_repl(repl::REPL.AbstractREPL, consumer::Any)
│        @ REPL ~/.julia/juliaup/julia-1.9.4+0.aarch64.apple.darwin14/share/julia/stdlib/v1.9/REPL/src/REPL.jl:365
│     [20] (::Base.var"#1018#1020"{Bool, Bool, Bool})(REPL::Module)
│        @ Base ./client.jl:421
│     [21] #invokelatest#2
│        @ ./essentials.jl:819 [inlined]
│     [22] invokelatest
│        @ ./essentials.jl:816 [inlined]
│     [23] run_main_repl(interactive::Bool, quiet::Bool, banner::Bool, history_file::Bool, color_set::Bool)
│        @ Base ./client.jl:405
│     [24] exec_options(opts::Base.JLOptions)
│        @ Base ./client.jl:322
│     [25] _start()
│        @ Base ./client.jl:522
└ @ Base loading.jl:1261

julia> 

Here is my systeminfo

julia> versioninfo()
Julia Version 1.9.4
Commit 8e5136fa297 (2023-11-14 08:46 UTC)
Build Info:
  Official https://julialang.org/ release
Platform Info:
  OS: macOS (arm64-apple-darwin22.4.0)
  CPU: 8 × Apple M1 Pro
  WORD_SIZE: 64
  LIBM: libopenlibm
  LLVM: libLLVM-14.0.6 (ORCJIT, apple-m1)
  Threads: 8 on 6 virtual cores
avik-pal commented 4 months ago

Yes, can you create a PR

ZedRover commented 4 months ago

I have create a PR, please check if it has error. PR @avik-pal