Giter VIP home page Giter VIP logo

Comments (15)

gpgjoe avatar gpgjoe commented on May 23, 2024 1

Right. Wrong version. I was using Julia 1.0.3. Moved to 1.1.0 and it's working now. isnothing didn't exist in 1.0.3.

from gym.jl.

v-i-s-h avatar v-i-s-h commented on May 23, 2024

The problem is the line here: https://github.com/FluxML/Gym.jl/blob/master/src/Spaces/dict-space.jl#L1
uses DataStructures package, but Project.toml file is not updated to include this.

This can be solved by going to repl and do ] add DataStructures and then using Gym.

@tejank10 Maybe this issue should be renamed to reflect the missing dependencies.

Also, there is this warning which also needs to be taken care of

julia> using Gym
[ Info: Recompiling stale cache file /home/vish/.julia/compiled/v1.1/Gym/Z6zPi.ji for Gym [56b9baea-2481-11e9-37ae-75904354ad8c]
┌ Warning: Package Gym does not have Random in its dependencies:
│ - If you have Gym checked out for development and have
│   added Random as a dependency but haven't updated your primary
│   environment's manifest file, try `Pkg.resolve()`.
│ - Otherwise you may need to report an issue with Gym
└ Loading Random into Gym from project dependency, future warnings for Gym are suppressed.

from gym.jl.

kraftpunk97-zz avatar kraftpunk97-zz commented on May 23, 2024

@v-i-s-h is it just a matter of dependencies? Updating Project.toml should solve this problem yes?

from gym.jl.

v-i-s-h avatar v-i-s-h commented on May 23, 2024

I think yes. Adding DataStructures and Random to Project.toml should solve this problem.

from gym.jl.

kraftpunk97-zz avatar kraftpunk97-zz commented on May 23, 2024

@gpgjoe Pinging to verify if the problem has been solved.

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

Hey!

Thanks for this.

I'm actually new with Julia. I see that you merged your edits here https://github.com/FluxML/Gym.jl/commit/5ad79762a44d8bbf9e177c1761a7b6af62a584ee. But is there an easy way for me to install this? I've tried ] add https://github.com/FluxML/Gym.jl#5ad79762a44d8bbf9e177c1761a7b6af62a584ee and it seems that Julia understands the command. Pkg says that the installed version is

[56b9baea] Gym v0.1.0 #5ad7976 (https://github.com/FluxML/Gym.jl)

However, when I run using Gym I still get the same error as before. I've tried restarting the REPL.

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

My issue aside, there's a typo in there.

5ad7976

In any case, how is it that's working for you?

from gym.jl.

kraftpunk97-zz avatar kraftpunk97-zz commented on May 23, 2024

@gpgjoe Ah, it's unfortunate that my band aid fix needs a band aid fix of its own; but #15 should get things working smoothly. I believe it is possible for Julia users to install various versions of the same package. Maybe give that a try?

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

Installing from your fork worked.

I'm used to Python, and I'm already in love with Julia's package manager.

from gym.jl.

kraftpunk97-zz avatar kraftpunk97-zz commented on May 23, 2024

@gpgjoe The required changes have been incorporated into the main repository. It'd be better for you to switch to it. Sorry for the unnecessary trouble🙇‍♂️.

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

Now I get an error trying to run the example:

using Gym
env = CartPoleEnv()

gives me:

UndefVarError: isnothing not defined
Box(::Array{Float32,1}, ::Array{Float32,1}, ::DataType) at box.jl:39
CartPoleEnv() at CartPole.jl:48
top-level scope at none:0

if isnothing(dtype)

Again, I don't understand how it's possible that I get this error but you can run it fine.

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

I think most of the code doesn't really depend on the above. What is the proper way to edit a Julia package? With packages on the main registry I know I can do dev <package name> but as this package has been installed from a repo that doesn't really work (there's a different package named Gym).

from gym.jl.

gpgjoe avatar gpgjoe commented on May 23, 2024

I've tried copying Gym to a separate folder and then restart Julia, run prepend!(LOAD_PATH, ["my_new_folder"]) and that didn't work.

from gym.jl.

anandijain avatar anandijain commented on May 23, 2024

Is anyone getting a cant precompile for Cairo.jl?

Commit 55e36cc308 (2019-05-16 04:10 UTC)
Platform Info:
  OS: Windows (x86_64-w64-mingw32)
[ Info: Precompiling Gym [56b9baea-2481-11e9-37ae-75904354ad8c]
ERROR: LoadError: Cairo not properly installed. Please run
Pkg.build("Cairo")

Output of Pkg.build("Cairo") :

Building LibCURL  `C:\Users\Anand\.julia\packages\LibCURL\lWJxD\deps\build.log`     
Building WinRPM  `C:\Users\Anand\.julia\packages\WinRPM\Y9QdZ\deps\build.log`      
Building Homebrew → `C:\Users\Anand\.julia\packages\Homebrew\s09IX\deps\build.log`             
Building Cairo → `C:\Users\Anand\.julia\packages\Cairo\CXPG1\deps\build.log`       

New to Julia, not sure what's going on,
Thanks!

===== update =====
After add Cairo and another Pkg.build("Cairo"), I can now call using Gym.

Any ideas why the initial install of Gym (from github), didn't get this?

from gym.jl.

kraftpunk97-zz avatar kraftpunk97-zz commented on May 23, 2024

@anandijain can't really say that without knowing what cause Cairo's build process to fail the first time. If you have the complete stacktrace, that could be helpful. Although, Cairo.jl has been acting strangely as of late, even on macOS. It is being looked into.

from gym.jl.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo 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.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.