Read local configuration file into google colab (Python)

Viewed 360

Load NEAT config file

Unable to call upon a local file on google colab (first time using this). I uploaded the file but unable to call the information from the desired configuration file. Any pointers? Thanks.

local_dir = os.path.dirname(__file__)
config_path = os.path.join(local_dir, 'cartpole.config')
config = neat.Config(neat.DefaultGenome, neat.DefaultReproduction,
                    neat.DefaultSpeciesSet, neat.DefaultStagnation,
                    config_path)
population = neat.Population(config)
NameError: name '__file__' is not defined
0 Answers
Related