Comments (15)
Thanks for reporting this! It appears that my last commit on master broke the build indeed.
The package ships a Manifest as well as a Project.toml. I think it would be sufficient to ship just the Project.toml.
To be clear, isn't it a common practice for projects that are not supposed to be used as dependencies themselves to include a Manifest file so as to pin all dependencies to specific versions?
Anyway. I agree it would be preferable to remove the Manifest file and put version bounds for the dependencies in the Project.toml.
There's a dependency on CuArrays.jl - but that should be deleted, since it is now merged into CUDA.jl.
I will do this and fix the master branch later today. Thanks again!
from alphazero.jl.
Another thing I noticed is - does the package need both JSON2 and JSON3 as direct dependencies?
I think I use JSON2 for its pretty printing function, which did not exist in JSON3 last time I checked.
from alphazero.jl.
As you said, your version of Knet is not compiled for CUDA.
However, you should still not see this as the default tests are not supposed to use the GPU, so this is a bug on my end.
I am looking at this right now.
from alphazero.jl.
Yes, the number of tests is nondeterministic right now as it depends on the length of a random simulated game. :-)
from alphazero.jl.
Deleting the Manifest (and resolving some old versions of packages I had) was sufficient to get using AlphaZero
to work and start on running the tests.
I noticed that Flux support is commented out. Would be nice to avoid installing unnecessary packages in the Project.toml.
from alphazero.jl.
Actually I had to add CuArrays.jl to make it work. I seem to have a bad state of dependencies, but I do have it running, and I had to add CuArrays for it.
You're right that Manifests are good for reproducibility, but the Manifest right now has a hardcoded path causing things to fail. Especially for folks in the community who want to poke around the package, the ability to add it and dev it is nice.
from alphazero.jl.
The tests did not run successfully:
Test Summary: | Pass Total
Testing Games | 5278 5278
Dummy Runs: Error During Test at /home/viralbshah/.julia/dev/AlphaZero/test/runtests.jl:16
Test threw exception
Expression: dummy_run(Tictactoe)
UndefVarError: lib not defined
Stacktrace:
[1] _broadcasted(::typeof(+), ::Knet.KnetArray{Float32,2}, ::Knet.KnetArray{Float32,1}, ::Knet.KnetArray{Float32,2}, ::Tuple{Tuple{Int64,Int64},Int64,Int64,Int64,Int64,Int64,Int64,Int64,Int64,Bool}) at /home/viralbshah/.julia/packages/Knet/bTNMd/src/binary.jl:65
from alphazero.jl.
Wiped out .julia
and starting afresh:
(@v1.4) pkg> dev [email protected]:jonathan-laurent/AlphaZero.jl.git
Cloning git-repo `[email protected]:jonathan-laurent/AlphaZero.jl.git`
Resolving package versions...
ERROR: expected package `CuArrays [3a865a2d]` to exist at path `/home/jonathan/.julia/dev/CuArrays`
If I wipe the Manifest.toml, it then goes through. I do however think that the Project.toml may not need to have CUDAapi and CuArrays - that CUDA.jl should be sufficient going forward so long as it is lower bounded correctly.
from alphazero.jl.
Another thing I noticed is - does the package need both JSON2 and JSON3 as direct dependencies?
from alphazero.jl.
Are the tests are failing because I don't have Knet set up correctly for GPUs? Is a GPU a must for running the code?
Dummy Runs: Error During Test at /home/viralbshah/.julia/dev/AlphaZero/test/runtests.jl:16
Test threw exception
Expression: dummy_run(Tictactoe)
Cannot find cudnn
Stacktrace:
[1] error(::String) at ./error.jl:33
[2] cudnnCreate() at /home/viralbshah/.julia/packages/Knet/bTNMd/src/gpu.jl:306
[3] cudnnhandle(::Int64) at /home/viralbshah/.julia/packages/Knet/bTNMd/src/gpu.jl:213
[4] cudnnhandle() at /home/viralbshah/.julia/packages/Knet/bTNMd/src/gpu.jl:206
[5] batchnorm2(::Knet.KnetArray{Float32,2}, ::Knet.KnetArray{Float32,2}, ::Knet.KnetArray{Float32,2}; moments::Knet.BNMoments, training::Bool, o::Base.Iterators.Pairs{Symbol,Knet.BNCache,Tuple{Symbol},NamedTuple{(:cache,),Tuple{Knet.BNCache}}}) at /home/viralbshah/.julia/packages/Knet/bTNMd/src/batchnorm.jl:496
[6] batchnorm(::Knet.KnetArray{Float32,2}, ::Knet.BNMoments, ::AutoGrad.Param{Knet.KnetArray{Float32,1}}; training::Bool, o::Base.Iterators.Pairs{Union{},Union{},Tuple{},NamedTuple{(),Tuple{}}}) at /home/viralbshah/.julia/packages/Knet/bTNMd/src/batchnorm.jl:90
[7] (::AlphaZero.KNets.BatchNorm)(::Knet.KnetArray{Float32,2}) at /home/viralbshah/.julia/dev/AlphaZero/src/networks/knet/layers.jl:84
[8] (::AlphaZero.KNets.Chain)(::Knet.KnetArray{Float32,2}) at /home/viralbshah/.julia/dev/AlphaZero/src/networks/knet/layers.jl:19 (repeats 2 times)
[9] forward(::SimpleNet{Main.Tictactoe.Game}, ::Knet.KnetArray{Float32,4}) at /home/viralbshah/.julia/dev/AlphaZero/src/networks/knet.jl:148
from alphazero.jl.
AlphaZero.jl is supposed to work in the absence of a GPU.
Are you getting this error on master and does your computer have a GPU with CUDA?
from alphazero.jl.
Yes, I am using master. If the package has a registered version in the General repo, I should use that, but I just started with the suggestion in the README.
I do have a GPU with CUDA libraries, but haven't compiled the Knet for CUDA just yet - if that is required. I thought it would be good to try out the package without GPU first, get its tests working, and then try the CUDA version.
from alphazero.jl.
Fixed.
from alphazero.jl.
Thanks for fixing so quickly! The tests are now passing on mac and linux for me. On to the GPU next.
Is this expected that there are different numbers of tests? Perhaps I have some optional packages installed on one system and not the other? Anyways, I just thought I would mention it since I saw it.
On Linux:
Test Summary: | Pass Total
Testing Games | 5239 5239
Test Summary: | Pass Total
Dummy Runs | 1 1
On Mac:
Test Summary: | Pass Total
Testing Games | 5276 5276
Test Summary: | Pass Total
Dummy Runs | 1 1
from alphazero.jl.
Trying to get GPU support in Knet working, but running into some issues, which I have filed upstream: denizyuret/Knet.jl#568
Just mentioning it here for anyone who might run into it in the future.
from alphazero.jl.
Related Issues (20)
- Training Stuck at 'Network Only against MinMax (depth 6)' after Modifying TicTacToe Board Size to 4x4 HOT 4
- [Feedback Requested] Wishlist for the next major release of AlphaZero.jl HOT 4
- Maximum number of iterations HOT 1
- Success stories HOT 2
- How to prevent GPU OOM? HOT 9
- What next after training an agent? HOT 2
- How to play a one-player game automatically and get the move sequence? HOT 1
- I can't install it to run training HOT 1
- LoadError: UndefVarError: #flatten not defined
- Any way to start when playing against AlphaZero? HOT 2
- AZ much worse than generic solution for simple game HOT 2
- When should I stop learning? HOT 2
- How many iterations are required?
- Julia 1.9?
- How important is loss during learning
- How to restart a training session that has completed HOT 3
- Not invoking alternate implementation of select_move HOT 1
- Success report and request for help HOT 3
- got Out of GPU memory when learning HOT 6
- Non-trivial games HOT 6
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from alphazero.jl.