AlphaZero.jl
AlphaZero.jl copied to clipboard
How to use AlphaZero in kaggle kernel?
Link to the kaggle notebook: https://www.kaggle.com/code/snimrexzeo/notebookfa1665bae0/edit
Trying to import AlphaZero in kaggle gives this:
Resolving package versions...
Updating `~/.julia/environments/v1.4/Project.toml`
[no changes]
Updating `~/.julia/environments/v1.4/Manifest.toml`
[no changes]
Resolving package versions...
---------------------------------------------------------------------------
RuntimeError Traceback (most recent call last)
/tmp/ipykernel_27/4199450944.py in <module>
----> 1 get_ipython().run_cell_magic('julia', '', 'ENV["GKSwstype"]="100"\nimport Pkg; \nPkg.add("GR")\nPkg.add("AlphaZero")\n')
/opt/conda/lib/python3.7/site-packages/IPython/core/interactiveshell.py in run_cell_magic(self, magic_name, line, cell)
2470 with self.builtin_trap:
2471 args = (magic_arg_s, cell)
-> 2472 result = fn(*args, **kwargs)
2473 return result
2474
/opt/conda/lib/python3.7/site-packages/decorator.py in fun(*args, **kw)
230 if not kwsyntax:
231 args, kw = fix(args, kw, sig)
--> 232 return caller(func, *(extras + args), **kw)
233 fun.__name__ = func.__name__
234 fun.__doc__ = func.__doc__
/opt/conda/lib/python3.7/site-packages/IPython/core/magic.py in <lambda>(f, *a, **k)
185 # but it's overkill for just that one bit of state.
186 def magic_deco(arg):
--> 187 call = lambda f, *a, **k: f(*a, **k)
188
189 if callable(arg):
/opt/conda/lib/python3.7/site-packages/julia/magic.py in julia(self, line, cell)
136 """
137 % (src, return_value)
--> 138 )(self.shell.user_ns, caller_frame.f_locals)
139
140
RuntimeError: <PyCall.jlwrap (in a Julia function called from Python)
JULIA: Unsatisfiable requirements detected for package AlphaZero [8ed9eb0b]:
AlphaZero [8ed9eb0b] log:
├─possible versions are: [0.4.0, 0.5.0-0.5.4] or uninstalled
├─restricted to versions * by an explicit requirement, leaving only versions [0.4.0, 0.5.0-0.5.4]
└─restricted by julia compatibility requirements to versions: uninstalled — no versions left
Stacktrace:
[1] propagate_constraints!(::Pkg.Resolve.Graph, ::Set{Int64}; log_events::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Resolve/graphtype.jl:1010
[2] propagate_constraints! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Resolve/graphtype.jl:951 [inlined] (repeats 2 times)
[3] simplify_graph!(::Pkg.Resolve.Graph, ::Set{Int64}; clean_graph::Bool) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Resolve/graphtype.jl:1465
[4] simplify_graph! at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Resolve/graphtype.jl:1465 [inlined] (repeats 2 times)
[5] resolve_versions!(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:348
[6] targeted_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Pkg.Types.PreserveLevel) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1064
[7] tiered_resolve(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1050
[8] _resolve at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1070 [inlined]
[9] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}, ::Array{Base.UUID,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Linux) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/Operations.jl:1085
[10] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}; preserve::Pkg.Types.PreserveLevel, platform::Pkg.BinaryPlatforms.Linux, kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:159
[11] add(::Pkg.Types.Context, ::Array{Pkg.Types.PackageSpec,1}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:112
[12] #add#27 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:109 [inlined]
[13] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:109 [inlined]
[14] #add#24 at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:107 [inlined]
[15] add at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:107 [inlined]
[16] add(::String; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:106
[17] add(::String) at /buildworker/worker/package_linux64/build/usr/share/julia/stdlib/v1.4/Pkg/src/API.jl:106
[18] top-level scope at none:6
[19] eval at ./boot.jl:331 [inlined]
[20] eval at ./Base.jl:39 [inlined]
[21] (::var"#21#22")(::PyObject, ::PyObject) at /opt/conda/lib/python3.7/site-packages/julia/pyjulia_helper.jl:91
[22] (::PyCall.FuncWrapper{Tuple{PyObject,PyObject},var"#21#22"})(::PyObject, ::Vararg{PyObject,N} where N; kws::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /root/.julia/packages/PyCall/twYvK/src/callback.jl:56
[23] (::PyCall.FuncWrapper{Tuple{PyObject,PyObject},var"#21#22"})(::PyObject, ::Vararg{PyObject,N} where N) at /root/.julia/packages/PyCall/twYvK/src/callback.jl:56
[24] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N; kwargs::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at ./essentials.jl:712
[25] invokelatest(::Any, ::Any, ::Vararg{Any,N} where N) at ./essentials.jl:711
[26] _pyjlwrap_call(::PyCall.FuncWrapper{Tuple{PyObject,PyObject},var"#21#22"}, ::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}) at /root/.julia/packages/PyCall/twYvK/src/callback.jl:28
[27] pyjlwrap_call(::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}, ::Ptr{PyCall.PyObject_struct}) at /root/.julia/packages/PyCall/twYvK/src/callback.jl:44>
I personally do not have experience with Kaggle notebooks so I cannot help here. @Snimm Do you want to leave the issue open in case someone else can help?