maxpumperla / hyperas

Keras + Hyperopt: A very simple wrapper for convenient hyperparameter optimization
http://maxpumperla.com/hyperas/
MIT License
2.17k stars 316 forks source link

SyntaxError: invalid syntax #250

Open chcorophyll opened 4 years ago

chcorophyll commented 4 years ago

two workstations ,both Windows 10+jupyter notebook+python3.6,run the same code, one is normal, the other one is getting below error on executing the code:

Traceback (most recent call last):

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\IPython\core\interactiveshell.py", line 3326, in run_code exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 76, in notebook_name="my_illusion_deepnet")

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\hyperas\optim.py", line 70, in minimize keep_temp=keep_temp)

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\hyperas\optim.py", line 99, in base_minimizer model_str = get_hyperopt_model_string(model, data, functions, notebook_name, verbose, stack)

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\hyperas\optim.py", line 190, in get_hyperopt_model_string imports = extract_imports(cleaned_source, verbose)

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\site-packages\hyperas\utils.py", line 40, in extract_imports tree = ast.parse(source)

File "C:\ProgramData\Anaconda3\envs\tensorflow\lib\ast.py", line 35, in parse return compile(source, filename, mode, PyCF_ONLY_AST)

File "", line 548 if name == 'main':in ^ SyntaxError: invalid syntax