This requires splitting the recently added x_transform and y_transform further into getting the data from the task and the actual transformation itself,
class_weights should be class_weight according to latest keras documentation,
Train and valid splits for the generator using mlr3 resampling.
Referencing discussion in https://github.com/mlr-org/mlr3keras/issues/6.