joeddav / devol

Genetic neural architecture search with Keras

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Can not create CSV file

donsmj opened this issue · comments

with open(self.datafile, 'a') as csvfile:
OSError: [Errno 22] Invalid argument: 'Thu Apr 11 00:42:22 2019.csv'

This file can not be made for me. Any solutions for that?

If you're using Windows go the Devol repository, to file devol/devol.py
and change the following line of code
self.datafile = data_path or (datetime.now().ctime() + '.csv')

to
self.datafile = data_path or (datetime.now().ctime() + '.csv').replace(":", "_").replace(" ", "_")

The problem is the current library is using : and spaces on files names, and Windows have issues on that

Meanwhile a simpler solution
Change your code to
devol = DEvol(genome_handler, "Devol_file")