Keras-Project-Template icon indicating copy to clipboard operation
Keras-Project-Template copied to clipboard

Creating directories error: Please import Comet before importing any keras modules

Open Hhhhhhao opened this issue 6 years ago • 4 comments

It seems like current code have little bug on comet import according to the report, we have to import comet before keras modules

Create the trainer
importing trainers.CifarTrainer
getattr CifarTrainer
<class 'trainers.CifarTrainer.CifarTrainer'>
Please import Comet before importing any keras modules

Hhhhhhao avatar Jun 02 '18 01:06 Hhhhhhao

Yeah I ended up resolving it by importing comet in main (hacky fix but not terribly bad)

mannykoum avatar Aug 01 '18 17:08 mannykoum

Yeah I ended up resolving it by importing comet in main (hacky fix but not terribly bad)

Can you please elaborate how did you do it. Importing comet in main will throw the error: "name 'Experiment' is not defined". Because importing Comet in main means simple_mnist_trainer.py is not imported with Comet sadly.

ffleader1 avatar Dec 06 '18 11:12 ffleader1

Yeah nvm. Gotta import Comet twice, once in main and once in trainer. Wonder why this error is still not fixed.

ffleader1 avatar Dec 06 '18 11:12 ffleader1

Yes, it seems that the module "comet_ml" should be imported at the beginning.

GanggangDong avatar Mar 30 '20 23:03 GanggangDong