Giter Site home page Giter Site logo

Comments (14)

amidos2006 avatar amidos2006 commented on July 27, 2024

What is your python version?

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

Python version is: Python 2.7.16
Python3 version is: Python 3.8.1

from gym-pcgrl.

amidos2006 avatar amidos2006 commented on July 27, 2024

First of all, make sure you are always using new python (3.5 or newer) don't try 2.7 ever and make sure that when you try to run train.py that this is the case.

The error you are getting is because you are trying to run the code using python 2.7. Here is an experiment showing that **varName is not supported in 2.7 (copied from my console):
Error with Python 2.7

Here is the same experiment with newer python (3.5.2):
Running Successful

To make sure this is not happening always use anaconda to manage your virtual environment so there is not two python version installed at the same place.

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

Okay so I tried the anaconda way of doing it based on the ReadMe and got this error when trying to run the train.py after installing the necessary dependencies:

Traceback (most recent call last):
File "train.py", line 5, in
from model import FullyConvPolicyBigMap, FullyConvPolicySmallMap, CustomPolicyBigMap, CustomPolicySmallMap
ImportError: cannot import name 'FullyConvPolicyBigMap' from 'model' (/Users/Kevin/Desktop/gym-pcgrl/model.py)

Is there a step that I misread from the readme? Thanks!

from gym-pcgrl.

amidos2006 avatar amidos2006 commented on July 27, 2024

Are you sure the model.py is there beside train.py because that error means it can't see model.py

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

the model.py is there, I have made no changes to the original repo

from gym-pcgrl.

amidos2006 avatar amidos2006 commented on July 27, 2024

mmm... I don't get why it can't see that python file. Just try in the python console to import any class from model.py if It can't maybe OSX Catalina has some security issues.

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

alright thanks

from gym-pcgrl.

smearle avatar smearle commented on July 27, 2024

There are a few different "Policy" classes defined in model.py, maybe train.py is trying to import a Policy that is not defined in model.py. You might get away with commenting out the offending import.

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

So that tip was helpful, I got rid of the FullyConvPolicyBigMap issue, but now my new issue is that its looking for a file called policy. Is there one that should be there that I'm missing, or is it something else entirely?

Traceback (most recent call last):
File "train.py", line 8, in
from policy import PPO2
ModuleNotFoundError: No module named 'policy'

from gym-pcgrl.

smearle avatar smearle commented on July 27, 2024

You must be on the experimental FractalNet branch.
Try
git checkout master
then open train.py: there should be no such import line (instead, on line 8, we'll be importing policies from stable_baselines).

from gym-pcgrl.

amidos2006 avatar amidos2006 commented on July 27, 2024

Yup, I was trying to understand what is happening because that code looks old with some new one.

from gym-pcgrl.

KAltieri avatar KAltieri commented on July 27, 2024

Okay thanks! Maybe thats where all my issues are stemming from

from gym-pcgrl.

smearle avatar smearle commented on July 27, 2024

I just tried cloning a fresh repository, and can confirm that was on the master branch, and code was able to run (after making a 'runs' directory to log training progress). You must have accidentally switched branches somehow.
You can run git branch -a to view all available branches (I should probably delete most of them...), and check which branch you are on.

from gym-pcgrl.

Related Issues (4)

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.