TMVA keras bug of LearningRateSchedule

It seems the method of below


with option

LearningRateSchedule != ''

got the error as below

Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "/usr/local/lib/python3.7/site-packages/keras/engine/", line 1239, in fit
  File "/usr/local/lib/python3.7/site-packages/keras/engine/", line 146, in fit_loop
  File "/usr/local/lib/python3.7/site-packages/keras/callbacks/", line 136, in on_epoch_begin
    callback.on_epoch_begin(epoch, logs)
  File "/usr/local/lib/python3.7/site-packages/keras/callbacks/", line 930, in on_epoch_begin
    lr = self.schedule(epoch, lr)
  File "<string>", line 3, in schedule
AttributeError: 'float' object has no attribute 'optimizer'
<FATAL>                         : Failed to train model
***> abort program execution
Traceback (most recent call last):
  File "", line 69, in <module>
Exception: void TMVA::Factory::TrainAllMethods() =>
    FATAL error (C++ exception of type runtime_error)

the pyKeras need to be updated

May be a more complete reproducer will help to understand better the problem ?

TMVA method pykeras with option LearningRateSchedule show the errors showing upper

using tutorial tmva/keras/

modify adding LearningRateSchedule bug

factory.BookMethod(dataloader, TMVA.Types.kPyKeras, 'PyKeras', 'H:!V:VarTransform=D,G:FilenameModel=model.h5:NumEpochs=20:BatchSize=32:LearningRateSchedule=50,0.001;100,0.0001')