Update engine.py
Update engine.py

fix #1288
henry0312/LightGBM,microsoft/LightGBM,microsoft/LightGBM,henry0312/LightGBM,microsoft/LightGBM,henry0312/LightGBM,henry0312/LightGBM,microsoft/LightGBM,henry0312/LightGBM,microsoft/LightGBM