Added time budget control.
pyflakes: unused exception name.
Merge pull request #526 from dwf/train_time_budget

Added time budget control.