TypeError when using strategy="random"
and optimization_order="sequential"
without validation set when using Trainer
#259
Labels
bug
Something isn't working, either in /adalflow, /tutorials, or /use cases...
Bug description
A TypeError: object of type 'NoneType' has no len() occurs when using the trainer with the following configuration:
The error originates from
adalflow/optim/trainer/adal.py
line 372 in the pred_step function, where it attempts to get the length of the batch which is None in this caseWhat version are you seeing the problem on?
The version of the package "adalfow" is 0.2.3, and it has been installed using pip.
How to reproduce the bug
Error messages and logs
Environment
Current environment
More info
This bug seems to be related to how the trainer handles the absence of a validation/test set when using the
"random"
strategy and"sequential"
optimization order. It might be necessary to add a check for the existence of the validation set or handle theNone
value forbatch
appropriately in thepred_step
function.The text was updated successfully, but these errors were encountered: