Skip to content

Ludwig Hyperopt runs into an error when custom callbacks are added #4048

@SumanthDatta-Kony

Description

@SumanthDatta-Kony

Ludwig Hyperopt runs into an error , when custom callbacks are included , otherwise it runs fine.

Steps to reproduce the behavior:

  1. Attached is the python code which uses ludwig hyperopt , a dataset file and a callback class , output log file.

  2. Run the file model_hyperopt_example.py to see the error

  3. Ludwig version used was 0.10.3 , this issue was also seen on 0.10.4

Following exception occurs

File "/data/sumanthn/ludwig_venv/lib64/python3.8/site-packages/ludwig/trainers/trainer.py", line 1278, in _train_loop
self.callback(lambda c: c.on_batch_end(self, progress_tracker, save_path, sync_step=should_step))
File "/data/sumanthn/ludwig_venv/lib64/python3.8/site-packages/ludwig/trainers/trainer.py", line 1708, in callback
fn(callback)
File "/data/sumanthn/ludwig_venv/lib64/python3.8/site-packages/ludwig/trainers/trainer.py", line 1278, in
self.callback(lambda c: c.on_batch_end(self, progress_tracker, save_path, sync_step=should_step))
TypeError: on_batch_end() got an unexpected keyword argument 'sync_step

When i edited the trainer.py , line 1278 and removed sync_step attribute , it worked fine, Hyperopt completed successfully.

Environment

  • OS: Red hat Linux
  • Python version : 3.8.x
  • Ludwig version: 0.10.3 or 0.10.4

hyperopt_callback.txt
model_hyperopt_example.txt
output.txt
winequalityN.csv

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions